Commit f14423bd authored by Hasitha Samarasekara's avatar Hasitha Samarasekara

Merge branch 'it18049114' into 'master'

It18049114

See merge request !15
parents 09e07a18 39d604a3
......@@ -5,6 +5,8 @@
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/MobileFrontEnd/FlutterApplication/flutter_app/.pub" />
<excludeFolder url="file://$MODULE_DIR$/MobileFrontEnd/FlutterApplication/flutter_app/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
......
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../Android/Sdk/platforms/android-30/data/res/layout/simple_list_item_1.xml" value="0.3677536231884058" />
<entry key="..\:/Users/HANSAKA/Desktop/Research Development/ELearningApp/app/src/main/res/layout/activity_attendence.xml" value="0.1802536231884058" />
<entry key="app/src/main/res/drawable-v24/grey_back_curved.xml" value="0.434375" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/drawable-v24/white_curved.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/drawable/darkgrey_back_curved.xml" value="0.434375" />
<entry key="app/src/main/res/drawable/ic_launcher_background.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/drawable/ic_launcher_bg.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/drawable/list_item.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/layout/activity_attendence.xml" value="0.3061594202898551" />
<entry key="app/src/main/res/layout/activity_class_add.xml" value="0.3555253623188406" />
<entry key="app/src/main/res/layout/activity_class_detail_activty.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_class_edit.xml" value="0.3555253623188406" />
<entry key="app/src/main/res/layout/activity_home.xml" value="0.2866847826086957" />
<entry key="app/src/main/res/layout/activity_join.xml" value="0.3333333333333333" />
<entry key="app/src/main/res/layout/activity_login.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.2848731884057971" />
<entry key="app/src/main/res/layout/activity_student_list.xml" value="0.3677536231884058" />
<entry key="app/src/main/res/layout/activity_timer.xml" value="0.3759057971014493" />
<entry key="app/src/main/res/layout/activity_tutor_join.xml" value="0.3759057971014493" />
<entry key="app/src/main/res/layout/list_item.xml" value="0.3555253623188406" />
<entry key="app/src/main/res/layout/student_list_item.xml" value="0.3677536231884058" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.2557291666666667" />
<entry key="app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.2557291666666667" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="VisualizationToolProject">
<option name="state">
<ProjectState>
<option name="scale" value="0.2866847826086957" />
</ProjectState>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
compileSdk 30
defaultConfig {
applicationId "com.symbol.elearningapp"
minSdk 26
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.google.android.gms:play-services:12.0.1'
def camerax_version = "1.0.0-beta05"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation"androidx.camera:camera-view:1.0.0-alpha12"
implementation "androidx.camera:camera-extensions:1.0.0-alpha12"
// For Card view
implementation 'androidx.cardview:cardview:1.0.0'
// Chart and graph library
implementation 'com.github.blackfizz:eazegraph:1.2.5l@aar'
implementation 'com.nineoldandroids:library:2.4.0'
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.symbol.elearningapp;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.symbol.elearningapp", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.symbol.elearningapp">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature android:name="android.hardware.audio.low_latency" />
<uses-feature android:name="android.hardware.audio.pro" />
<uses-feature android:name="android.hardware.microphone" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.ELearningApp"
android:usesCleartextTraffic="true">
<activity
android:name=".StudentListActivity"
android:exported="true" />
<activity
android:name=".TimerActivity"
android:exported="true" />
<activity
android:name=".JoinClassActivty"
android:exported="true" />
<activity
android:name=".TutorJoinActivity"
android:exported="true" />
<activity
android:name=".AttendenceActivity"
android:exported="true" />
<activity
android:name=".JoinActivity"
android:exported="true" />
<activity
android:name=".ClassAddActivity"
android:exported="true" />
<activity
android:name=".ClassEditActivity"
android:exported="true" />
<activity
android:name=".ClassDetailActivty"
android:exported="true" />
<activity
android:name=".HomeActivity"
android:exported="true" />
<activity
android:name=".LoginActivity"
android:exported="true" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.symbol.elearningapp.Adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.RecyclerView;
import com.symbol.elearningapp.HomeActivity;
import com.symbol.elearningapp.LoginActivity;
import com.symbol.elearningapp.R;
import com.symbol.elearningapp.service.ClassDetail;
import java.util.List;
public class ClassAdapter extends RecyclerView.Adapter<ClassAdapter.ViewHolder>{
private List<ClassDetail> classDetails;
Context context;
ClickListener clickListener;
public ClassAdapter(List<ClassDetail> listdata,Context context,ClickListener clickListener) {
this.classDetails = listdata;
this.context = context;
this.clickListener =clickListener;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View listItem= layoutInflater.inflate(R.layout.list_item, parent, false);
ViewHolder viewHolder = new ViewHolder(listItem);
return viewHolder;
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
final ClassDetail myListData = classDetails.get(position);
holder.tvSubjectname.setText(myListData.getSubject());
holder.tvDate.setText(myListData.getDate());
holder.tvClassTime.setText(myListData.getClassTime());
holder.linearLayout.setOnClickListener(v ->{
clickListener.onItemClicked(position);
// Toast.makeText(context,myListData.getSubject() +" " +myListData.getId(),Toast.LENGTH_LONG).show();
});
}
@Override
public int getItemCount() {
return classDetails.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder {
private ClickListener listener;
public TextView tvSubjectname,tvDate,tvClassTime;
public LinearLayout linearLayout;
public ViewHolder(View itemView) {
super(itemView);
tvSubjectname = (TextView) itemView.findViewById(R.id.tvSubject);
tvDate = (TextView) itemView.findViewById(R.id.tvdate);
tvClassTime = (TextView) itemView.findViewById(R.id.tvclasstime);
linearLayout = (LinearLayout)itemView.findViewById(R.id.lvitems);
}
}
public interface ClickListener {
public void onItemClicked(int position);
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ChartData;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import org.eazegraph.lib.charts.PieChart;
import org.eazegraph.lib.models.PieModel;
import java.util.Calendar;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class AttendenceActivity extends AppCompatActivity {
PieChart pieChart;
Spinner dropdown;
TextView tvsubject,tvTotal,tvAbsent,tvPresent;
ServiceApi serviceApi;
ProgressDialog progress;
AppPreference appPreference;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_attendence);
appPreference = new AppPreference(this);
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
pieChart = findViewById(R.id.piechart);
dropdown = findViewById(R.id.spinner1);
tvsubject =findViewById(R.id.tvsubject);
tvTotal = findViewById(R.id.tvTotal);
tvAbsent = findViewById(R.id.tvAbsent);
tvPresent = findViewById(R.id.tvPresent);
List<ClassDetail> details= CommonData.getClassDetails();
String[] items = new String[details.size()];
for(int i = 0;i < details.size();i++)
{
items[i] = details.get(i).getSubject();
}
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, items);
dropdown.setAdapter(adapter);
dropdown.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
String subjectName = dropdown.getItemAtPosition(position).toString();
updateClassdetails(subjectName);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
private void createChart(int present,int absent){
pieChart.clearChart();
pieChart.addPieSlice(
new PieModel(
"Present",
present,
Color.parseColor("#66BB6A")));
pieChart.addPieSlice(
new PieModel(
"Absent",
absent,
Color.parseColor("#EF5350")));
pieChart.startAnimation();
}
public void updateClassdetails(String subject) {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<ChartData> userCall = serviceApi.getAttendance("atd/"+CommonData.getId()+"/"+subject);
// Call<ChartData> userCall = serviceApi.getAttendance("atd/29/"+subject);
userCall.enqueue(new Callback<ChartData>() {
@Override
public void onResponse(Call<ChartData> call, Response<ChartData> response) {
if(response.body() != null)
{
progress.dismiss();
int total = response.body().getReal();
int present =response.body().getDetected();
int absent = total-present;
createChart(present,absent);
tvsubject.setText(subject);
tvAbsent.setText(""+absent);
tvTotal.setText(""+total);
tvPresent.setText(""+present);
}
else
{
progress.dismiss();
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<ChartData> call, Throwable t) {
progress.dismiss();
appPreference.showToast("Server Error occured!!");
}
});
}
}
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.app.ProgressDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class ClassAddActivity extends AppCompatActivity {
Calendar myCalendar;
EditText etdate, etclasstime, etsubject;
Button addBtn;
ServiceApi serviceApi;
AppPreference appPreference;
ProgressDialog progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_class_add);
myCalendar = Calendar.getInstance();
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
appPreference = new AppPreference(this);
etdate = (EditText) findViewById(R.id.etdate);
etclasstime = (EditText) findViewById(R.id.etclasstime);
etsubject = (EditText) findViewById(R.id.etsubject);
addBtn = findViewById(R.id.btn_add);
DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
myCalendar.set(Calendar.YEAR, year);
myCalendar.set(Calendar.MONTH, monthOfYear);
myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
updateLabel();
}
};
etdate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
new DatePickerDialog(ClassAddActivity.this, date, myCalendar
.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
etclasstime.setOnClickListener(new View.OnClickListener() {
final Calendar c = Calendar.getInstance();
int mHour = c.get(Calendar.HOUR_OF_DAY);
int mMinute = c.get(Calendar.MINUTE);
@Override
public void onClick(View v) {
TimePickerDialog timePickerDialog = new TimePickerDialog(ClassAddActivity.this,
new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay,
int minute) {
etclasstime.setText(hourOfDay + ":" + String.format("%02d", minute));
}
}, mHour, mMinute, true);
timePickerDialog.show();
}
});
addBtn.setOnClickListener(view -> {
addClassdetails();
});
}
public void addClassdetails() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
String Subject = etsubject.getText().toString();
String Date = etdate.getText().toString();
String time = etclasstime.getText().toString();
if (TextUtils.isEmpty(Subject)) {
appPreference.showToast("Subject name is required.");
} else if (TextUtils.isEmpty(Date)) {
appPreference.showToast("Please select the date");
} else if (TextUtils.isEmpty(time)) {
appPreference.showToast("Please select the time");
} else {
int id = Integer.parseInt(CommonData.getClassDetails().get(CommonData.getClassDetails().size() - 1).getId()) + 1;
Call<ClassDetail> userCall = serviceApi.addClassDetail(new ClassDetail("" + id, Subject, Date, time, null));
userCall.enqueue(new Callback<ClassDetail>() {
@Override
public void onResponse(Call<ClassDetail> call, Response<ClassDetail> response) {
if (!response.equals("")) {
progress.dismiss();
appPreference.showToast("Added Sucessfully!!");
stopActivity();
} else {
progress.dismiss();
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<ClassDetail> call, Throwable t) {
progress.dismiss();
appPreference.showToast(t.getMessage());
}
});
}
}
private void updateLabel() {
String myFormat = "MM/dd/yy";
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
etdate.setText(sdf.format(myCalendar.getTime()));
}
private void stopActivity() {
this.finish();
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.symbol.elearningapp.Adapters.ClassAdapter;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class ClassDetailActivty extends AppCompatActivity implements ClassAdapter.ClickListener {
AppPreference appPreference;
Button addBtn;
ServiceApi serviceApi;
RecyclerView recyclerView;
ClassAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_class_detail_activty);
appPreference = new AppPreference(this);
addBtn = findViewById(R.id.btn_add);
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
if (CommonData.getType().equals("student")) {
addBtn.setVisibility(View.INVISIBLE);
}
addBtn.setOnClickListener(v -> {
Intent intent = new Intent(ClassDetailActivty.this, ClassAddActivity.class);
startActivity(intent);
this.finish();
});
recyclerView = (RecyclerView) findViewById(R.id.rvDetails);
adapter = new ClassAdapter(CommonData.getClassDetails(), this, this);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
@Override
public void onItemClicked(int position) {
if (!CommonData.getType().equals("student")) {
CommonData.setSelectedIndex(position);
Intent intent = new Intent(ClassDetailActivty.this, ClassEditActivity.class);
startActivity(intent);
this.finish();
}
}
public void getClassdetails(){
Call<List<ClassDetail>> userCall = serviceApi.classDetails();
userCall.enqueue(new Callback<List<ClassDetail>>() {
@Override
public void onResponse(Call<List<ClassDetail>> call, Response<List<ClassDetail>> response) {
if (!response.body().equals("")) {
CommonData.setClassDetails(response.body());
}
else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<ClassDetail>> call, Throwable t) {
appPreference.showToast(t.getMessage());
}
});
}
@Override
protected void onResume() {
super.onResume();
// getClassdetails();
// adapter.notifyDataSetChanged();
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.app.ProgressDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TimePicker;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import com.symbol.elearningapp.service.StudentDetails;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class ClassEditActivity extends AppCompatActivity {
AppPreference appPreference;
Calendar myCalendar;
EditText etSubject, etDate, etTime;
Button btnDel, btnEdit,btnAdd;
int selectedIndex;
ServiceApi serviceApi;
ProgressDialog progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_class_edit);
appPreference = new AppPreference(this);
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
etDate = findViewById(R.id.etdate1);
etSubject = findViewById(R.id.etsubject1);
etTime = findViewById(R.id.etclasstime1);
btnDel = findViewById(R.id.btn_Delete);
btnEdit = findViewById(R.id.btn_edit);
btnAdd = findViewById(R.id.btn_add);
selectedIndex = CommonData.getSelectedIndex();
etDate.setText(CommonData.getClassDetails().get(selectedIndex).getDate());
etSubject.setText(CommonData.getClassDetails().get(selectedIndex).getSubject());
etTime.setText(CommonData.getClassDetails().get(selectedIndex).getClassTime());
btnEdit.setOnClickListener(view -> {
updateClassdetails();
});
btnDel.setOnClickListener(view -> {
deleteClassdetails();
});
btnAdd.setOnClickListener(v -> {
getStudentList();
});
myCalendar = Calendar.getInstance();
DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
myCalendar.set(Calendar.YEAR, year);
myCalendar.set(Calendar.MONTH, monthOfYear);
myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
updateLabel();
}
};
etDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new DatePickerDialog(ClassEditActivity.this, date, myCalendar
.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
myCalendar.get(Calendar.DAY_OF_MONTH)).show();
}
});
etTime.setOnClickListener(new View.OnClickListener() {
final Calendar c = Calendar.getInstance();
int mHour = c.get(Calendar.HOUR_OF_DAY);
int mMinute = c.get(Calendar.MINUTE);
@Override
public void onClick(View v) {
TimePickerDialog timePickerDialog = new TimePickerDialog(ClassEditActivity.this,
new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker view, int hourOfDay,
int minute) {
etTime.setText(hourOfDay + ":" + String.format("%02d", minute));
}
}, mHour, mMinute, true);
timePickerDialog.show();
}
});
}
private void updateLabel() {
String myFormat = "MM/dd/yy";
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
etDate.setText(sdf.format(myCalendar.getTime()));
}
public void deleteClassdetails() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<String> userCall = serviceApi.deleteUser(CommonData.getClassDetails().get(CommonData.getSelectedIndex()).getId());
userCall.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
if (response.code()==200) {
progress.dismiss();
appPreference.showToast("deleted Sucessfully");
stopActivity();
} else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<String> call, Throwable t) {
appPreference.showToast(t.getMessage());
}
});
}
public void getStudentList() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<List<StudentDetails>> userCall = serviceApi.getStudents("class/students");
userCall.enqueue(new Callback<List<StudentDetails>>() {
@Override
public void onResponse(Call<List<StudentDetails>> call, Response<List<StudentDetails>> response) {
if (response.body()!=null)
{
CommonData.setStudentDetailsList(response.body());
CommonData.setStudentDetailsHashMap(new HashMap<>());
CommonData.setStudentDetailsHashMap(new HashMap<>());
for(StudentDetails details : CommonData.getStudentDetailsList()){
CommonData.getStudentDetailsHashMap().put(details.getStudentName(),details);
}
progress.dismiss();
Intent intent = new Intent(ClassEditActivity.this, StudentListActivity.class);
intent.putExtra("key", "edit");
startActivity(intent);
}
else
{
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<StudentDetails>> call, Throwable t) {
appPreference.showToast(t.getMessage());
progress.dismiss();
}
});
}
public void updateClassdetails() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
String Subject = etSubject.getText().toString();
String Date = etDate.getText().toString();
String time = etTime.getText().toString();
List<StudentDetails> listStudentDetails = new ArrayList<>();
if (CommonData.getSelectedStudentDetailsHashMap()!= null) {
for(Map.Entry<String, StudentDetails> entry : CommonData.getSelectedStudentDetailsHashMap().entrySet()) {
StudentDetails value = entry.getValue();
listStudentDetails.add(value);
}
}
if (TextUtils.isEmpty(Subject)) {
appPreference.showToast("Subject name is required.");
} else if (TextUtils.isEmpty(Date)) {
appPreference.showToast("Please select the date");
} else if (TextUtils.isEmpty(time)) {
appPreference.showToast("Please select the time");
} else {
Call<String> userCall = serviceApi.updateUser(new ClassDetail(CommonData.getClassDetails().get(CommonData.getSelectedIndex()).getId(), Subject, Date, time, listStudentDetails));
userCall.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
if (response.body().equals("ok")) {
progress.dismiss();
appPreference.showToast("updated Sucessfully");
stopActivity();
} else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<String> call, Throwable t) {
appPreference.showToast(t.getMessage());
}
});
}
}
private void stopActivity(){
this.finish();
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.StudentDetails;
import java.util.HashMap;
import java.util.List;
public class CommonData{
public static List<ClassDetail> classDetails;
public static String name;
public static String type;
public static int selectedIndex;
public static String id;
public static List<StudentDetails> studentDetailsList;
public static HashMap<String, StudentDetails> studentDetailsHashMap;
public static HashMap<String, StudentDetails> selectedStudentDetailsHashMap;
public static HashMap<String, StudentDetails> getSelectedStudentDetailsHashMap() {
return selectedStudentDetailsHashMap;
}
public static void setSelectedStudentDetailsHashMap(HashMap<String, StudentDetails> selectedStudentDetailsHashMap) {
CommonData.selectedStudentDetailsHashMap = selectedStudentDetailsHashMap;
}
public static HashMap<String, StudentDetails> getStudentDetailsHashMap() {
return studentDetailsHashMap;
}
public static void setStudentDetailsHashMap(HashMap<String, StudentDetails> studentDetailsHashMap) {
CommonData.studentDetailsHashMap = studentDetailsHashMap;
}
public static List<StudentDetails> getStudentDetailsList() {
return studentDetailsList;
}
public static void setStudentDetailsList(List<StudentDetails> studentDetailsList) {
CommonData.studentDetailsList = studentDetailsList;
}
public static String getId() {
return id;
}
public static void setId(String id) {
CommonData.id = id;
}
public static int getSelectedIndex() {
return selectedIndex;
}
public static void setSelectedIndex(int selectedIndex) {
CommonData.selectedIndex = selectedIndex;
}
public static List<ClassDetail> getClassDetails() {
return classDetails;
}
public static void setClassDetails(List<ClassDetail> classDetails) {
CommonData.classDetails = classDetails;
}
public static String getType() {
return type;
}
public static void setType(String type) {
CommonData.type = type;
}
public static void setName(String name) {
CommonData.name = name;
}
public static String getName() {
return name;
}
}
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import com.symbol.elearningapp.service.StudentDetails;
import com.symbol.elearningapp.service.User;
import java.util.HashMap;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class HomeActivity extends AppCompatActivity {
LinearLayout ll1, ll2, ll3, ll4;
ImageView iv1, iv2, iv3, iv4;
Button bt1, bt2, bt3, bt4;
String type = "student";
AppPreference appPreference;
ServiceApi serviceApi;
ProgressDialog progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
type = CommonData.getType();
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
appPreference = new AppPreference(this);
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 1);
Toast.makeText(this, " Please Grant Permission for Camera", Toast.LENGTH_SHORT).show();
} else if (ActivityCompat.checkSelfPermission(this, Manifest.permission.MODIFY_AUDIO_SETTINGS) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.MODIFY_AUDIO_SETTINGS}, 1);
Toast.makeText(this, " Please Grant Permission for Camera", Toast.LENGTH_SHORT).show();
}
ll1 = findViewById(R.id.llbutton1);
ll2 = findViewById(R.id.llbutton2);
ll3 = findViewById(R.id.llbutton3);
ll4 = findViewById(R.id.llbutton4);
iv1 = findViewById(R.id.ivbutton1);
iv2 = findViewById(R.id.ivbutton2);
iv3 = findViewById(R.id.ivbutton3);
iv4 = findViewById(R.id.ivbutton4);
bt1 = findViewById(R.id.ttbutton1);
bt2 = findViewById(R.id.ttbutton2);
bt3 = findViewById(R.id.ttbutton3);
bt4 = findViewById(R.id.ttbutton4);
populateUI();
}
public void getClassdetails() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<List<ClassDetail>> userCall = serviceApi.classDetails();
userCall.enqueue(new Callback<List<ClassDetail>>() {
@Override
public void onResponse(Call<List<ClassDetail>> call, Response<List<ClassDetail>> response) {
if (!response.body().equals("")) {
CommonData.setClassDetails(response.body());
progress.dismiss();
Intent intent = new Intent(HomeActivity.this, ClassDetailActivty.class);
startActivity(intent);
} else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<ClassDetail>> call, Throwable t) {
appPreference.showToast(t.getMessage());
progress.dismiss();
}
});
}
public void getClassjoindetails() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<List<ClassDetail>> userCall = serviceApi.classDetails();
userCall.enqueue(new Callback<List<ClassDetail>>() {
@Override
public void onResponse(Call<List<ClassDetail>> call, Response<List<ClassDetail>> response) {
if (!response.body().equals("")) {
CommonData.setClassDetails(response.body());
progress.dismiss();
Intent intent = new Intent(HomeActivity.this, JoinClassActivty.class);
startActivity(intent);
} else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<ClassDetail>> call, Throwable t) {
appPreference.showToast(t.getMessage());
progress.dismiss();
}
});
}
public void getAttendanceActivity() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<List<ClassDetail>> userCall = serviceApi.classDetails();
userCall.enqueue(new Callback<List<ClassDetail>>() {
@Override
public void onResponse(Call<List<ClassDetail>> call, Response<List<ClassDetail>> response) {
if (!response.body().equals("")) {
CommonData.setClassDetails(response.body());
progress.dismiss();
Intent intent = new Intent(HomeActivity.this, AttendenceActivity.class);
startActivity(intent);
} else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<ClassDetail>> call, Throwable t) {
appPreference.showToast(t.getMessage());
progress.dismiss();
}
});
}
public void getStudentList() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
Call<List<StudentDetails>> userCall = serviceApi.getStudents("class/students");
userCall.enqueue(new Callback<List<StudentDetails>>() {
@Override
public void onResponse(Call<List<StudentDetails>> call, Response<List<StudentDetails>> response) {
if (response.body()!=null)
{
CommonData.setStudentDetailsList(response.body());
CommonData.setStudentDetailsHashMap(new HashMap<>());
CommonData.setStudentDetailsHashMap(new HashMap<>());
for(StudentDetails details : CommonData.getStudentDetailsList()){
CommonData.getStudentDetailsHashMap().put(details.getStudentName(),details);
}
progress.dismiss();
Intent intent = new Intent(HomeActivity.this, StudentListActivity.class);
intent.putExtra("key", "home");
startActivity(intent);
}
else
{
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<StudentDetails>> call, Throwable t) {
appPreference.showToast(t.getMessage());
progress.dismiss();
}
});
}
public void populateUI() {
if (type.equals("student")) {
ll1.setVisibility(View.VISIBLE);
ll2.setVisibility(View.VISIBLE);
ll3.setVisibility(View.VISIBLE);
ll4.setVisibility(View.INVISIBLE);
iv1.setBackgroundResource(R.drawable.classlogo);
iv2.setBackgroundResource(R.drawable.attendancelogo);
iv3.setBackgroundResource(R.drawable.joinlogo);
bt1.setText("Class Details");
bt2.setText("Attendance");
bt3.setText("Join");
bt1.setOnClickListener(v -> {
getClassdetails();
});
bt2.setOnClickListener(v -> {
getAttendanceActivity();
});
bt3.setOnClickListener(v -> {
getClassjoindetails();
});
} else {
ll1.setVisibility(View.VISIBLE);
ll2.setVisibility(View.VISIBLE);
ll3.setVisibility(View.VISIBLE);
ll4.setVisibility(View.INVISIBLE);
iv1.setBackgroundResource(R.drawable.classlogo);
iv2.setBackgroundResource(R.drawable.attendancelogo);
iv3.setBackgroundResource(R.drawable.joinlogo);
bt1.setText("Class Details");
bt2.setText("Students");
bt3.setText("Start Session");
bt1.setOnClickListener(v -> {
getClassdetails();
});
bt2.setOnClickListener(v -> {
getStudentList();
});
bt3.setOnClickListener(v -> {
getClassjoindetails();
});
}
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.symbol.elearningapp.Adapters.ClassAdapter;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.ClassDetail;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class JoinClassActivty extends AppCompatActivity implements ClassAdapter.ClickListener {
AppPreference appPreference;
Button addBtn;
ServiceApi serviceApi;
RecyclerView recyclerView;
ClassAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_class_detail_activty);
appPreference = new AppPreference(this);
addBtn = findViewById(R.id.btn_add);
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
addBtn.setVisibility(View.INVISIBLE);
addBtn.setOnClickListener(v -> {
Intent intent = new Intent(JoinClassActivty.this, ClassAddActivity.class);
startActivity(intent);
this.finish();
});
recyclerView = (RecyclerView) findViewById(R.id.rvDetails);
adapter = new ClassAdapter(CommonData.getClassDetails(), this, this);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
@Override
public void onItemClicked(int position) {
CommonData.setSelectedIndex(position);
Intent intent = new Intent(JoinClassActivty.this, JoinActivity.class);
startActivity(intent);
this.finish();
}
public void getClassdetails(){
Call<List<ClassDetail>> userCall = serviceApi.classDetails();
userCall.enqueue(new Callback<List<ClassDetail>>() {
@Override
public void onResponse(Call<List<ClassDetail>> call, Response<List<ClassDetail>> response) {
if (!response.body().equals("")) {
CommonData.setClassDetails(response.body());
}
else {
appPreference.showToast("Server Error occured!!");
}
}
@Override
public void onFailure(Call<List<ClassDetail>> call, Throwable t) {
appPreference.showToast(t.getMessage());
}
});
}
@Override
protected void onResume() {
super.onResume();
// getClassdetails();
// adapter.notifyDataSetChanged();
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.Button;
import android.widget.TextView;
import com.symbol.elearningapp.Utils.AppPreference;
import com.symbol.elearningapp.Utils.Constant;
import com.symbol.elearningapp.service.RetrofitClient;
import com.symbol.elearningapp.service.ServiceApi;
import com.symbol.elearningapp.service.User;
import java.sql.SQLOutput;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class LoginActivity extends AppCompatActivity {
Button loginButton;
AppCompatImageView ivStudent, ivTutor;
TextView tvPWD, tvUserName;
ServiceApi serviceApi;
AppPreference appPreference;
String type = "student";
ProgressDialog progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
serviceApi = RetrofitClient.getApiClient(Constant.baseUrl.BASE_URL).create(ServiceApi.class);
appPreference = new AppPreference(this);
loginButton = findViewById(R.id.btn_login);
ivStudent = findViewById(R.id.iv_student);
ivTutor = findViewById(R.id.iv_teacher);
tvPWD = findViewById(R.id.tvPWD);
tvUserName = findViewById(R.id.tvUserName);
ivStudent.setOnClickListener(View -> {
type = "student";
ivStudent.setBackground(ContextCompat.getDrawable(this, R.drawable.darkgrey_back_curved));
ivTutor.setBackground(ContextCompat.getDrawable(this, R.drawable.grey_back_curved));
});
ivTutor.setOnClickListener(View -> {
type = "tutor";
ivTutor.setBackground(ContextCompat.getDrawable(this, R.drawable.darkgrey_back_curved));
ivStudent.setBackground(ContextCompat.getDrawable(this, R.drawable.grey_back_curved));
});
loginButton.setOnClickListener(View -> {
userLogin();
});
}
public void userLogin() {
progress = new ProgressDialog(this);
progress.setTitle("Please wait");
progress.setCancelable(false);
progress.show();
String userName = tvUserName.getText().toString();
String Password = tvPWD.getText().toString();
if (TextUtils.isEmpty(userName)) {
appPreference.showToast("Username is required.");
} else if (TextUtils.isEmpty(Password)) {
appPreference.showToast("Password required");
} else {
// Call<String> userCall = serviceApi.login(new User(type, "bandara.p@gmail.com", "Bandara@123"));
Call<String> userCall = serviceApi.login(new User(type, userName,Password));
userCall.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
String responseString = response.body().toString();
String[] splitStr = responseString.split("\\s+");
if (splitStr[0].equals("student")) {
CommonData.setType("student");
CommonData.setId(splitStr[1]);
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
startActivity(intent);
progress.dismiss();
tvUserName.setText("");
tvPWD.setText("");
}
else if (splitStr[0].equals("tutor")) {
CommonData.setType("tutor");
CommonData.setId(splitStr[1]);
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
startActivity(intent);
progress.dismiss();
tvUserName.setText("");
tvPWD.setText("");
}
else {
appPreference.showToast(response.body());
}
}
@Override
public void onFailure(Call<String> call, Throwable t) {
appPreference.showToast("Server Error.!");
progress.dismiss();
}
});
}
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
ImageView mLogo;
LinearLayout descimage,desctxt;
Animation uptodown,downtoup;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
descimage = (LinearLayout) findViewById(R.id.titleimage);
desctxt = (LinearLayout) findViewById(R.id.titletxt);
mLogo =findViewById(R.id.imageView2);
uptodown = AnimationUtils.loadAnimation(this,R.anim.uptodown);
downtoup = AnimationUtils.loadAnimation(this,R.anim.downtoup);
descimage.setAnimation(uptodown);
desctxt.setAnimation(downtoup);
Thread myThread = new Thread(){
@Override
public void run(){
try {
sleep(5000);
Intent intent = new Intent(getApplicationContext(),LoginActivity.class);
startActivity(intent);
finish();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
};
myThread.start();
}
}
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.app.SearchManager;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SearchView;
import android.widget.Toast;
import com.symbol.elearningapp.service.StudentDetails;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class StudentListActivity extends AppCompatActivity {
SearchView searchView;
ListView listView;
ArrayList<String> list;
ArrayAdapter<String> adapter;
HashMap<String, StudentDetails> selectedStudentDetailsHashMap;
String passedValue;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_student_list);
if (getIntent().getExtras() != null) {
passedValue = getIntent().getStringExtra("key");
}
searchView = (SearchView) findViewById(R.id.searchView);
listView = (ListView) findViewById(R.id.lv1);
selectedStudentDetailsHashMap = new HashMap<>();
list = new ArrayList<>();
for(StudentDetails details : CommonData.getStudentDetailsList()){
list.add(details.getStudentName());
}
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,list);
listView.setAdapter(adapter);
listView.setOnItemClickListener((adapterView, view, i, l) -> {
if(passedValue.equals("edit")){
String s = listView.getItemAtPosition(i).toString();
setStudentList(s);
}
// If you want to close the adapter
});
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
if(list.contains(query)){
adapter.getFilter().filter(query);
}else{
Toast.makeText(StudentListActivity.this, "No Match found",Toast.LENGTH_LONG).show();
}
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
adapter.getFilter().filter(newText);
return false;
}
});
if(passedValue.equals("edit")){
if(CommonData.getClassDetails().get(CommonData.getSelectedIndex()).getListStd() != null){
for(StudentDetails studentDetails :CommonData.getClassDetails().get(CommonData.getSelectedIndex()).getListStd()){
selectedStudentDetailsHashMap.put(studentDetails.getStudentName(),studentDetails);
}
}
}
}
public void setStudentList(String name){
boolean alreadyNotAdded = true;
if (CommonData.getSelectedStudentDetailsHashMap()!=null) {
for(Map.Entry<String, StudentDetails> entry : CommonData.getSelectedStudentDetailsHashMap().entrySet()) {
String key = entry.getKey();
if(name.equals(key)){
alreadyNotAdded = false;
}
}
}
else if(selectedStudentDetailsHashMap!=null){
for(Map.Entry<String, StudentDetails> entry : selectedStudentDetailsHashMap.entrySet()) {
String key = entry.getKey();
if(name.equals(key)){
alreadyNotAdded = false;
}
}
}
if(alreadyNotAdded)
{
for(Map.Entry<String, StudentDetails> entry : CommonData.getStudentDetailsHashMap().entrySet()) {
String key = entry.getKey();
StudentDetails value = entry.getValue();
if(name.equals(key)){
selectedStudentDetailsHashMap.put(key,value);
}
}
Toast.makeText(StudentListActivity.this, "Added sucessfully",Toast.LENGTH_LONG).show();
}
else
{
Toast.makeText(StudentListActivity.this, "Already added",Toast.LENGTH_LONG).show();
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
if(passedValue.equals("edit")){
CommonData.setSelectedStudentDetailsHashMap(selectedStudentDetailsHashMap);
}
}
}
\ No newline at end of file
package com.symbol.elearningapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.TextView;
import java.util.Locale;
public class TimerActivity extends AppCompatActivity {
// before the activity was paused.
// Number of seconds displayed
// on the stopwatch.
private int seconds = 0;
// Is the stopwatch running?
private boolean running;
private boolean wasRunning;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_timer);
if (savedInstanceState != null) {
// Get the previous state of the stopwatch
// if the activity has been
// destroyed and recreated.
seconds
= savedInstanceState
.getInt("seconds");
running
= savedInstanceState
.getBoolean("running");
wasRunning
= savedInstanceState
.getBoolean("wasRunning");
}
runTimer();
}
// Save the state of the stopwatch
// if it's about to be destroyed.
@Override
public void onSaveInstanceState(
Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState
.putInt("seconds", seconds);
savedInstanceState
.putBoolean("running", running);
savedInstanceState
.putBoolean("wasRunning", wasRunning);
}
// If the activity is paused,
// stop the stopwatch.
@Override
protected void onPause()
{
super.onPause();
wasRunning = running;
running = false;
}
// If the activity is resumed,
// start the stopwatch
// again if it was running previously.
@Override
protected void onResume()
{
super.onResume();
if (wasRunning) {
running = true;
}
}
// Start the stopwatch running
// when the Start button is clicked.
// Below method gets called
// when the Start button is clicked.
public void onClickStart(View view)
{
running = true;
}
// Stop the stopwatch running
// when the Stop button is clicked.
// Below method gets called
// when the Stop button is clicked.
public void onClickStop(View view)
{
running = false;
}
// Reset the stopwatch when
// the Reset button is clicked.
// Below method gets called
// when the Reset button is clicked.
public void onClickReset(View view)
{
running = false;
seconds = 0;
}
// Sets the NUmber of seconds on the timer.
// The runTimer() method uses a Handler
// to increment the seconds and
// update the text view.
private void runTimer()
{
// Get the text view.
final TextView timeView
= (TextView)findViewById(
R.id.time_view);
// Creates a new Handler
final Handler handler
= new Handler();
// Call the post() method,
// passing in a new Runnable.
// The post() method processes
// code without a delay,
// so the code in the Runnable
// will run almost immediately.
handler.post(new Runnable() {
@Override
public void run()
{
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
int secs = seconds % 60;
// Format the seconds into hours, minutes,
// and seconds.
String time
= String
.format(Locale.getDefault(),
"%d:%02d:%02d", hours,
minutes, secs);
// Set the text view text.
timeView.setText(time);
// If running is true, increment the
// seconds variable.
if (running) {
seconds++;
}
// Post the code again
// with a delay of 1 second.
handler.postDelayed(this, 1000);
}
});
}
}
package com.symbol.elearningapp;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.camera.core.Camera;
import androidx.camera.core.CameraSelector;
import androidx.camera.core.ImageAnalysis;
import androidx.camera.core.ImageCapture;
import androidx.camera.core.Preview;
import androidx.camera.extensions.HdrImageCaptureExtender;
import androidx.camera.lifecycle.ProcessCameraProvider;
import androidx.camera.view.PreviewView;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleOwner;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.SurfaceView;
import android.widget.Toast;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.concurrent.ExecutionException;
public class TutorJoinActivity extends AppCompatActivity {
SurfaceView surfaceView;
PreviewView mPreviewView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tutor_join);
mPreviewView = findViewById(R.id.previewView);
if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, 1);
Toast.makeText(this, "Grant Permission and restart app", Toast.LENGTH_SHORT).show();
} else {
startCamera();
}
}
private void startCamera() {
final ListenableFuture<ProcessCameraProvider> cameraProviderFuture = ProcessCameraProvider.getInstance(this);
cameraProviderFuture.addListener(new Runnable() {
@Override
public void run() {
try {
ProcessCameraProvider cameraProvider = cameraProviderFuture.get();
bindPreview(cameraProvider);
} catch (ExecutionException | InterruptedException e) {
// No errors need to be handled for this Future.
// This should never be reached.
}
}
}, ContextCompat.getMainExecutor(this));
}
void bindPreview(@NonNull ProcessCameraProvider cameraProvider) {
Preview preview = new Preview.Builder()
.build();
CameraSelector cameraSelector = new CameraSelector.Builder()
.requireLensFacing(CameraSelector.LENS_FACING_FRONT)
.build();
ImageAnalysis imageAnalysis = new ImageAnalysis.Builder()
.build();
ImageCapture.Builder builder = new ImageCapture.Builder();
HdrImageCaptureExtender hdrImageCaptureExtender = HdrImageCaptureExtender.create(builder);
if (hdrImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
hdrImageCaptureExtender.enableExtension(cameraSelector);
}
final ImageCapture imageCapture = builder
.setTargetRotation(this.getWindowManager().getDefaultDisplay().getRotation())
.build();
preview.setSurfaceProvider(mPreviewView.createSurfaceProvider());
Camera camera = cameraProvider.bindToLifecycle((LifecycleOwner) this, cameraSelector, preview, imageAnalysis, imageCapture);
}
}
\ No newline at end of file
package com.symbol.elearningapp.Utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.widget.Toast;
import com.symbol.elearningapp.R;
public class AppPreference {
private SharedPreferences sharedPreferences;
private SharedPreferences.Editor editor;
private Context context;
public AppPreference(Context context){
this.context = context;
sharedPreferences = context.getSharedPreferences(String.valueOf(R.string.s_pref_file), Context.MODE_PRIVATE);
editor = sharedPreferences.edit();
}
public void showToast(String message){
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
}
public void settype(String name){
editor.putString(String.valueOf(R.string.s_pref_type), name);
editor.commit();
}
public String gettype(){
return sharedPreferences.getString(String.valueOf(R.string.s_pref_type), "user");
}
}
\ No newline at end of file
package com.symbol.elearningapp.Utils;
public class Constant {
public static class baseUrl {
public final static String BASE_URL = "https://e-education600.herokuapp.com";
}
}
package com.symbol.elearningapp.service;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class AttendanceDetail {
@SerializedName("userId")
@Expose
private String userId;
@SerializedName("detectedTime")
@Expose
private String detectedTime;
@SerializedName("fullTime")
@Expose
private String fullTime;
@SerializedName("subject")
@Expose
private String subject;
public AttendanceDetail(String userId, String detectedTime, String fullTime, String subject) {
this.userId = userId;
this.detectedTime = detectedTime;
this.fullTime = fullTime;
this.subject = subject;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getDetectedTime() {
return detectedTime;
}
public void setDetectedTime(String detectedTime) {
this.detectedTime = detectedTime;
}
public String getFullTime() {
return fullTime;
}
public void setFullTime(String fullTime) {
this.fullTime = fullTime;
}
public String getSubject() {
return subject;
}
public void setSuject(String suject) {
this.subject = suject;
}
}
package com.symbol.elearningapp.service;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class ChartData {
@SerializedName("real")
@Expose
private Integer real;
@SerializedName("detected")
@Expose
private Integer detected;
public Integer getReal() {
return real;
}
public void setReal(Integer real) {
this.real = real;
}
public Integer getDetected() {
return detected;
}
public void setDetected(Integer detected) {
this.detected = detected;
}
}
\ No newline at end of file
package com.symbol.elearningapp.service;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class ClassDetail {
@SerializedName("id")
@Expose
private String id;
@SerializedName("subject")
@Expose
private String subject;
@SerializedName("date")
@Expose
private String date;
@SerializedName("classTime")
@Expose
private String classTime;
@SerializedName("listStd")
@Expose
private List<StudentDetails> listStd = null;
public ClassDetail(String id, String subject, String date, String classTime, List<StudentDetails> listStd) {
this.id = id;
this.subject = subject;
this.date = date;
this.classTime = classTime;
this.listStd = listStd;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getClassTime() {
return classTime;
}
public void setClassTime(String classTime) {
this.classTime = classTime;
}
public List<StudentDetails> getListStd() {
return listStd;
}
public void setListStd(List<StudentDetails> listStd) {
this.listStd = listStd;
}
}
package com.symbol.elearningapp.service;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.scalars.ScalarsConverterFactory;
public class RetrofitClient {
public static Retrofit getApiClient(String baseUrl){
Gson gson = new GsonBuilder()
.setLenient()
.create();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create(gson))
.build();
return retrofit;
}
}
package com.symbol.elearningapp.service;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.Url;
public interface ServiceApi {
@POST("/login")
Call<String> login(@Body User body);
@GET("/class")
Call<List<ClassDetail>> classDetails();
@POST("/class")
Call<ClassDetail> addClassDetail(@Body ClassDetail body);
@PUT("/class")
Call<String> updateUser(@Body ClassDetail body);
@DELETE("/class")
Call<String> deleteUser(@Query("id") String id);
@POST("/atd")
Call<AttendanceDetail> addAttendance(@Body AttendanceDetail body);
@GET()
Call<ChartData> getAttendance(@Url String url);
@GET()
Call<List<StudentDetails>> getStudents(@Url String url);
}
package com.symbol.elearningapp.service;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class StudentDetails {
@SerializedName("id")
@Expose
private String id;
@SerializedName("student_name")
@Expose
private String studentName;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
}
package com.symbol.elearningapp.service;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class User {
private String role;
private String username;
private String password;
public User(String role, String username, String password) {
this.role = role;
this.username = username;
this.password = password;
}
public User(String username, String password) {
this.username = username;
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:toYDelta="0%p"
android:fromYDelta="100%p"
android:duration="3000"/>
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:duration="2000"
android:fromYDelta="-100%p"
android:fromXDelta="0%p"/>
</set>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/button_grey"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/colorPrimaryDark"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FAFAFA"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/appbackground"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/btn_dropdown"
android:spinnerMode="dropdown"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TextView
android:id="@+id/tvsubject"
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="match_parent"
android:gravity="center"
android:textStyle="bold"
android:text="Absent"
android:textSize="@dimen/_15ssp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2">
<org.eazegraph.lib.charts.PieChart
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/piechart"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="6dp"
android:layout_weight="1"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:layout_marginBottom="15dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:layout_height="match_parent">
<View
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:background="@color/button_green"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="match_parent"
android:gravity="center"
android:textStyle="bold"
android:text="Present"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="1">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center"
android:layout_height="match_parent">
<View
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:background="@color/colorAccent"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp" />
</LinearLayout>
<TextView
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="match_parent"
android:gravity="center"
android:textStyle="bold"
android:text="Absent"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:layout_marginStart="@dimen/_20sdp"
android:layout_marginEnd="@dimen/_20sdp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="Total Sessions"
android:textSize="@dimen/_12ssp"/>
<TextView
android:background="@color/white"
android:id="@+id/tvTotal"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="0"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="Present"
android:textSize="@dimen/_12ssp"/>
<TextView
android:background="@color/white"
android:id="@+id/tvPresent"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="0"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="1">
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="Absent"
android:textSize="@dimen/_12ssp"/>
<TextView
android:background="@color/white"
android:id="@+id/tvAbsent"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center"
android:textStyle="bold"
android:text="0"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
tools:context=".ClassEditActivity">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_30sdp"
android:background="@drawable/white_curved"
android:padding="@dimen/_5sdp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Subject"
android:gravity="center"
android:textSize="@dimen/_14ssp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Date"
android:gravity="center"
android:textSize="@dimen/_14ssp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Class Time"
android:gravity="center"
android:textSize="@dimen/_14ssp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<EditText
android:id="@+id/etsubject"
android:layout_width="match_parent"
android:layout_height="0dp"
android:maxLines="1"
android:layout_weight="1"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
<EditText
android:id="@+id/etdate"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
<EditText
android:id="@+id/etclasstime"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
</LinearLayout>
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_50sdp"
android:layout_marginRight="@dimen/_50sdp"
android:stateListAnimator="@null"
android:text="ADD"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
android:orientation="vertical"
tools:context=".ClassDetailActivty">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="ADD"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvDetails"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/_2sdp"
android:layout_weight="15" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
tools:context=".ClassEditActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
android:layout_margin="@dimen/_30sdp"
android:padding="@dimen/_5sdp"
android:background="@drawable/grey_back_curved"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:textStyle="bold"
android:text="Subject"
android:gravity="center"
android:textSize="@dimen/_14ssp"/>
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:textStyle="bold"
android:gravity="center"
android:text="Date"
android:textSize="@dimen/_14ssp"/>
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:textStyle="bold"
android:gravity="center"
android:text="Class Time"
android:textSize="@dimen/_14ssp"/>
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:textStyle="bold"
android:gravity="center"
android:text="Students"
android:textSize="@dimen/_14ssp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_Delete"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="DELETE"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="@dimen/_10ssp"
app:backgroundTint="@color/colorAccent"
app:cornerRadius="7dp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<EditText
android:id="@+id/etsubject1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:maxLines="1"
android:layout_weight="1"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
<EditText
android:id="@+id/etdate1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
<EditText
android:id="@+id/etclasstime1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:gravity="center_vertical"
android:textSize="@dimen/_14ssp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_add"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Add Students"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/button_green"
app:cornerRadius="7dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_edit"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="EDIT"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
android:orientation="vertical"
tools:context=".HomeActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="2"
android:padding="@dimen/_5sdp">
<LinearLayout
android:id="@+id/llbutton1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/white_curved"
android:orientation="vertical"
android:gravity="center"
android:padding="@dimen/_5sdp"
android:layout_margin="@dimen/_3sdp">
<ImageView
android:id="@+id/ivbutton1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="center"
android:scaleType="fitCenter"
/>
<com.google.android.material.button.MaterialButton
android:id="@+id/ttbutton1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/llbutton2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/white_curved"
android:orientation="vertical"
android:gravity="center"
android:padding="@dimen/_5sdp"
android:layout_margin="@dimen/_3sdp">
<ImageView
android:id="@+id/ivbutton2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="center"
android:scaleType="fitCenter" />
<com.google.android.material.button.MaterialButton
android:id="@+id/ttbutton2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="2"
android:padding="@dimen/_5sdp">
<LinearLayout
android:id="@+id/llbutton3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/white_curved"
android:orientation="vertical"
android:gravity="center"
android:padding="@dimen/_5sdp"
android:layout_margin="@dimen/_3sdp">
<ImageView
android:id="@+id/ivbutton3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="center"
android:scaleType="fitCenter" />
<com.google.android.material.button.MaterialButton
android:id="@+id/ttbutton3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/llbutton4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/white_curved"
android:orientation="vertical"
android:gravity="center"
android:padding="@dimen/_5sdp"
android:layout_margin="@dimen/_3sdp">
<ImageView
android:id="@+id/ivbutton4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_gravity="center"
android:scaleType="fitCenter"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/ttbutton4"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".JoinActivity">
<WebView
android:id="@+id/previewView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_marginEnd="@dimen/_2sdp"
android:layout_marginStart="@dimen/_2sdp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
android:background="@drawable/white_curved">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="TextView" />
<TextView
android:id="@+id/time_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="@android:style/TextAppearance.Large" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_exit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_50sdp"
android:layout_marginRight="@dimen/_50sdp"
android:stateListAnimator="@null"
android:text="Exit Session"
android:textAllCaps="false"
android:textColor="@color/white"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/_20sdp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingTop="@dimen/_10sdp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select your user type:"
android:textSize="@dimen/_20ssp" />
</RelativeLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_student"
android:layout_width="0dp"
android:layout_height="@dimen/_60ssp"
android:layout_weight="1"
android:background="@drawable/darkgrey_back_curved"
android:padding="@dimen/_5ssp"
android:src="@drawable/userimg" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_teacher"
android:layout_width="0dp"
android:layout_height="@dimen/_60ssp"
android:layout_weight="1"
android:background="@drawable/grey_back_curved"
android:padding="@dimen/_5ssp"
android:src="@drawable/tutor" />
</androidx.appcompat.widget.LinearLayoutCompat>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingTop="@dimen/_10sdp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/text_input_layoutuseridtext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:background="@drawable/white_curved">
<EditText
android:layout_marginEnd="@dimen/_3sdp"
android:layout_marginStart="@dimen/_3sdp"
android:id="@+id/tvUserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:text=""
android:background="@drawable/white_curved"/>
</com.google.android.material.textfield.TextInputLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingTop="@dimen/_10sdp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/text_input_layoutpasswordtxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:background="@drawable/white_curved">
<EditText
android:layout_marginEnd="@dimen/_3sdp"
android:layout_marginStart="@dimen/_3sdp"
android:id="@+id/tvPWD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:text=""
android:background="@drawable/white_curved"/>
</com.google.android.material.textfield.TextInputLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:paddingTop="@dimen/_10sdp">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_marginRight="@dimen/_20sdp"
android:layout_marginBottom="@dimen/_12sdp"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Login"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="@dimen/_20ssp"
app:backgroundTint="@color/colorPrimaryAccentBlue"
app:cornerRadius="7dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/_20sdp"
android:layout_marginRight="@dimen/_20sdp"
android:gravity="center"
android:letterSpacing="0"
android:stateListAnimator="@null"
android:text="Sign up"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="@dimen/_20ssp"
app:backgroundTint="@color/colorAccent"
app:cornerRadius="7dp" />
</RelativeLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/appbackground"
android:orientation="vertical"
android:paddingTop="@dimen/_20sdp">
<LinearLayout
android:id="@+id/titleimage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="@dimen/_100sdp">
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/_100sdp"
android:layout_height="@dimen/_100sdp"
android:layout_gravity="center"
app:srcCompat="@drawable/logo" />
<TextView
android:id="@+id/splashText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/chakrapetchbold"
android:text="SMART COACH"
android:textAlignment="center"
android:textColor="@color/blue"
android:textSize="@dimen/_20ssp" />
</LinearLayout>
<LinearLayout
android:id="@+id/titletxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/splashDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/cabinsketchregular"
android:text="Discover best classes for the best learning"
android:textAlignment="center"
android:textColor="@color/colorAccent"
android:textSize="@dimen/_15ssp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/_2sdp">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/lv1"
android:divider="#ad5"
android:dividerHeight="2dp"
android:layout_below="@+id/searchView"/>
<SearchView
android:id="@+id/searchView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:queryHint="Search Here"
android:iconifiedByDefault="false"
android:layout_alignParentTop="true"
/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#0F9D58"
android:padding="16dp">
<TextView
android:id="@+id/time_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAppearance="@android:style/TextAppearance.Large"
android:textSize="56sp" />
<Button
android:id="@+id/start_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:onClick="onClickStart"
android:text="start" />
<Button
android:id="@+id/stop_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:onClick="onClickStop"
android:text="stop" />
<Button
android:id="@+id/reset_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:onClick="onClickReset"
android:text="reset" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".TutorJoinActivity">
<androidx.camera.view.PreviewView
android:id="@+id/previewView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/lvitems"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeightLarge"
android:background="@drawable/grey_back_curved"
android:orientation="horizontal"
android:layout_marginBottom="@dimen/_2sdp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/book"
android:contentDescription="Icon" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="6">
<TextView
android:id="@+id/tvSubject"
android:layout_width="0dp"
android:layout_weight="3"
android:layout_height="match_parent"
android:gravity="center"
android:textStyle="bold"
android:textSize="@dimen/_16ssp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textStyle="bold"
android:text="Date"
android:textSize="@dimen/_12ssp"/>
<TextView
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textStyle="bold"
android:text="Class Time"
android:textSize="@dimen/_12ssp"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:orientation="vertical">
<TextView
android:id="@+id/tvdate"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textSize="@dimen/_10ssp"/>
<TextView
android:id="@+id/tvclasstime"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:gravity="center_vertical"
android:textSize="@dimen/_10ssp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_bg"/>
<foreground android:drawable="@mipmap/ic_launcher_foreg"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_bg"/>
<foreground android:drawable="@mipmap/ic_launcher_foreg"/>
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ELearningApp" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
<color name="colorPrimaryAccentBlue">#72BCDD</color>
<color name="colorPrimaryBlue">#03A9F4</color>
<color name="blue">#3C65FB</color>
<color name="button_grey">#CCCCCC</color>
<color name="button_green">#4CAF50</color>
<color name="light_blue">#84D7FD</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">SMART COACH</string>
<string name="s_pref_type">sh_preference_type</string>
<string name="s_pref_file">sh_preference_file</string>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ELearningApp" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
package com.symbol.elearningapp;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
\ No newline at end of file
#Sat Sep 04 09:57:00 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "ELearningApp"
include ':app'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment