Commit 9e641a73 authored by Anjali W.M.S's avatar Anjali W.M.S

add files

parent c108e5df
#Sat Jan 07 15:33:09 IST 2023
gradle.version=6.1.1
# Default ignored files
/shelf/
/workspace.xml
salonAppNew
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WizardSettings">
<option name="children">
<map>
<entry key="vectorWizard">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="vectorAssetStep">
<value>
<PersistentState>
<option name="children">
<map>
<entry key="clipartAsset">
<value>
<PersistentState>
<option name="values">
<map>
<entry key="url" value="file:$USER_HOME$/Library/Android/sdk/icons/material/materialicons/assignment/baseline_assignment_24.xml" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
<option name="values">
<map>
<entry key="outputName" value="ic_baseline_assignment_24" />
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</PersistentState>
</value>
</entry>
</map>
</option>
</component>
</project>
\ No newline at end of file
<?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="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\D\.android\avd\Pixel_3a_API_30.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-04-19T07:11:31.954862100Z" />
</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="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</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="app/src/main/res/drawable-v24/acc_icon.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/home_icon.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/info.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/more.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/power.xml" value="0.1485" />
<entry key="app/src/main/res/drawable-v24/roundedbutton.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/border_round.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/button_circle.xml" value="0.1" />
<entry key="app/src/main/res/drawable/button_circle_list.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/button_circle_no_color.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/button_circle_white.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_assignment_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_bookmark_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_home_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_menu_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_person_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_baseline_settings_24.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_dashboard_black_24dp.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_home_black_24dp.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_menu_gallery.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_menu_slideshow.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/ic_notifications_black_24dp.xml" value="0.1485" />
<entry key="app/src/main/res/drawable/side_nav_bar.xml" value="0.1485" />
<entry key="app/src/main/res/layout/activity_about.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_addapoint.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_addcompany.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_addcustomer.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_addproduct.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_adhdhome.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_admin_show_company.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_admin_show_customers.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_category.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_customer_appoinments.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_customer_products.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_daily_activities.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/activity_dashboard.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_day.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/activity_displayappoi.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_drawer.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_edit_appointments.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_edit_product.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_editcustomer.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_editsalondetails.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_home.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_home2.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_login.xml" value="0.24564056396484377" />
<entry key="app/src/main/res/layout/activity_login_admin.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_manageproduct.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_medicine_week_activities.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_new_dashboard.xml" value="0.11651469098277609" />
<entry key="app/src/main/res/layout/activity_newact.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_newlogin.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_news.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_notification.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_offers.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_product_show_in_salon.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_profile.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_registeras.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_salon_appoinment_show.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/activity_salon_home.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_salonchair.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_select_district.xml" value="0.18048858642578128" />
<entry key="app/src/main/res/layout/activity_selectsalon.xml" value="0.1" />
<entry key="app/src/main/res/layout/activity_serch_district.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_serchnearsal.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_serchprod.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/activity_show_products_in_customer.xml" value="0.10833333333333334" />
<entry key="app/src/main/res/layout/admin_show_company.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/admin_show_customer_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/app_bar_main.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/comment_list_item.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/content_main.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/customer_appoinments_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/customer_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/customer_product_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/daily_activities_list.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/district_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/fragment_dashboard.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/fragment_gallery.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/fragment_home.xml" value="0.1" />
<entry key="app/src/main/res/layout/fragment_medicine.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/fragment_new_home.xml" value="0.2446334838867187" />
<entry key="app/src/main/res/layout/fragment_notifications.xml" value="0.3098958333333333" />
<entry key="app/src/main/res/layout/fragment_profile.xml" value="0.2772796630859375" />
<entry key="app/src/main/res/layout/fragment_reports.xml" value="0.33983612060546875" />
<entry key="app/src/main/res/layout/main_toolbar.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/medicines_list_week.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/medicines_list_week_activities.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/nav_header_main.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/layout/product_list.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/menu/activity_main_drawer.xml" value="0.23958333333333334" />
<entry key="app/src/main/res/menu/bottom_nav_menu.xml" value="0.1" />
<entry key="app/src/main/res/menu/bottom_nav_menu_adhd.xml" value="0.1" />
<entry key="app/src/main/res/menu/home.xml" value="0.23958333333333334" />
</map>
</option>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="navEditor-manualLayoutAlgorithm2">
<option name="myPositions">
<map>
<entry key="mobile_navigation2.xml">
<value>
<LayoutPositions>
<option name="myPositions">
<map>
<entry key="navigation_dashboard">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="256" />
<option name="y" value="12" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="navigation_home">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="12" />
<option name="y" value="12" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
<entry key="navigation_notifications">
<value>
<LayoutPositions>
<option name="myPosition">
<Point>
<option name="x" value="12" />
<option name="y" value="368" />
</Point>
</option>
</LayoutPositions>
</value>
</entry>
</map>
</option>
</LayoutPositions>
</value>
</entry>
</map>
</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
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 31
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.example.salonappnew"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
viewBinding {
enabled true
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.3.0'
implementation 'androidx.navigation:navigation-ui:2.3.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.google.firebase:firebase-auth:19.4.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-analytics:17.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.firebase:firebase-storage:19.2.0'
implementation 'com.google.firebase:firebase-firestore:23.0.3'
implementation 'app.futured.donut:donut:2.2.2'
}
\ No newline at end of file
{
"project_info": {
"project_number": "818932182368",
"project_id": "adhd-diary",
"storage_bucket": "adhd-diary.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:818932182368:android:05a68ddd9c4e0126db8205",
"android_client_info": {
"package_name": "com.example.salonappnew"
}
},
"oauth_client": [
{
"client_id": "818932182368-r6rjem109hj8p63sg184j2oug78mf78u.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyA_k178XnDAZfKxTrYnfoy4ZDsXRj5QT3Q"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "818932182368-r6rjem109hj8p63sg184j2oug78mf78u.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ 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.example.salonappnew;
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.example.salonappnew", 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.example.salonappnew">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<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/AppTheme">
<activity
android:name=".DayActivity"
android:exported="false" />
<activity
android:name=".DailyActivities"
android:exported="false" />
<activity
android:name=".MedicineWeekActivities"
android:exported="false" />
<activity
android:name=".ADHDHome"
android:exported="false" />
<activity android:name=".login"
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.example.salonappnew;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.os.Bundle;
import com.example.salonappnew.databinding.ActivityAdhdhomeBinding;
public class ADHDHome extends AppCompatActivity {
ActivityAdhdhomeBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityAdhdhomeBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
replaceFragment(new NewHomeFragment());
binding.bottomNav.setOnNavigationItemSelectedListener(item -> {
switch (item.getItemId()){
case R.id.home:
replaceFragment(new NewHomeFragment());
break;
case R.id.profile:
replaceFragment(new ProfileFragment());
break;
case R.id.reports:
replaceFragment(new ReportsFragment());
break;
case R.id.medicines:
replaceFragment(new MedicineFragment());
break;
}
return true;
});
}
private void replaceFragment(Fragment fragment){
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.frameLayout,fragment);
fragmentTransaction.commit();
}
}
\ No newline at end of file
package com.example.salonappnew;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import android.widget.Toast;
import com.example.salonappnew.models.Comments;
import com.example.salonappnew.models.MedicineWeek;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import java.util.ArrayList;
public class CommentAdapter extends BaseAdapter {
//Firebase storage
FirebaseAuth mFirebaseAuth;
FirebaseStorage storage;
StorageReference storageReference;
FirebaseFirestore db = FirebaseFirestore.getInstance();
Context c;
ArrayList<Comments> originalArray,tmpArray;
public CommentAdapter(Context c, ArrayList<Comments> originalArray){
this.c = c;
this.originalArray = originalArray;
this.tmpArray = originalArray;
}
@Override
public Object getItem(int position) {
return originalArray.get(position);
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.comment_list_item,null);
TextView txtComment =row.findViewById(R.id.txtComment);
if(originalArray.get(position).isParentComment){
txtComment.setText(originalArray.get(position).getpComment());
}else {
txtComment.setText(originalArray.get(position).getdComment());
}
row.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//INTENT to medicine activities week -> MedicineWeekActivities.java
}
});
return row;
}
@Override
public int getCount() {
return originalArray.size();
}
@Override
public long getItemId(int position) {
return position;
}
}
\ No newline at end of file
package com.example.salonappnew;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;
import com.example.salonappnew.models.DailyActivity;
import com.example.salonappnew.models.MedicineWeek;
import com.example.salonappnew.models.MedicineWeekActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.ArrayList;
public class DailyActivities extends AppCompatActivity {
ArrayList<DailyActivity> myList;
DailyActivitiesAdapter myAdapter;
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth mFirebaseAuth = FirebaseAuth.getInstance();
TextView txtBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_daily_activities);
TextView txtWeekNumber =findViewById(R.id.txtWeekNumber);
TextView txtWeekText =findViewById(R.id.txtWeekText);
txtBack = findViewById(R.id.txtBack);
txtBack.setText("< Back");
Intent intent = getIntent();
String weekNumber = intent.getStringExtra("txtWeekNumber");
String weekText = intent.getStringExtra("txtWeekText");
txtWeekNumber.setText(weekNumber);
txtWeekText.setText(weekText);
ListView customerList =(ListView) findViewById(R.id.listItems);
// qiLfaPlXfwgIGsnOmCWq1iGFi2S2
myList = new ArrayList<>();
//Start database
FirebaseUser user = mFirebaseAuth.getCurrentUser();
db.collection("dailyActivities").whereEqualTo("uid",user.getUid()).whereEqualTo("weekText",weekText).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
myList = new ArrayList<>();
for (QueryDocumentSnapshot document : task.getResult()) {
Log.d("chata",document.toString());
DailyActivity dailyActivity = document.toObject(DailyActivity.class);
dailyActivity.setDocId(document.getId());
dailyActivity.setWeekNumber(weekNumber);
dailyActivity.setWeekText(weekText);
myList.add(dailyActivity);
}
myAdapter = new DailyActivitiesAdapter(DailyActivities.this,myList);
customerList.setAdapter(myAdapter);
} else {
Log.d("chata", "Error getting documents: ", task.getException());
}
}
});
//End database
txtBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent( DailyActivities.this, MedicineWeekActivities.class);
intent.putExtra("txtWeekNumber", weekNumber);
intent.putExtra("txtWeekText", weekText);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.salonappnew;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import android.widget.Toast;
import com.example.salonappnew.models.DailyActivity;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import java.util.ArrayList;
public class DailyActivitiesAdapter extends BaseAdapter implements Filterable {
//Firebase storage
FirebaseAuth mFirebaseAuth;
FirebaseStorage storage;
StorageReference storageReference;
private DatabaseReference mFDb;
private FirebaseDatabase mFirebaseInstant;
Context c;
ArrayList<DailyActivity> originalArray,tmpArray;
///filter
CustomFilter cs;
///filter
String img = "";
public DailyActivitiesAdapter(Context c, ArrayList<DailyActivity> originalArray){
this.c = c;
this.originalArray = originalArray;
this.tmpArray = originalArray;
}
@Override
public Object getItem(int position) {
return originalArray.get(position);
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.daily_activities_list,null);
TextView txtTaskText =row.findViewById(R.id.txtTaskText);
TextView txtTaskTitle =row.findViewById(R.id.txtTaskTitle);
txtTaskText.setText(originalArray.get(position).getTaskText());
txtTaskTitle.setText(originalArray.get(position).getTaskName());
row.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(c, DayActivity.class);
// //TODO update putExtra variables
intent.putExtra("docId", originalArray.get(position).getDocId());
intent.putExtra("weekText", originalArray.get(position).getWeekText());
intent.putExtra("weekNumber", originalArray.get(position).getWeekNumber());
c.startActivity(intent);
Toast.makeText(c, originalArray.get(position).getTaskName() + " was clicked", Toast.LENGTH_SHORT).show();
((Activity) c).finish();
}
});
return row;
}
@Override
public int getCount() {
return originalArray.size();
}
@Override
public long getItemId(int position) {
return position;
}
///Codes for filter
@Override
public Filter getFilter() {
if(cs == null){
cs = new CustomFilter();
}
return cs;
}
class CustomFilter extends Filter {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
if(constraint != null && constraint.length() > 0) {
constraint = constraint.toString().toUpperCase();
ArrayList<DailyActivity> filters = new ArrayList<>();
for (int i = 0; i < tmpArray.size(); i++) {
if (tmpArray.get(i).getTaskText().toUpperCase().contains(constraint)) {
DailyActivity singleRow = new DailyActivity(tmpArray.get(i).getTaskText(),tmpArray.get(i).getTaskText(),tmpArray.get(i).getDocId(),"");
filters.add(singleRow);
}
}
results.count = filters.size();
results.values = filters;
}else {
results.count = tmpArray.size();
results.values = tmpArray;
}
return results;
}
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
originalArray = (ArrayList<DailyActivity>)results.values;
notifyDataSetChanged();
}
}
///Codes for filter
}
\ No newline at end of file
package com.example.salonappnew;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.example.salonappnew.models.DailyActivity;
import com.example.salonappnew.models.User;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
public class DayActivity extends AppCompatActivity {
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth mFirebaseAuth = FirebaseAuth.getInstance();
TextView textWeekText,txtWeekNumber,txtTaskName,txtTaskText;
EditText editComment;
RadioGroup radioGroup;
RadioButton radioButtonComplete,radioButtonInProgress,radioButtonNotComplete;
String progressStatus,dComment;
Button btnSave;
DailyActivity dailyActivity;
TextView txtBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_day);
txtBack = findViewById(R.id.txtBack);
txtBack.setText("< Back");
textWeekText = findViewById(R.id.textWeekText);
txtWeekNumber = findViewById(R.id.txtWeekNumber);
txtTaskName = findViewById(R.id.txtTaskName);
txtTaskText = findViewById(R.id.txtTaskText);
editComment = findViewById(R.id.editComment);
radioGroup = findViewById(R.id.radioGroup);
radioButtonComplete = findViewById(R.id.radioButtonComplete);
radioButtonInProgress = findViewById(R.id.radioButtonInProgress);
radioButtonNotComplete = findViewById(R.id.radioButtonNotComplete);
btnSave = findViewById(R.id.btnSave);
// radioGroup.clearCheck();
radioGroup.setOnCheckedChangeListener(
new RadioGroup
.OnCheckedChangeListener() {
@Override
// The flow will come here when
// any of the radio buttons in the radioGroup
// has been clicked
// Check which radio button has been clicked
public void onCheckedChanged(RadioGroup group,
int checkedId)
{
Log.d("chata","radia button"+checkedId);
// Get the selected Radio Button
RadioButton
radioButton
= (RadioButton)group
.findViewById(checkedId);
Log.d("chata",radioButton.getText().toString());
progressStatus = radioButton.getText().toString();
Toast.makeText(DayActivity.this,
radioButton.getText(),
Toast.LENGTH_SHORT)
.show();
}
});
Intent intent = getIntent();
String docId = intent.getStringExtra("docId");
String weekNumber = intent.getStringExtra("weekNumber");
String weekText = intent.getStringExtra("weekText");
textWeekText.setText(weekText);
txtWeekNumber.setText(weekNumber);
Log.d("chata","doc id is "+docId);
//Start take data
FirebaseUser user = mFirebaseAuth.getCurrentUser();
db.collection("dailyActivities").document(docId).get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
@Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
dailyActivity = documentSnapshot.toObject(DailyActivity.class);
txtTaskName.setText(dailyActivity.getTaskName());
txtTaskText.setText(dailyActivity.getTaskText());
editComment.setText(dailyActivity.getpComment());
dComment = dailyActivity.getdComment();
if(dailyActivity.getProgressStatus().equals("Complete")){
radioButtonComplete.setChecked(true);
radioButtonInProgress.setChecked(false);
radioButtonNotComplete.setChecked(false);
}else if(dailyActivity.getProgressStatus().equals("In Progress")){
radioButtonComplete.setChecked(false);
radioButtonInProgress.setChecked(true);
radioButtonNotComplete.setChecked(false);
}else{
radioButtonComplete.setChecked(false);
radioButtonInProgress.setChecked(false);
radioButtonNotComplete.setChecked(true);
}
}
});
//End take data
btnSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Calendar c = Calendar.getInstance();
int month =
c.get(Calendar.MONTH);
String comment = editComment.getText().toString();
Map<String, Object> data = new HashMap<>();
data.put("taskName", dailyActivity.getTaskName());
data.put("taskText", dailyActivity.getTaskText());
data.put("progressStatus", progressStatus);
data.put("pComment",comment );
data.put("month",month+"" );
data.put("weekText",weekText );
data.put("dComment",dComment );
data.put("uid", user.getUid());
db.collection("dailyActivities").document(docId)
.set(data)
.addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Log.d("chata", "DocumentSnapshot successfully written!");
Toast.makeText(DayActivity.this,
"Done",
Toast.LENGTH_SHORT)
.show();
try{
Intent intent = new Intent(DayActivity.this, DailyActivities.class);
intent.putExtra("txtWeekNumber", weekNumber);
intent.putExtra("txtWeekText", weekText);
startActivity(intent);
}finally {
finish();
}
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.w("chata", "Error writing document", e);
}
});
}
});
txtBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(DayActivity.this, DailyActivities.class);
// //TODO update putExtra variables
intent.putExtra("docId", docId);
intent.putExtra("weekText", weekText);
intent.putExtra("weekNumber", weekNumber);
startActivity(intent);
finish();
}
});
}
}
\ No newline at end of file
package com.example.salonappnew;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ListView;
import com.example.salonappnew.models.MedicineWeek;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.ArrayList;
import java.util.List;
/**
* A simple {@link Fragment} subclass.
* Use the {@link MedicineFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class MedicineFragment extends Fragment {
// implements TextWatcher
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
ArrayList<MedicineWeek> myList;
MedicineShowWeekAdapter myAdapter;
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth mFirebaseAuth = FirebaseAuth.getInstance();
public MedicineFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment MedicineFragment.
*/
// TODO: Rename and change types and number of parameters
public static MedicineFragment newInstance(String param1, String param2) {
MedicineFragment fragment = new MedicineFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_medicine, container, false);
// EditText searchCustomers =(EditText) rootView.findViewById(R.id.txtsearchCustomers);
ListView customerList =(ListView) rootView.findViewById(R.id.listProducts);
// searchCustomers.addTextChangedListener(this);
// Take data from firestore
FirebaseUser user = mFirebaseAuth.getCurrentUser();
//Start take data
db.collection("medicines").whereEqualTo("uid",user.getUid()).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
myList = new ArrayList<>();
for (QueryDocumentSnapshot document : task.getResult()) {
Log.d("chata",document.toString());
MedicineWeek medicineWeek = document.toObject(MedicineWeek.class);
myList.add(medicineWeek);
}
myAdapter = new MedicineShowWeekAdapter(getContext(),myList);
customerList.setAdapter(myAdapter);
} else {
Log.d("chata", "Error getting documents: ", task.getException());
}
}
});
//End take data
return rootView;
}
// @Override
// public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
//
// }
//
// @Override
// public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
// this.myAdapter.getFilter().filter(charSequence);
// }
//
// @Override
// public void afterTextChanged(Editable editable) {
//
// }
}
\ No newline at end of file
package com.example.salonappnew;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import android.widget.Toast;
import com.example.salonappnew.models.MedicineWeek;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import java.util.ArrayList;
public class MedicineShowWeekAdapter extends BaseAdapter implements Filterable {
//Firebase storage
FirebaseAuth mFirebaseAuth;
FirebaseStorage storage;
StorageReference storageReference;
FirebaseFirestore db = FirebaseFirestore.getInstance();
Context c;
ArrayList<MedicineWeek> originalArray,tmpArray;
///filter
CustomFilter cs;
///filter
String img = "";
public MedicineShowWeekAdapter(Context c, ArrayList<MedicineWeek> originalArray){
this.c = c;
this.originalArray = originalArray;
this.tmpArray = originalArray;
}
@Override
public Object getItem(int position) {
return originalArray.get(position);
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.medicines_list_week,null);
TextView txtWeekNumber =row.findViewById(R.id.txtWeekNumber);
TextView txtWeekText =row.findViewById(R.id.txtWeekText);
txtWeekNumber.setText(originalArray.get(position).getWeekNumber());
txtWeekText.setText(originalArray.get(position).getWeekText());
row.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//INTENT to medicine activities week -> MedicineWeekActivities.java
Intent intent = new Intent(c, MedicineWeekActivities.class);
//TODO update putExtra variables
intent.putExtra("txtWeekNumber", originalArray.get(position).getWeekNumber());
intent.putExtra("txtWeekText", originalArray.get(position).getWeekText());
c.startActivity(intent);
Toast.makeText(c, originalArray.get(position).getWeekText() + " was clicked", Toast.LENGTH_SHORT).show();
((Activity) c).finish();
}
});
return row;
}
@Override
public int getCount() {
return originalArray.size();
}
@Override
public long getItemId(int position) {
return position;
}
///Codes for filter
@Override
public Filter getFilter() {
if(cs == null){
cs = new CustomFilter();
}
return cs;
}
class CustomFilter extends Filter {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
if(constraint != null && constraint.length() > 0) {
constraint = constraint.toString().toUpperCase();
ArrayList<MedicineWeek> filters = new ArrayList<>();
for (int i = 0; i < tmpArray.size(); i++) {
if (tmpArray.get(i).getWeekNumber().toUpperCase().contains(constraint)) {
MedicineWeek singleRow = new MedicineWeek(tmpArray.get(i).getWeekNumber(),tmpArray.get(i).getWeekText());
filters.add(singleRow);
}
}
results.count = filters.size();
results.values = filters;
}else {
results.count = tmpArray.size();
results.values = tmpArray;
}
return results;
}
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
originalArray = (ArrayList<MedicineWeek>)results.values;
notifyDataSetChanged();
}
}
///Codes for filter
}
\ No newline at end of file
package com.example.salonappnew;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import com.example.salonappnew.models.MedicineWeek;
import com.example.salonappnew.models.MedicineWeekActivity;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.ArrayList;
public class MedicineWeekActivities extends AppCompatActivity {
ArrayList<MedicineWeekActivity> myList;
MedicineWeekActivitiesAdapter myAdapter;
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth mFirebaseAuth = FirebaseAuth.getInstance();
Button viewDailyButton;
TextView txtBack;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_medicine_week_activities);
ListView customerList =(ListView) findViewById(R.id.listItems);
Button viewDailyButton = (Button) findViewById(R.id.viewDailyButton);
TextView txtWeekNumber =findViewById(R.id.txtWeekNumber);
TextView txtWeekText =findViewById(R.id.txtWeekText);
txtBack = findViewById(R.id.txtBack);
txtBack.setText("< Back");
//Get extra from prev intents
Intent intent = getIntent();
String weekNumber = intent.getStringExtra("txtWeekNumber");
String weekText = intent.getStringExtra("txtWeekText");
txtWeekNumber.setText(weekNumber);
txtWeekText.setText(weekText);
viewDailyButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(MedicineWeekActivities.this, DailyActivities.class);
intent.putExtra("txtWeekNumber", weekNumber);
intent.putExtra("txtWeekText", weekText);
startActivity(intent);
}
});
//start Take data
FirebaseUser user = mFirebaseAuth.getCurrentUser();
db.collection("weekMedicines").whereEqualTo("uid",user.getUid()).whereEqualTo("weekText",weekText).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
myList = new ArrayList<>();
for (QueryDocumentSnapshot document : task.getResult()) {
Log.d("chata",document.toString());
MedicineWeekActivity medicine = document.toObject(MedicineWeekActivity.class);
myList.add(medicine);
}
myAdapter = new MedicineWeekActivitiesAdapter(MedicineWeekActivities.this,myList);
customerList.setAdapter(myAdapter);
} else {
Log.d("chata", "Error getting documents: ", task.getException());
}
}
});
//End take data
txtBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
openNewDashboard();
}
});
}
public void openNewDashboard(){
Intent intent = new Intent(this, ADHDHome.class);
startActivity(intent);
}
}
\ No newline at end of file
package com.example.salonappnew;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import com.example.salonappnew.models.MedicineWeek;
import com.example.salonappnew.models.MedicineWeekActivity;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import java.util.ArrayList;
public class MedicineWeekActivitiesAdapter extends BaseAdapter implements Filterable {
//Firebase storage
FirebaseAuth mFirebaseAuth;
FirebaseStorage storage;
StorageReference storageReference;
private DatabaseReference mFDb;
private FirebaseDatabase mFirebaseInstant;
Context c;
ArrayList<MedicineWeekActivity> originalArray,tmpArray;
///filter
CustomFilter cs;
///filter
String img = "";
public MedicineWeekActivitiesAdapter(Context c, ArrayList<MedicineWeekActivity> originalArray){
this.c = c;
this.originalArray = originalArray;
this.tmpArray = originalArray;
}
@Override
public Object getItem(int position) {
return originalArray.get(position);
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.medicines_list_week_activities,null);
TextView txtDrugName =row.findViewById(R.id.txtDrugName);
TextView txtM =row.findViewById(R.id.txtM);
TextView txtA =row.findViewById(R.id.txtA);
TextView txtN =row.findViewById(R.id.txtN);
txtDrugName.setText(originalArray.get(position).getTxtDrugName());
txtM.setText(originalArray.get(position).getTxtM());
txtA.setText(originalArray.get(position).getTxtA());
txtN.setText(originalArray.get(position).getTxtN());
row.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
return row;
}
@Override
public int getCount() {
return originalArray.size();
}
@Override
public long getItemId(int position) {
return position;
}
///Codes for filter
@Override
public Filter getFilter() {
if(cs == null){
cs = new CustomFilter();
}
return cs;
}
class CustomFilter extends Filter {
@Override
protected FilterResults performFiltering(CharSequence constraint) {
FilterResults results = new FilterResults();
if(constraint != null && constraint.length() > 0) {
constraint = constraint.toString().toUpperCase();
ArrayList<MedicineWeek> filters = new ArrayList<>();
for (int i = 0; i < tmpArray.size(); i++) {
if (tmpArray.get(i).getTxtDrugName().toUpperCase().contains(constraint)) {
MedicineWeek singleRow = new MedicineWeek(tmpArray.get(i).getTxtDrugName(),tmpArray.get(i).getTxtDrugName());
filters.add(singleRow);
}
}
results.count = filters.size();
results.values = filters;
}else {
results.count = tmpArray.size();
results.values = tmpArray;
}
return results;
}
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
originalArray = (ArrayList<MedicineWeekActivity>)results.values;
notifyDataSetChanged();
}
}
///Codes for filter
}
\ No newline at end of file
package com.example.salonappnew;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ListView;
/**
* A simple {@link Fragment} subclass.
* Use the {@link NewHomeFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class NewHomeFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public NewHomeFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment NewHomeFragment.
*/
// TODO: Rename and change types and number of parameters
public static NewHomeFragment newInstance(String param1, String param2) {
NewHomeFragment fragment = new NewHomeFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_new_home, container, false);
LinearLayout tilePrevReports =(LinearLayout) rootView.findViewById(R.id.tilePrevReports);
LinearLayout tileMedicines = (LinearLayout) rootView.findViewById(R.id.tileMedicines);
tilePrevReports.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Fragment fragment = new ReportsFragment();
FragmentManager fm = getActivity().getSupportFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
transaction.replace(R.id.frameLayout, fragment);
transaction.commit();
}
});
tileMedicines.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Fragment fragment = new MedicineFragment();
FragmentManager fm = getActivity().getSupportFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
transaction.replace(R.id.frameLayout, fragment);
transaction.commit();
}
});
return rootView;
}
}
\ No newline at end of file
package com.example.salonappnew;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import com.example.salonappnew.models.MedicineWeek;
import com.example.salonappnew.models.User;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QueryDocumentSnapshot;
import com.google.firebase.firestore.QuerySnapshot;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import org.w3c.dom.Text;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/**
* A simple {@link Fragment} subclass.
* Use the {@link ProfileFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ProfileFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth mFirebaseAuth = FirebaseAuth.getInstance();
public ProfileFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment ProfileFragment.
*/
// TODO: Rename and change types and number of parameters
public static ProfileFragment newInstance(String param1, String param2) {
ProfileFragment fragment = new ProfileFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View rootView = inflater.inflate(R.layout.fragment_profile, container, false);
EditText editTextName =(EditText) rootView.findViewById(R.id.editTextName);
EditText editTextAge =(EditText) rootView.findViewById(R.id.editTextAge);
EditText editTextAddress =(EditText) rootView.findViewById(R.id.editTextAddress);
EditText editTextTelephone =(EditText) rootView.findViewById(R.id.editTextTelephone);
EditText editTextRegisteredDate =(EditText) rootView.findViewById(R.id.editTextRegisteredDate);
Button btnSave = (Button) rootView.findViewById(R.id.btnSave);
Button btnSignOut = (Button) rootView.findViewById(R.id.btnSignOut);
final String[] docId = {""};
// Take data from firestore
FirebaseUser user = mFirebaseAuth.getCurrentUser();
//Start Take user data
db.collection("users").whereEqualTo("uid",user.getUid()).get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
Log.d("chata","fire search done");
Log.d("chata","data"+task);
for (QueryDocumentSnapshot document : task.getResult()) {
Log.d("chata",document.toString());
User user = document.toObject(User.class);
docId[0] = document.getId();
editTextName.setText(user.getFullName());
editTextAge.setText(user.getAge()+"");
editTextAddress.setText(user.getAddress());
editTextTelephone.setText(user.getTelephone());
editTextRegisteredDate.setText(user.getRegDate());
}
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.d("chata","fire search failed");
}
});
//end Take user data
editTextName.setEnabled(false);
editTextAge.setEnabled(false);
editTextAddress.setEnabled(false);
editTextTelephone.setEnabled(false);
editTextRegisteredDate.setEnabled(false);
TextView txtVEditProfile = (TextView) rootView.findViewById(R.id.txtVEditProfile);
txtVEditProfile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
editTextName.setEnabled(true);
editTextAge.setEnabled(true);
editTextAddress.setEnabled(true);
editTextTelephone.setEnabled(true);
btnSave.setVisibility(View.VISIBLE);
}
});
btnSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
editTextName.setEnabled(false);
editTextAge.setEnabled(false);
editTextAddress.setEnabled(false);
editTextTelephone.setEnabled(false);
btnSave.setVisibility(View.GONE);
String fullName = editTextName.getText().toString();
int age = Integer.parseInt(editTextAge.getText().toString());
String address = editTextAddress.getText().toString();
String telephone = editTextTelephone.getText().toString();
String registeredDate=editTextRegisteredDate.getText().toString();
Map<String, Object> usr = new HashMap<>();
usr.put("fullName", fullName);
usr.put("age", age);
usr.put("address", address);
usr.put("telephone", telephone);
usr.put("uid", user.getUid());
usr.put("regDate", registeredDate);
db.collection("users").document(docId[0])
.set(usr)
.addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Log.d("chata", "DocumentSnapshot successfully written!");
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.w("chata", "Error writing document", e);
}
});
}
});
btnSignOut.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseAuth.getInstance().signOut();
Intent intent = new Intent(getContext(), login.class);
startActivity(intent);
}
});
return rootView;
}
}
\ No newline at end of file
package com.example.salonappnew.common;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.example.salonappnew.R;
import com.example.salonappnew.models.Company;
import com.example.salonappnew.models.Customer;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.Query;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.squareup.picasso.Picasso;
public class Common {
private static FirebaseAuth mFirebaseAuth;
private static String key;
private static DatabaseReference mFDb;
private static FirebaseDatabase mFirebaseInstant;
private static FirebaseStorage storage;
private static StorageReference storageReference;
public static void redirectActivity(Activity activity, Class aClass) {
Intent intent = new Intent(activity,aClass);
activity.startActivity(intent);
}
public static void dashboardOpen(Activity activity, Class aClass,String type){
Intent intent = new Intent(activity,aClass);
intent.putExtra("type",type);
activity.startActivity(intent);
activity.finish();
}
//This is Common Logout for all drawers
public static void logout(final Activity activity){
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Logout");
builder.setMessage("Are you Sure you want to logout?");
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
FirebaseAuth.getInstance().signOut();
activity.finishAffinity();
}
});
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
builder.show();
}
public static void findProfileImg(ImageView imgView,String type,TextView txtProfileName){
//Load image data from firebase
Log.d("Data","Type"+type);
searchFireStore(type,imgView,txtProfileName);
}
private static void searchFireStore(final String type, final ImageView imgView, final TextView txtProfileName){
final String[] tmpUrl = new String[1];
final String[] img = new String[1];
mFirebaseAuth = FirebaseAuth.getInstance();
mFirebaseInstant = FirebaseDatabase.getInstance();
mFDb = mFirebaseInstant.getReference("users");
storage = FirebaseStorage.getInstance();
storageReference = storage.getReference();
Log.d("Data","Email ->"+mFirebaseAuth.getCurrentUser().getEmail());
Log.d("Data","Type to lower case ->"+type.toLowerCase());
Query data = mFDb.child(type.toLowerCase()).orderByChild("email").startAt(mFirebaseAuth.getCurrentUser().getEmail())
.endAt(mFirebaseAuth.getCurrentUser().getEmail()+"\uf8ff");
if (type.equals("ADMIN")){
txtProfileName.setText("ADMIN");
}
data.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
System.out.println(dataSnapshot.getKey());
Log.d("Data","Data ->"+dataSnapshot.getKey());
key = dataSnapshot.getKey();
Log.d("Data","Data ->"+dataSnapshot.getValue().toString());
if(type.equals("CUSTOMER")){
Customer customer = dataSnapshot.getValue(Customer.class);
txtProfileName.setText(customer.getName());
Log.d("Data","Customer "+customer.getName());
tmpUrl[0] = customer.getImgUrl();
}else if(type.equals("SALON")){
Company company = dataSnapshot.getValue(Company.class);
txtProfileName.setText(company.getCompanyName());
Log.d("Data","SALON "+company.getCompanyName());
tmpUrl[0] = company.getImg();
}else{
tmpUrl[0] = null;
}
if(tmpUrl[0] != null){
storageReference.child(tmpUrl[0]).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
// Got the download URL for 'users/me/profile.png'
Log.d("Data",""+uri.toString());
img[0] = uri.toString();
Picasso.get().load(uri).into(imgView);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
Log.d("Data","Error in downloading image data");
}
});
}
}
@Override
public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
}
@Override
public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {
}
@Override
public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
}
package com.example.salonappnew.common;
public class CommonConstants {
public static final String WEEK_1 = "Week 1";
public static final String WEEK_2 = "Week 2";
public static final String WEEK_3 = "Week 3";
public static final String WEEK_4 = "Week 4";
public static final String WEEK_5 = "Week 5";
public static final String PROGRESS_STATUS_COMPLETE = "Complete";
public static final String PROGRESS_STATUS_NOT_COMPLETE = "Not Complete";
public static final String PROGRESS_STATUS_IN_PROGRESS = "In Progress";
}
package com.example.salonappnew.models;
public class Comments {
public String dComment;
public String pComment;
public boolean isParentComment;
public Comments() {
}
public Comments(String dComment, String pComment) {
this.dComment = dComment;
this.pComment = pComment;
}
public String getdComment() {
return dComment;
}
public void setdComment(String dComment) {
this.dComment = dComment;
}
public String getpComment() {
return pComment;
}
public void setpComment(String pComment) {
this.pComment = pComment;
}
public boolean isParentComment() {
return isParentComment;
}
public void setParentComment(boolean parentComment) {
isParentComment = parentComment;
}
}
package com.example.salonappnew.models;
import java.util.ArrayList;
public class Company {
String companyName;
String address;
String phone;
String email;
String district;
String category;
String img;
public Company(){
}
public Company(String companyName, String address, String phone, String email,String district,String category,String img) {
this.companyName = companyName;
this.address = address;
this.phone = phone;
this.email = email;
this.district = district;
this.category = category;
this.img = img;
}
// public Company(SelectASalon selectASalon, ArrayList<Company> myList) {
// }
public String getCompanyName() {
return companyName;
}
public String getAddress() {
return address;
}
public String getPhone() {
return phone;
}
public String getEmail() {
return email;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
}
package com.example.salonappnew.models;
public class Customer {
String name;
String phone;
String email;
String gender;//false for women // true for men
String password;
String imgUrl;
public String getName() {
return name;
}
public String getPhone() {
return phone;
}
public String getEmail() {
return email;
}
public String getGender() {
return gender;
}
// public String isGender() {
// return gender;
// }
public String getPassword() {
return password;
}
public Customer(){
}
public Customer(String name, String phone, String email, String gender, String password,String imgUrl) {
this.name = name;
this.phone = phone;
this.email = email;
this.gender = gender;
this.password = password;
this.imgUrl = imgUrl;
}
public Customer(String name, String phone, String email, String gender, String password) {
this.name = name;
this.phone = phone;
this.email = email;
this.gender = gender;
this.password = password;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
}
package com.example.salonappnew.models;
public class DailyActivity {
//Complete
//InProgress
//Notcomplete
public String taskName;
public String taskText;
public String docId;
public String progressStatus;
public String weekNumber;
public String weekText;
public String pComment;
public String dComment;
public String month;
public DailyActivity(String taskName, String taskText,String docId,String progressStatus) {
this.taskName = taskName;
this.taskText = taskText;
this.docId = docId;
this.progressStatus = progressStatus;
this.weekNumber = "";
this.weekText = "";
}
public DailyActivity() {
}
public String getTaskName() {
return taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
}
public String getTaskText() {
return taskText;
}
public void setTaskText(String taskText) {
this.taskText = taskText;
}
public String getDocId() {
return docId;
}
public void setDocId(String docId) {
this.docId = docId;
}
public String getProgressStatus() {
return progressStatus;
}
public void setProgressStatus(String progressStatus) {
this.progressStatus = progressStatus;
}
public String getWeekNumber() {
return weekNumber;
}
public void setWeekNumber(String weekNumber) {
this.weekNumber = weekNumber;
}
public String getWeekText() {
return weekText;
}
public void setWeekText(String weekText) {
this.weekText = weekText;
}
public String getpComment() {
return pComment;
}
public void setpComment(String pComment) {
this.pComment = pComment;
}
public String getdComment() {
return dComment;
}
public void setdComment(String dComment) {
this.dComment = dComment;
}
public String getMonth() {
return month;
}
public void setMonth(String month) {
this.month = month;
}
}
package com.example.salonappnew.models;
public class MedicineWeek {
String weekNumber;
String weekText;
public MedicineWeek() {
}
public MedicineWeek(String weekNumber, String weekText) {
this.weekNumber = weekNumber;
this.weekText = weekText;
}
public String getWeekNumber() {
return weekNumber;
}
public void setWeekNumber(String weekNumber) {
this.weekNumber = weekNumber;
}
public String getWeekText() {
return weekText;
}
public void setWeekText(String weekText) {
this.weekText = weekText;
}
}
package com.example.salonappnew.models;
import android.widget.TextView;
import com.example.salonappnew.R;
public class MedicineWeekActivity {
public String txtDrugName;
public String txtM;
public String txtA;
public String txtN;
public MedicineWeekActivity(String txtDrugName, String txtM, String txtA, String txtN) {
this.txtDrugName = txtDrugName;
this.txtM = txtM;
this.txtA = txtA;
this.txtN = txtN;
}
public MedicineWeekActivity() {
}
public String getTxtDrugName() {
return txtDrugName;
}
public void setTxtDrugName(String txtDrugName) {
this.txtDrugName = txtDrugName;
}
public String getTxtM() {
return txtM;
}
public void setTxtM(String txtM) {
this.txtM = txtM;
}
public String getTxtA() {
return txtA;
}
public void setTxtA(String txtA) {
this.txtA = txtA;
}
public String getTxtN() {
return txtN;
}
public void setTxtN(String txtN) {
this.txtN = txtN;
}
}
package com.example.salonappnew.models;
public class User {
public String address;
public int age;
public String email;
public String fullName;
public String regDate;
public String telephone;
public String uid;
public User() {
}
public User(String address, int age, String email, String fullName, String regDate, String telephone, String uid) {
this.address = address;
this.age = age;
this.email = email;
this.fullName = fullName;
this.regDate = regDate;
this.telephone = telephone;
this.uid = uid;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getRegDate() {
return regDate;
}
public void setRegDate(String regDate) {
this.regDate = regDate;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
}
package com.example.salonappnew.models;
public class UserType {
public String email;
public String type;
public void setEmail(String email) {
this.email = email;
}
public void setType(String type) {
this.type = type;
}
public UserType(String email, String type) {
this.email = email;
this.type = type;
}
public UserType(){
}
public String getEmail() {
return email;
}
public String getType() {
return type;
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,5c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM12,19.2c-2.5,0 -4.71,-1.28 -6,-3.22 0.03,-1.99 4,-3.08 6,-3.08 1.99,0 5.97,1.09 6,3.08 -1.29,1.94 -3.5,3.22 -6,3.22z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<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
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:bottomRightRadius="18dp"
android:bottomLeftRadius="18dp"
android:topRightRadius="18dp"
android:topLeftRadius="18dp"/>
</shape>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#DAD2CF"></solid>
<corners android:radius="20dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FF6D28"></solid>
<corners android:radius="60dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#E7BCA8"></solid>
<corners android:radius="50dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#DAD2CF"></solid>
<corners android:radius="60dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FFF"></solid>
<corners android:radius="50dp"/>
</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="#297EE6"/>
<corners android:radius="100dp"/>
</shape>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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