This commit is contained in:
gagangoel290
2017-05-10 16:00:35 +05:30
parent 7a8623fd41
commit 16be8a1e0e
4 changed files with 64 additions and 7 deletions
+1 -1
View File
@@ -41,7 +41,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
@@ -779,6 +779,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
holder.facing = (EditText) convertView.findViewById(R.id.ed_facing);
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
holder.stock_view = convertView.findViewById(R.id.stock_view);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
@@ -797,8 +798,10 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
if (childData.getToggleValue().equals("1")) {
holder.stock.setVisibility(View.GONE);
holder.stock_view.setVisibility(View.GONE);
} else {
holder.stock.setVisibility(View.VISIBLE);
holder.stock_view.setVisibility(View.VISIBLE);
}
} else {
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
@@ -808,6 +811,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
holder.toggle_available.setVisibility(View.GONE);
holder.facing.setVisibility(View.VISIBLE);
holder.stock.setVisibility(View.GONE);
holder.stock_view.setVisibility(View.GONE);
}
/* if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
@@ -1058,15 +1062,29 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
holder.facing.setHint(getString(R.string.empty));
/* if (childData.getCompany_id().equals("1") && !childData.getMust_have().equals("0")) {
}else{
holder.facing.setHint("");
}*/
tempflag = true;
}
} else {
holder.facing.setHint("");
}
}
if (tempflag) {
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
} else {
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
} else {
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
}
}
} else {
if (holder.facing.getText().toString().equals("")) {
@@ -1076,10 +1094,17 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
tempflag = true;
}
if (tempflag) {
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
} else {
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
} else {
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
}
}
}
}
@@ -1104,6 +1129,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
ToggleButton toggle_available;
LinearLayout lin_category;
EditText facing, stock;
View stock_view;
}
private static boolean updateResources(Context context, String language) {
@@ -1131,9 +1157,9 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
lang = CommonString.KEY_RETURE_LANGUAGE_UAE_ARABIC;
}else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
lang = CommonString.KEY_RETURE_LANGUAGE_OMAN;
}else{
} else {
lang = CommonString.KEY_RETURN_LANGUAGE_DEFAULT;
}
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/grey_background" />
<stroke
android:width="1dip"
android:color="#888" />
</shape>
@@ -25,6 +25,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:weightSum="5">
@@ -90,6 +91,8 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_weight=".25"
android:gravity="center_vertical"
android:orientation="vertical">
@@ -98,17 +101,26 @@
android:id="@+id/ed_facing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="center"
android:inputType="number"
android:maxLength="5"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#222"
android:textColorHint="#666" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="5dp"
android:layout_weight=".25"
android:gravity="center_vertical"
android:orientation="vertical">
@@ -117,13 +129,22 @@
android:id="@+id/ed_stock"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:gravity="center"
android:inputType="number"
android:maxLength="5"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#222"
android:textColorHint="#666"
android:visibility="gone" />
<View
android:id="@+id/stock_view"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black" />
</LinearLayout>
</LinearLayout>