Merge pull request #31 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_Toggle_background

Gg toggle background
This commit is contained in:
YadavendraSinghYaduvanshi
2017-01-11 12:25:51 +05:30
committed by GitHub
9 changed files with 53 additions and 16 deletions
@@ -119,11 +119,34 @@ public class CategoryListActivity extends AppCompatActivity {
//holder.categoryIcon.setImageResource(R.drawable.category);
if (categoryData.getCategory().equalsIgnoreCase("Oral Health")) {
holder.categoryIcon.setImageResource(R.drawable.ohc);
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
holder.categoryIcon.setImageResource(R.drawable.ohc_done);
} else {
holder.categoryIcon.setImageResource(R.drawable.ohc);
}
} else if (categoryData.getCategory().equalsIgnoreCase("Wellness")) {
holder.categoryIcon.setImageResource(R.drawable.pdr);
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
holder.categoryIcon.setImageResource(R.drawable.pdr_done);
} else {
holder.categoryIcon.setImageResource(R.drawable.pdr);
}
} else if (categoryData.getCategory().equalsIgnoreCase("Nutritionals")) {
holder.categoryIcon.setImageResource(R.drawable.hfd);
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
holder.categoryIcon.setImageResource(R.drawable.hfd_done);
} else {
holder.categoryIcon.setImageResource(R.drawable.hfd);
}
}
@@ -321,7 +321,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
//String date = new Date().toLocaleString().toString();
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
_pathforcheck = "Stock_Cam1_" + store_id + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
_pathforcheck = "Stock_Cam1_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
child_position = groupPosition;
path = str + _pathforcheck;
@@ -349,7 +349,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
//String date = new Date().toLocaleString().toString();
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
_pathforcheck = "Stock_Cam2_" + store_id + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
_pathforcheck = "Stock_Cam2_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
child_position = groupPosition;
path = str + _pathforcheck;
@@ -628,7 +628,7 @@ public class UploadActivity extends AppCompatActivity {
return CommonString.KEY_FAILURE;
}
} else {
//new File(Path + path).delete();
new File(Path + path).delete();
}
return result.toString();
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" android:drawable="@color/grey_background" />
<item android:state_checked="true" android:drawable="@color/green" />
</selector>
@@ -158,7 +158,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes" />
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background"/>
</LinearLayout>
</LinearLayout>
@@ -196,7 +197,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes" />
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background" />
</LinearLayout>
</LinearLayout>
@@ -234,7 +236,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes" />
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -23,7 +23,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:weightSum="5">
<LinearLayout
@@ -91,7 +92,8 @@
android:id="@+id/toggle_available"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
android:layout_gravity="center"
android:background="@drawable/toggle_selector_background" />
</LinearLayout>
</LinearLayout>
@@ -89,7 +89,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes" />
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background" />
</LinearLayout>
</LinearLayout>
@@ -127,7 +128,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes"/>
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background"/>
</LinearLayout>
</LinearLayout>
@@ -165,7 +167,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/no"
android:textOn="@string/yes"/>
android:textOn="@string/yes"
android:background="@drawable/toggle_selector_background"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -23,7 +23,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:weightSum="5">
<LinearLayout
+1 -1
View File
@@ -7,7 +7,7 @@
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="grey_background">#EEEEEE</color>
<color name="green">#FF27A404</color>
<color name="blue">#2196F3</color>
<color name="colorOrange">#FFE0B2</color>