msl
This commit is contained in:
+26
-4
@@ -77,6 +77,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||||
boolean isDialogOpen = true;
|
boolean isDialogOpen = true;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
|
int scrollPosition = 0;
|
||||||
|
|
||||||
String str = "", _pathforcheck = "";
|
String str = "", _pathforcheck = "";
|
||||||
|
|
||||||
@@ -180,6 +181,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||||
|
|
||||||
|
if (!expandableListView.isGroupExpanded(scrollPosition)) {
|
||||||
|
expandableListView.expandGroup(scrollPosition);
|
||||||
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -594,6 +600,8 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
if (!checkHeaderArray.contains(i)) {
|
if (!checkHeaderArray.contains(i)) {
|
||||||
checkHeaderArray.add(i);
|
checkHeaderArray.add(i);
|
||||||
}
|
}
|
||||||
|
//expandableListView.smoothScrollToPosition(i);
|
||||||
|
scrollPosition = i;
|
||||||
|
|
||||||
flag = false;
|
flag = false;
|
||||||
Error_Message = getResources().getString(R.string.faceup_value);
|
Error_Message = getResources().getString(R.string.faceup_value);
|
||||||
@@ -605,20 +613,24 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
if (!checkHeaderArray.contains(i)) {
|
if (!checkHeaderArray.contains(i)) {
|
||||||
checkHeaderArray.add(i);
|
checkHeaderArray.add(i);
|
||||||
}
|
}
|
||||||
|
//expandableListView.smoothScrollToPosition(i);
|
||||||
|
scrollPosition = i;
|
||||||
|
|
||||||
flag = false;
|
flag = false;
|
||||||
Error_Message = getResources().getString(R.string.stock_value);
|
Error_Message = getResources().getString(R.string.stock_value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (faceup.equals("")) {
|
if (faceup.equals("")) {
|
||||||
if (!checkHeaderArray.contains(i)) {
|
if (!checkHeaderArray.contains(i)) {
|
||||||
checkHeaderArray.add(i);
|
checkHeaderArray.add(i);
|
||||||
}
|
}
|
||||||
|
//expandableListView.smoothScrollToPosition(i);
|
||||||
|
scrollPosition = i;
|
||||||
|
|
||||||
flag = false;
|
flag = false;
|
||||||
Error_Message = getResources().getString(R.string.faceup_value);
|
Error_Message = getResources().getString(R.string.faceup_value);
|
||||||
break;
|
break;
|
||||||
@@ -708,6 +720,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||||
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||||
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||||
|
CardView card_view = (CardView) convertView.findViewById(R.id.card_view);
|
||||||
|
|
||||||
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||||
|
|
||||||
@@ -719,10 +732,19 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||||
|
|
||||||
|
|
||||||
|
if (!checkflag) {
|
||||||
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
|
} else {
|
||||||
|
card_view.setCardBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//empty check color change
|
//empty check color change
|
||||||
if (headerTitle.getCompany_id().equals("1")) {
|
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||||
if (!checkflag) {
|
if (!checkflag) {
|
||||||
if (checkHeaderArray.contains(groupPosition)) {
|
if (checkHeaderArray.contains(groupPosition)) {
|
||||||
|
//card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||||
} else {
|
} else {
|
||||||
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
@@ -736,7 +758,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
|||||||
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user