UAE_facing_hide
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,16 @@ public class StoreBean implements Serializable{
|
|||||||
String LONGITUDE;
|
String LONGITUDE;
|
||||||
String POG_TYPE_ID;
|
String POG_TYPE_ID;
|
||||||
|
|
||||||
|
public String getFACING_HIDE() {
|
||||||
|
return FACING_HIDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFACING_HIDE(String FACING_HIDE) {
|
||||||
|
this.FACING_HIDE = FACING_HIDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
String FACING_HIDE;
|
||||||
|
|
||||||
public String getSTORE_ID() {
|
public String getSTORE_ID() {
|
||||||
return STORE_ID;
|
return STORE_ID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
mPasswordView.setText("cpm123");*/
|
mPasswordView.setText("cpm123");*/
|
||||||
|
|
||||||
//UAE
|
//UAE
|
||||||
/* museridView.setText("testuae");
|
/* museridView.setText("testuae");
|
||||||
mPasswordView.setText("cpm123");*/
|
mPasswordView.setText("cpm123");*/
|
||||||
|
|
||||||
|
|
||||||
@@ -213,13 +213,13 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
|
|||||||
mPasswordView.setText("cpm123");*/
|
mPasswordView.setText("cpm123");*/
|
||||||
/* museridView.setText("Ahmed.saied");
|
/* museridView.setText("Ahmed.saied");
|
||||||
mPasswordView.setText("cpm@123");*/
|
mPasswordView.setText("cpm@123");*/
|
||||||
museridView.setText("testksa");
|
/* museridView.setText("testksa");
|
||||||
mPasswordView.setText("cpm123");
|
mPasswordView.setText("cpm123");*/
|
||||||
|
|
||||||
|
|
||||||
//turkey
|
//turkey
|
||||||
/*museridView.setText("testmer");
|
museridView.setText("testmer");
|
||||||
mPasswordView.setText("cpm123");*/
|
mPasswordView.setText("cpm123");
|
||||||
//sa
|
//sa
|
||||||
/* museridView.setText("testsa");
|
/* museridView.setText("testsa");
|
||||||
mPasswordView.setText("cpm123");
|
mPasswordView.setText("cpm123");
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public class CommonString {
|
|||||||
public static final String KEY_JOURNEY_PLAN_PHARMA = "JOURNEY_PLAN_PHARMA";
|
public static final String KEY_JOURNEY_PLAN_PHARMA = "JOURNEY_PLAN_PHARMA";
|
||||||
public static final String KEY_ADHOC_JOURNEYPLAN_ADDITIONAL = "ADHOC_JOURNEYPLAN_ADDITIONAL";
|
public static final String KEY_ADHOC_JOURNEYPLAN_ADDITIONAL = "ADHOC_JOURNEYPLAN_ADDITIONAL";
|
||||||
public static final String KEY_STORE_FLAG = "STORE_FLAG";
|
public static final String KEY_STORE_FLAG = "STORE_FLAG";
|
||||||
|
public static final String KEY_STORE_FLAG_FACING_HIDE = "STORE_FLAG_FACING_HIDE";
|
||||||
public static final String FROM_DEVIATION = "DEVIATION";
|
public static final String FROM_DEVIATION = "DEVIATION";
|
||||||
public static final String FROM_JCP = "JCP";
|
public static final String FROM_JCP = "JCP";
|
||||||
public static final String FROM_ADDITIONAL = "ADDITIONAL";
|
public static final String FROM_ADDITIONAL = "ADDITIONAL";
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class NewStockDataActivity extends AppCompatActivity implements DialogCa
|
|||||||
LinearLayout lin_camera1, lin_camera2, lin_camera3, lin_camera4;
|
LinearLayout lin_camera1, lin_camera2, lin_camera3, lin_camera4;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
String categoryName, categoryId, storeId, Error_Message = "";
|
String categoryName, categoryId, storeId, Error_Message = "";
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
String store_id,store_flag_hide, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
||||||
boolean isDialogOpen = true;
|
boolean isDialogOpen = true;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
int scrollPosition = 0;
|
int scrollPosition = 0;
|
||||||
@@ -127,6 +127,7 @@ public class NewStockDataActivity extends AppCompatActivity implements DialogCa
|
|||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
store_flag_hide = preferences.getString(CommonString.KEY_STORE_FLAG_FACING_HIDE, null);
|
||||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
@@ -668,11 +669,11 @@ public class NewStockDataActivity extends AppCompatActivity implements DialogCa
|
|||||||
|
|
||||||
//Header
|
//Header
|
||||||
if (country_id.equals("7")) {
|
if (country_id.equals("7")) {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET,store_flag_hide);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC,store_flag_hide);
|
||||||
} else {
|
} else {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET,store_flag_hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -684,11 +685,11 @@ public class NewStockDataActivity extends AppCompatActivity implements DialogCa
|
|||||||
childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
if (!(childDataList.size() > 0)) {
|
if (!(childDataList.size() > 0)) {
|
||||||
if (country_id.equals("7")) {
|
if (country_id.equals("7")) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE,store_flag_hide);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC,store_flag_hide);
|
||||||
} else {
|
} else {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK,store_flag_hide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -265,13 +265,13 @@ public class StockActivity extends AppCompatActivity implements DialogCallbackLi
|
|||||||
childDataList = db.getStockAfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
childDataList = db.getStockAfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
if (!(childDataList.size() > 0)) {
|
if (!(childDataList.size() > 0)) {
|
||||||
if (country_id.equals("7")) {
|
if (country_id.equals("7")) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE,"0");
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC,"0");
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_ADDITIONAL)) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADDITIONAL,"0");
|
||||||
} else {
|
} else {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK,"0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -272,10 +272,10 @@ public class StockDataActivity extends AppCompatActivity implements DialogCallba
|
|||||||
if (!(childDataList.size() > 0)) {
|
if (!(childDataList.size() > 0)) {
|
||||||
|
|
||||||
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
if(store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, null, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, null, CommonString.TABLE_MAPPING_STOCK_ADHOC,"0");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, null, CommonString.TABLE_MAPPING_STOCK);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, null, CommonString.TABLE_MAPPING_STOCK,"0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class StockPricingActivity extends AppCompatActivity {
|
|||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
String categoryName, categoryId, Error_Message = "";
|
String categoryName, categoryId, Error_Message = "";
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
String store_id,store_flag_hide, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
||||||
@@ -76,6 +76,7 @@ public class StockPricingActivity extends AppCompatActivity {
|
|||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
store_flag_hide = preferences.getString(CommonString.KEY_STORE_FLAG_FACING_HIDE, null);
|
||||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
@@ -115,7 +116,7 @@ public class StockPricingActivity extends AppCompatActivity {
|
|||||||
hashMapListChildData = new HashMap<>();
|
hashMapListChildData = new HashMap<>();
|
||||||
|
|
||||||
//Header
|
//Header
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET,store_flag_hide);
|
||||||
|
|
||||||
if (headerDataList.size() > 0) {
|
if (headerDataList.size() > 0) {
|
||||||
for (int i = 0; i < headerDataList.size(); i++) {
|
for (int i = 0; i < headerDataList.size(); i++) {
|
||||||
@@ -124,7 +125,7 @@ public class StockPricingActivity extends AppCompatActivity {
|
|||||||
childDataList = new ArrayList<>();
|
childDataList = new ArrayList<>();
|
||||||
//childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
//childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
if (childDataList.size() == 0) {
|
if (childDataList.size() == 0) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(),categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK,"0");
|
||||||
}
|
}
|
||||||
|
|
||||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
private SharedPreferences.Editor editor = null;
|
private SharedPreferences.Editor editor = null;
|
||||||
LinearLayout linearlay;
|
LinearLayout linearlay;
|
||||||
String store_id, userId, culture_id, visit_date;
|
String store_id, userId, culture_id, visit_date,store_facing_hide;
|
||||||
private Dialog dialog;
|
private Dialog dialog;
|
||||||
boolean result_flag = false, leaveflag = false;
|
boolean result_flag = false, leaveflag = false;
|
||||||
FloatingActionButton fab;
|
FloatingActionButton fab;
|
||||||
@@ -775,6 +775,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
store_id = current.getSTORE_ID();
|
store_id = current.getSTORE_ID();
|
||||||
|
store_facing_hide = current.getFACING_HIDE();
|
||||||
storeCurrentObj = current;
|
storeCurrentObj = current;
|
||||||
|
|
||||||
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U) || current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_UN)) {
|
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U) || current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_UN)) {
|
||||||
@@ -885,6 +886,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
editor = preferences.edit();
|
editor = preferences.edit();
|
||||||
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
|
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
|
editor.putString(CommonString.KEY_STORE_FLAG_FACING_HIDE, current.getFACING_HIDE());
|
||||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||||
@@ -934,6 +936,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
editor = preferences.edit();
|
editor = preferences.edit();
|
||||||
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
|
editor.putString(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
|
editor.putString(CommonString.KEY_STORE_FLAG_FACING_HIDE, current.getFACING_HIDE());
|
||||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||||
@@ -960,6 +963,8 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG_FACING_HIDE, store_facing_hide);
|
||||||
|
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
}
|
}
|
||||||
@@ -1165,6 +1170,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
|
|
||||||
editor = preferences.edit();
|
editor = preferences.edit();
|
||||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
|
editor.putString(CommonString.KEY_STORE_FLAG_FACING_HIDE, current.getFACING_HIDE());
|
||||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||||
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
|
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
|
||||||
@@ -1186,6 +1192,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG_FACING_HIDE, store_facing_hide);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
@@ -1240,6 +1247,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
int id) {
|
int id) {
|
||||||
|
|
||||||
editor = preferences.edit();
|
editor = preferences.edit();
|
||||||
|
editor.putString(CommonString.KEY_STORE_FLAG_FACING_HIDE, current.getFACING_HIDE());
|
||||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||||
@@ -1259,6 +1267,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
in.putExtra(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG_FACING_HIDE, store_facing_hide);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
dialog1.cancel();
|
dialog1.cancel();
|
||||||
@@ -2148,6 +2157,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
Intent in = new Intent(StoreListActivity.this, GeoTagActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG_FACING_HIDE, store_facing_hide);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
dialog1.cancel();
|
dialog1.cancel();
|
||||||
@@ -2162,6 +2172,7 @@ public class StoreListActivity extends AppCompatActivity implements GoogleApiCli
|
|||||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||||
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
in.putExtra(CommonString.KEY_STORE_FLAG, store_flag_str);
|
||||||
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
in.putExtra(CommonString.KEY_STORE_ID, store_id);
|
||||||
|
in.putExtra(CommonString.KEY_STORE_FLAG_FACING_HIDE, store_facing_hide);
|
||||||
startActivity(in);
|
startActivity(in);
|
||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
}
|
}
|
||||||
|
|||||||
+72
-329
@@ -71,23 +71,18 @@ import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGette
|
|||||||
public class MSL_Availability_StockFacingActivity extends AppCompatActivity implements DialogCallbackListener {
|
public class MSL_Availability_StockFacingActivity extends AppCompatActivity implements DialogCallbackListener {
|
||||||
ExpandableListView expandableListView;
|
ExpandableListView expandableListView;
|
||||||
TextView txt_mslAvailabilityName;
|
TextView txt_mslAvailabilityName;
|
||||||
|
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> headerDataList;
|
||||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> childDataList;
|
ArrayList<MSL_AvailabilityStockFacingGetterSetter> childDataList;
|
||||||
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
List<MSL_AvailabilityStockFacingGetterSetter> hashMapListHeaderData;
|
||||||
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData;
|
HashMap<MSL_AvailabilityStockFacingGetterSetter, List<MSL_AvailabilityStockFacingGetterSetter>> hashMapListChildData;
|
||||||
|
|
||||||
List<Integer> checkHeaderArray = new ArrayList<>();
|
List<Integer> checkHeaderArray = new ArrayList<>();
|
||||||
boolean checkflag = true;
|
boolean checkflag = true;
|
||||||
|
|
||||||
ExpandableListAdapter adapter;
|
ExpandableListAdapter adapter;
|
||||||
ImageView camera1, camera2, camera3, camera4;
|
ImageView camera1, camera2, camera3, camera4;
|
||||||
LinearLayout lin_camera1, lin_camera2, lin_camera3, lin_camera4;
|
LinearLayout lin_camera1, lin_camera2, lin_camera3, lin_camera4;
|
||||||
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
|
|
||||||
String categoryName, categoryId, storeId, Error_Message = "";
|
String categoryName, categoryId, storeId, Error_Message = "";
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
String store_id, store_flag_hide, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow, country_id, store_flag_str;
|
||||||
boolean isDialogOpen = true;
|
boolean isDialogOpen = true;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
int scrollPosition = 0;
|
int scrollPosition = 0;
|
||||||
@@ -133,6 +128,8 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
store_flag_hide = preferences.getString(CommonString.KEY_STORE_FLAG_FACING_HIDE, null);
|
||||||
|
|
||||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||||
@@ -185,47 +182,10 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
finish();
|
finish();
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||||
|
|
||||||
/*AlertDialog.Builder builder = new AlertDialog.Builder(MSL_Availability_StockFacingActivity.this);
|
|
||||||
builder.setMessage(getResources().getString(R.string.check_save_message))
|
|
||||||
.setCancelable(false)
|
|
||||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
db.open();
|
|
||||||
|
|
||||||
if (db.checkMsl_Availability_StockFacingData(store_id, categoryId)) {
|
|
||||||
db.updateMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
|
||||||
Snackbar.make(view, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
|
||||||
} else {
|
|
||||||
db.InsertMSL_Availability_StockFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
|
||||||
Snackbar.make(view, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
dialog.cancel();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();*/
|
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < adapter.getGroupCount(); i++)
|
for (int i = 0; i < adapter.getGroupCount(); i++)
|
||||||
expandableListView.expandGroup(i);
|
expandableListView.expandGroup(i);
|
||||||
|
|
||||||
/*AlertDialog.Builder builder = new AlertDialog.Builder(MSL_Availability_StockFacingActivity.this);
|
|
||||||
builder.setMessage(Error_Message)
|
|
||||||
.setCancelable(false)
|
|
||||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
//expandableListView.smoothScrollToPosition(scrollPosition);
|
|
||||||
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -308,49 +268,6 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* view = (RelativeLayout)findViewById(R.id.content_msl__availability);
|
|
||||||
//bmImage = (ImageView)findViewById(R.id.image);
|
|
||||||
|
|
||||||
view.setDrawingCacheEnabled(true);
|
|
||||||
// this is the important code :)
|
|
||||||
// Without it the view will have a dimension of 0,0 and the bitmap will be null
|
|
||||||
|
|
||||||
view.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
|
|
||||||
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
|
|
||||||
|
|
||||||
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
|
|
||||||
|
|
||||||
view.buildDrawingCache(true);
|
|
||||||
final Bitmap b = Bitmap.createBitmap(view.getDrawingCache());
|
|
||||||
view.setDrawingCacheEnabled(false); // clear drawing cache
|
|
||||||
|
|
||||||
//bmImage.setImageBitmap(b);
|
|
||||||
|
|
||||||
try{
|
|
||||||
|
|
||||||
|
|
||||||
File yourFile = new File(FILE_PATH+"imgForTxt.png");
|
|
||||||
yourFile.createNewFile(); // if file already exists will do nothing
|
|
||||||
final FileOutputStream stream = new FileOutputStream(yourFile, false); //create your FileOutputStream here
|
|
||||||
|
|
||||||
new Thread(new Runnable() {
|
|
||||||
public void run(){
|
|
||||||
b.compress(Bitmap.CompressFormat.PNG, 85, stream);
|
|
||||||
b.recycle();
|
|
||||||
try {
|
|
||||||
stream.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (FileNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -373,32 +290,6 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* AlertDialog.Builder builder = new AlertDialog.Builder(MSL_Availability_StockFacingActivity.this);
|
|
||||||
builder.setTitle(getResources().getString(R.string.dialog_title));
|
|
||||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
|
||||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
|
|
||||||
//adapter.notifyDataSetChanged();
|
|
||||||
|
|
||||||
if (!validateData(hashMapListHeaderData, hashMapListChildData)) {
|
|
||||||
if (!camera_allow.equals("1")) {
|
|
||||||
db.deletePlanogramListStoreAndCategorywise(store_id, categoryId,
|
|
||||||
planogramShelfHeaderDataList, planogramHashMapListChildData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();*/
|
|
||||||
//finish();
|
//finish();
|
||||||
} else if (id == R.id.action_planogram) {//Planogram Dialog
|
} else if (id == R.id.action_planogram) {//Planogram Dialog
|
||||||
expandableListView.clearFocus();
|
expandableListView.clearFocus();
|
||||||
@@ -438,8 +329,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
if (!planogram_image.equals("")) {
|
if (!planogram_image.equals("")) {
|
||||||
if (new File(str_planogram + planogram_image).exists()) {
|
if (new File(str_planogram + planogram_image).exists()) {
|
||||||
Bitmap bmp = BitmapFactory.decodeFile(str_planogram + planogram_image);
|
Bitmap bmp = BitmapFactory.decodeFile(str_planogram + planogram_image);
|
||||||
// img_planogram.setRotation(90);
|
|
||||||
//img_planogram.setImageBitmap(bmp);
|
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||||
|
|
||||||
String imagePath = "file://" + CommonString.FILE_PATH_PLANOGRAM + "/" + planogram_image;
|
String imagePath = "file://" + CommonString.FILE_PATH_PLANOGRAM + "/" + planogram_image;
|
||||||
@@ -447,11 +337,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
||||||
|
|
||||||
dialog.show();
|
dialog.show();
|
||||||
} /*else {
|
}
|
||||||
//webView.loadUrl(String.valueOf(R.drawable.sad_cloud));
|
|
||||||
|
|
||||||
//img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -513,131 +399,9 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void cameraMethod() {
|
private void cameraMethod() {
|
||||||
/*cameraData = new Store_wise_camera_DataGetterSetter();
|
|
||||||
|
|
||||||
if (db.isStorewiseCameraSave(store_id, categoryId)) {
|
|
||||||
cameraData = db.getStore_wise_camera(store_id, categoryId);
|
|
||||||
} else {
|
|
||||||
cameraData.setStore_id(store_id);
|
|
||||||
cameraData.setCategory_id(categoryId);
|
|
||||||
cameraData.setCamera1("");
|
|
||||||
cameraData.setCamera2("");
|
|
||||||
cameraData.setCamera3("");
|
|
||||||
cameraData.setCamera4("");
|
|
||||||
cameraData.setCheckSaveStatus("0");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (camera_allow.equals("1")) {
|
|
||||||
|
|
||||||
findViewById(R.id.view_camera2).setVisibility(View.VISIBLE);
|
|
||||||
findViewById(R.id.view_camera3).setVisibility(View.VISIBLE);
|
|
||||||
|
|
||||||
if (cameraData.getCamera1().equals("")) {
|
|
||||||
camera1.setBackgroundResource(R.mipmap.camera_orange);
|
|
||||||
} else {
|
|
||||||
camera1.setBackgroundResource(R.mipmap.camera_green);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cameraData.getCamera2().equals("")) {
|
|
||||||
camera2.setBackgroundResource(R.mipmap.camera_orange);
|
|
||||||
} else {
|
|
||||||
camera2.setBackgroundResource(R.mipmap.camera_green);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cameraData.getCamera3().equals("")) {
|
|
||||||
camera3.setBackgroundResource(R.mipmap.camera_orange);
|
|
||||||
} else {
|
|
||||||
camera3.setBackgroundResource(R.mipmap.camera_green);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cameraData.getCamera4().equals("")) {
|
|
||||||
camera4.setBackgroundResource(R.mipmap.camera_orange);
|
|
||||||
} else {
|
|
||||||
camera4.setBackgroundResource(R.mipmap.camera_green);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lin_camera1.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
_pathforcheck = "Stock_Camera1_" + store_id + "_" + categoryId
|
|
||||||
+ "_" + visit_date.replace("/", "") + "_" + CommonFunctions.getCurrentTimeWithLanguage(getApplicationContext()).replace(":", "") + ".jpg";
|
|
||||||
path = str_planogram+ _pathforcheck;
|
|
||||||
|
|
||||||
startCameraActivity(3);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lin_camera2.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
_pathforcheck = "Stock_Camera2_" + store_id + "_" + categoryId
|
|
||||||
+ "_" + visit_date.replace("/", "") + "_" + CommonFunctions.getCurrentTimeWithLanguage(getApplicationContext()).replace(":", "") + ".jpg";
|
|
||||||
path = str_planogram+ _pathforcheck;
|
|
||||||
|
|
||||||
startCameraActivity(4);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lin_camera3.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
_pathforcheck = "Stock_Camera3_" + store_id + "_" + categoryId
|
|
||||||
+ "_" + visit_date.replace("/", "") + "_" + CommonFunctions.getCurrentTimeWithLanguage(getApplicationContext()).replace(":", "") + ".jpg";
|
|
||||||
path = str_planogram+ _pathforcheck;
|
|
||||||
|
|
||||||
startCameraActivity(5);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lin_camera4.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
_pathforcheck = "Stock_Camera4_" + store_id + "_" + categoryId
|
|
||||||
+ "_" + visit_date.replace("/", "") + "_" + CommonFunctions.getCurrentTimeWithLanguage(getApplicationContext()).replace(":", "") + ".jpg";
|
|
||||||
path = str_planogram+ _pathforcheck;
|
|
||||||
|
|
||||||
startCameraActivity(6);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {*/
|
|
||||||
|
|
||||||
if (!camera_allow.equals("1")) {
|
if (!camera_allow.equals("1")) {
|
||||||
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
||||||
/* findViewById(R.id.lin_camera).setVisibility(View.VISIBLE);
|
|
||||||
|
|
||||||
findViewById(R.id.view_camera2).setVisibility(View.GONE);
|
|
||||||
findViewById(R.id.view_camera3).setVisibility(View.GONE);
|
|
||||||
|
|
||||||
lin_camera2.setVisibility(View.GONE);
|
|
||||||
lin_camera3.setVisibility(View.GONE);
|
|
||||||
lin_camera4.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
if (db.isPlanogramAddShelfSaveData(store_id, categoryId)) {
|
|
||||||
camera1.setBackgroundResource(R.mipmap.new_no_camera_done_edit);
|
|
||||||
} else {
|
|
||||||
camera1.setBackgroundResource(R.mipmap.new_no_camera);
|
|
||||||
}
|
|
||||||
|
|
||||||
lin_camera1.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
Intent intent = new Intent(MSL_Availability_StockFacingActivity.this,
|
|
||||||
StockFacing_PlanogramTrackerActivity.class);
|
|
||||||
|
|
||||||
intent.putExtra("storeId", store_id);
|
|
||||||
intent.putExtra("keyAccount_id", keyAccount_id);
|
|
||||||
intent.putExtra("class_id", class_id);
|
|
||||||
intent.putExtra("storeType_id", storeType_id);
|
|
||||||
intent.putExtra("categoryId", categoryId);
|
|
||||||
intent.putExtra("categoryName", categoryName);
|
|
||||||
|
|
||||||
startActivityForResult(intent, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
});*/
|
|
||||||
} else {
|
} else {
|
||||||
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@@ -674,11 +438,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
|
|
||||||
//Header
|
//Header
|
||||||
if (country_id.equals("7") || country_id.equals("8")) {
|
if (country_id.equals("7") || country_id.equals("8")) {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, CommonString.TABLE_MAPPING_SOS_TARGET_ADHOC, store_flag_hide);
|
||||||
} else {
|
} else {
|
||||||
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET);
|
headerDataList = db.getMSL_Availability_StockFacingHeaderData(categoryId, keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, CommonString.TABLE_MAPPING_SOS_TARGET, store_flag_hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -690,11 +454,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
childDataList = db.getMSL_Availability_StockFacingSKU_AfterSaveData(categoryId, headerDataList.get(i).getBrand_id(), store_id);
|
||||||
if (!(childDataList.size() > 0)) {
|
if (!(childDataList.size() > 0)) {
|
||||||
if (country_id.equals("7") || country_id.equals("8")) {
|
if (country_id.equals("7") || country_id.equals("8")) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), null, null, null, store_id, CommonString.TABLE_MAPPING_STOCK_STOREWISE, store_flag_hide);
|
||||||
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
} else if (store_flag_str.equalsIgnoreCase(CommonString.FROM_DEVIATION)) {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK_ADHOC, store_flag_hide);
|
||||||
} else {
|
} else {
|
||||||
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK);
|
childDataList = db.getMSL_Availability_StockFacingSKUData(headerDataList.get(i).getSub_category_id(), categoryId, headerDataList.get(i).getBrand_id(), keyAccount_id, storeType_id, class_id, store_id, CommonString.TABLE_MAPPING_STOCK, store_flag_hide);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -738,7 +502,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
//Company_id
|
//Company_id
|
||||||
if (listDataChild.get(listDataHeader.get(i)).get(j).getCompany_id().equals("1")) {
|
if (listDataChild.get(listDataHeader.get(i)).get(j).getCompany_id().equals("1")) {
|
||||||
if (data.getMust_have().equals("1")) {
|
if (data.getMust_have().equals("1")) {
|
||||||
//usk
|
//usk ksa pricing
|
||||||
if (!defaultpricing.equals("0")) {
|
if (!defaultpricing.equals("0")) {
|
||||||
if (pricing.equals("")) {
|
if (pricing.equals("")) {
|
||||||
if (!checkHeaderArray.contains(i)) {
|
if (!checkHeaderArray.contains(i)) {
|
||||||
@@ -753,15 +517,44 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (faceup.equals("")) {
|
if (store_flag_hide.equals("0")) {
|
||||||
if (!checkHeaderArray.contains(i)) {
|
if (faceup.equals("")) {
|
||||||
checkHeaderArray.add(i);
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
all_flag = false;
|
||||||
|
flag = false;
|
||||||
|
child_flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.faceup_value);
|
||||||
|
} else {
|
||||||
|
if (data.getToggleValue().equals("0")) {
|
||||||
|
if (stock.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
all_flag = false;
|
||||||
|
flag = false;
|
||||||
|
child_flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.stock_value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//for Egypt
|
||||||
|
if (country_id.equals("6")) {
|
||||||
|
if (stock.equals("")) {
|
||||||
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
all_flag = false;
|
||||||
|
flag = false;
|
||||||
|
child_flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.stock_value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
scrollPosition = i + j + childCount;
|
|
||||||
all_flag = false;
|
|
||||||
flag = false;
|
|
||||||
child_flag = false;
|
|
||||||
Error_Message = getResources().getString(R.string.faceup_value);
|
|
||||||
} else {
|
} else {
|
||||||
if (data.getToggleValue().equals("0")) {
|
if (data.getToggleValue().equals("0")) {
|
||||||
if (stock.equals("")) {
|
if (stock.equals("")) {
|
||||||
@@ -790,19 +583,23 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (faceup.equals("")) {
|
if (store_flag_hide.equals("0")) {
|
||||||
if (!checkHeaderArray.contains(i)) {
|
if (faceup.equals("")) {
|
||||||
checkHeaderArray.add(i);
|
if (!checkHeaderArray.contains(i)) {
|
||||||
|
checkHeaderArray.add(i);
|
||||||
|
}
|
||||||
|
scrollPosition = i + j + childCount;
|
||||||
|
all_flag = false;
|
||||||
|
flag = false;
|
||||||
|
child_flag = false;
|
||||||
|
Error_Message = getResources().getString(R.string.faceup_value);
|
||||||
}
|
}
|
||||||
scrollPosition = i + j + childCount;
|
|
||||||
all_flag = false;
|
|
||||||
flag = false;
|
|
||||||
child_flag = false;
|
|
||||||
Error_Message = getResources().getString(R.string.faceup_value);
|
|
||||||
}
|
}
|
||||||
//usk
|
//usk
|
||||||
|
/*
|
||||||
if (!defaultpricing.equals("0")) {
|
if (!defaultpricing.equals("0")) {
|
||||||
if (pricing.equals("")) {
|
if (pricing.equals("")) {
|
||||||
if (!checkHeaderArray.contains(i)) {
|
if (!checkHeaderArray.contains(i)) {
|
||||||
@@ -816,26 +613,9 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
//usk
|
|
||||||
/*
|
|
||||||
if (defaultpricing.equals("0")) {
|
|
||||||
if (pricing.equals("")) {
|
|
||||||
if (!checkHeaderArray.contains(i)) {
|
|
||||||
checkHeaderArray.add(i);
|
|
||||||
}
|
|
||||||
scrollPosition = i + j + childCount;
|
|
||||||
all_flag = false;
|
|
||||||
flag = false;
|
|
||||||
child_flag = false;
|
|
||||||
Error_Message = getResources().getString(R.string.title_activity_stock_pricing);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!child_flag)
|
if (!child_flag)
|
||||||
listTemp.add(data);
|
listTemp.add(data);
|
||||||
@@ -866,32 +646,6 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
//super.onBackPressed();
|
//super.onBackPressed();
|
||||||
|
|
||||||
/*AlertDialog.Builder builder = new AlertDialog.Builder(MSL_Availability_StockFacingActivity.this);
|
|
||||||
builder.setTitle(getResources().getString(R.string.dialog_title));
|
|
||||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
|
||||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
|
||||||
|
|
||||||
//adapter.notifyDataSetChanged();
|
|
||||||
if (!validateData(hashMapListHeaderData, hashMapListChildData)) {
|
|
||||||
|
|
||||||
if (!camera_allow.equals("1")) {
|
|
||||||
db.deletePlanogramListStoreAndCategorywise(store_id, categoryId,
|
|
||||||
planogramShelfHeaderDataList, planogramHashMapListChildData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
AlertDialog alert = builder.create();
|
|
||||||
alert.show();*/
|
|
||||||
if (editFlag) {
|
if (editFlag) {
|
||||||
CommonFunctions.showAlertDialog(MSL_Availability_StockFacingActivity.this, getResources().getString(R.string.data_will_be_lost));
|
CommonFunctions.showAlertDialog(MSL_Availability_StockFacingActivity.this, getResources().getString(R.string.data_will_be_lost));
|
||||||
} else {
|
} else {
|
||||||
@@ -900,20 +654,6 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* if(flag){
|
|
||||||
//adapter.notifyDataSetChanged();
|
|
||||||
if (!validateData(hashMapListHeaderData, hashMapListChildData)) {
|
|
||||||
|
|
||||||
if (!camera_allow.equals("1")) {
|
|
||||||
db.deletePlanogramListStoreAndCategorywise(store_id, categoryId,
|
|
||||||
planogramShelfHeaderDataList, planogramHashMapListChildData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||||
@@ -1036,6 +776,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
||||||
holder.ed_pricing = (EditText) convertView.findViewById(R.id.ed_pricing);
|
holder.ed_pricing = (EditText) convertView.findViewById(R.id.ed_pricing);
|
||||||
|
|
||||||
|
holder.facing_view = convertView.findViewById(R.id.facing_view);
|
||||||
holder.stock_view = convertView.findViewById(R.id.stock_view);
|
holder.stock_view = convertView.findViewById(R.id.stock_view);
|
||||||
holder.pricing_view = convertView.findViewById(R.id.pricing_view);
|
holder.pricing_view = convertView.findViewById(R.id.pricing_view);
|
||||||
convertView.setTag(holder);
|
convertView.setTag(holder);
|
||||||
@@ -1043,6 +784,14 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
holder = (ViewHolder) convertView.getTag();
|
holder = (ViewHolder) convertView.getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// uae facing hide
|
||||||
|
if (store_flag_hide.equals("1")) {
|
||||||
|
holder.facing.setVisibility(View.GONE);
|
||||||
|
holder.facing_view.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
holder.facing.setVisibility(View.VISIBLE);
|
||||||
|
holder.facing_view.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
//usk
|
//usk
|
||||||
if (childData.getPricing().equals("0")) {
|
if (childData.getPricing().equals("0")) {
|
||||||
holder.ed_pricing.setVisibility(View.GONE);
|
holder.ed_pricing.setVisibility(View.GONE);
|
||||||
@@ -1282,13 +1031,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
holder.ed_pricing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
holder.ed_pricing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFocusChange(View v, boolean hasFocus) {
|
public void onFocusChange(View v, boolean hasFocus) {
|
||||||
/*final EditText caption = (EditText) v;
|
|
||||||
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
|
||||||
|
|
||||||
if (!edStock.equals("")) {
|
|
||||||
String stock = edStock;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
if (!hasFocus) {
|
if (!hasFocus) {
|
||||||
final EditText Caption = (EditText) v;
|
final EditText Caption = (EditText) v;
|
||||||
String value1 = Caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
String value1 = Caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||||
@@ -1637,7 +1380,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity impl
|
|||||||
ToggleButton toggle_available;
|
ToggleButton toggle_available;
|
||||||
LinearLayout lin_category;
|
LinearLayout lin_category;
|
||||||
EditText facing, stock, ed_pricing;
|
EditText facing, stock, ed_pricing;
|
||||||
View stock_view, pricing_view;
|
View stock_view, pricing_view, facing_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -633,7 +633,7 @@ public class PreviousDataUploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
request.addProperty("XMLDATA", sos_xml);
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
request.addProperty("KEYS", "STOCK_AVAILABILITY_POINT_LATEST_NEW");
|
request.addProperty("KEYS", "STOCK_AVAILABILITY_WITH_PRICING");
|
||||||
request.addProperty("USERNAME", userId);
|
request.addProperty("USERNAME", userId);
|
||||||
request.addProperty("MID", mid);
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
request.addProperty("XMLDATA", sos_xml);
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
request.addProperty("KEYS", "STOCK_AVAILABILITY_POINT_LATEST_NEW");
|
request.addProperty("KEYS", "STOCK_AVAILABILITY_WITH_PRICING");
|
||||||
request.addProperty("USERNAME", userId);
|
request.addProperty("USERNAME", userId);
|
||||||
request.addProperty("MID", mid);
|
request.addProperty("MID", mid);
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ public class UploadImageWithRetrofit {
|
|||||||
call.enqueue(new retrofit.Callback<String>() {
|
call.enqueue(new retrofit.Callback<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(retrofit.Response<String> response) {
|
public void onResponse(retrofit.Response<String> response) {
|
||||||
if (response.isSuccess() && response.body().contains("Success")) {
|
if (response.isSuccess() && response.body().contains("Success")) {
|
||||||
finalFile.delete();
|
finalFile.delete();
|
||||||
status = 1;
|
status = 1;
|
||||||
uploadedFiles++;
|
uploadedFiles++;
|
||||||
@@ -306,53 +306,79 @@ public class UploadImageWithRetrofit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public File saveBitmapToFileSmaller(File file) {
|
public File saveBitmapToFileSmaller(File file) {
|
||||||
File file2 = file;
|
File file2 = file;
|
||||||
try {
|
try {
|
||||||
int inWidth = 0;
|
|
||||||
int inHeight = 0;
|
|
||||||
|
|
||||||
InputStream in = new FileInputStream(file2);
|
InputStream in = new FileInputStream(file2);
|
||||||
// decode image size (decode metadata only, not the whole image)
|
// decode image size (decode metadata only, not the whole image)
|
||||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
options.inJustDecodeBounds = true;
|
options.inJustDecodeBounds = true;
|
||||||
BitmapFactory.decodeStream(in, null, options);
|
BitmapFactory.decodeStream(in, null, options);
|
||||||
in.close();
|
in.close();
|
||||||
in = null;
|
|
||||||
|
|
||||||
// save width and height
|
// decode full image pre-resized
|
||||||
inWidth = options.outWidth;
|
in = new FileInputStream(file2);
|
||||||
inHeight = options.outHeight;
|
options = new BitmapFactory.Options();
|
||||||
|
// decode full image
|
||||||
|
Bitmap roughBitmap = BitmapFactory.decodeStream(in, null, options);
|
||||||
|
|
||||||
// decode full image pre-resized
|
// save image
|
||||||
in = new FileInputStream(file2);
|
FileOutputStream out = new FileOutputStream(file2);
|
||||||
options = new BitmapFactory.Options();
|
roughBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
|
||||||
// calc rough re-size (this is no exact resize)
|
|
||||||
//usk commonet code
|
|
||||||
// options.inSampleSize = Math.max(inWidth / 1632, inHeight / 1224);
|
|
||||||
// decode full image
|
|
||||||
Bitmap roughBitmap = BitmapFactory.decodeStream(in, null, options);
|
|
||||||
|
|
||||||
// calc exact destination size
|
} catch (Exception e) {
|
||||||
Matrix m = new Matrix();
|
Log.e("Image", e.toString(), e);
|
||||||
RectF inRect = new RectF(0, 0, roughBitmap.getWidth(), roughBitmap.getHeight());
|
return file;
|
||||||
RectF outRect = new RectF(0, 0, 1632, 1224);
|
}
|
||||||
m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.CENTER);
|
return file2;
|
||||||
float[] values = new float[9];
|
}
|
||||||
m.getValues(values);
|
/* public File saveBitmapToFileSmaller(File file) {
|
||||||
// resize bitmap
|
File file2 = file;
|
||||||
Bitmap resizedBitmap = Bitmap.createScaledBitmap(roughBitmap, (int) (roughBitmap.getWidth() * values[0]), (int) (roughBitmap.getHeight() * values[4]), true);
|
try {
|
||||||
// save image
|
int inWidth = 0;
|
||||||
FileOutputStream out = new FileOutputStream(file2);
|
int inHeight = 0;
|
||||||
// resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 80, out);
|
|
||||||
resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
|
InputStream in = new FileInputStream(file2);
|
||||||
|
// decode image size (decode metadata only, not the whole image)
|
||||||
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
|
options.inJustDecodeBounds = true;
|
||||||
|
BitmapFactory.decodeStream(in, null, options);
|
||||||
|
in.close();
|
||||||
|
in = null;
|
||||||
|
|
||||||
|
// save width and height
|
||||||
|
inWidth = options.outWidth;
|
||||||
|
inHeight = options.outHeight;
|
||||||
|
|
||||||
|
// decode full image pre-resized
|
||||||
|
in = new FileInputStream(file2);
|
||||||
|
options = new BitmapFactory.Options();
|
||||||
|
// calc rough re-size (this is no exact resize)
|
||||||
|
options.inSampleSize = Math.max(inWidth / 1632, inHeight / 1224);
|
||||||
|
// decode full image
|
||||||
|
Bitmap roughBitmap = BitmapFactory.decodeStream(in, null, options);
|
||||||
|
|
||||||
|
// calc exact destination size
|
||||||
|
Matrix m = new Matrix();
|
||||||
|
RectF inRect = new RectF(0, 0, roughBitmap.getWidth(), roughBitmap.getHeight());
|
||||||
|
RectF outRect = new RectF(0, 0, 1632, 1224);
|
||||||
|
m.setRectToRect(inRect, outRect, Matrix.ScaleToFit.CENTER);
|
||||||
|
float[] values = new float[9];
|
||||||
|
m.getValues(values);
|
||||||
|
// resize bitmap
|
||||||
|
Bitmap resizedBitmap = Bitmap.createScaledBitmap(roughBitmap, (int) (roughBitmap.getWidth() * values[0]), (int) (roughBitmap.getHeight() * values[4]), true);
|
||||||
|
// save image
|
||||||
|
FileOutputStream out = new FileOutputStream(file2);
|
||||||
|
resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 80, out);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("Image", e.toString(), e);
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
return file2;
|
||||||
|
}*/
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e("Image", e.toString(), e);
|
|
||||||
return file;
|
|
||||||
}
|
|
||||||
return file2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void showAlert(final Context context, String str, final boolean flag) {
|
public void showAlert(final Context context, String str, final boolean flag) {
|
||||||
|
|
||||||
|
|||||||
+10
@@ -30,6 +30,16 @@ public class JourneyPlanGetterSetter implements Serializable{
|
|||||||
|
|
||||||
ArrayList<String> POG_TYPE_ID = new ArrayList<String>();
|
ArrayList<String> POG_TYPE_ID = new ArrayList<String>();
|
||||||
|
|
||||||
|
public ArrayList<String> getFACING_HIDE() {
|
||||||
|
return FACING_HIDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFACING_HIDE(String FACING_HIDE) {
|
||||||
|
this.FACING_HIDE.add(FACING_HIDE);
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList<String> FACING_HIDE = new ArrayList<String>();
|
||||||
|
|
||||||
public ArrayList<String> getCHANNEL_ID() {
|
public ArrayList<String> getCHANNEL_ID() {
|
||||||
return CHANNEL_ID;
|
return CHANNEL_ID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,6 +222,9 @@ public class XMLHandlers {
|
|||||||
if (xpp.getName().equals("POG_TYPE_ID")) {
|
if (xpp.getName().equals("POG_TYPE_ID")) {
|
||||||
jcpGetterSetter.setPOG_TYPE_ID(xpp.nextText());
|
jcpGetterSetter.setPOG_TYPE_ID(xpp.nextText());
|
||||||
}
|
}
|
||||||
|
if (xpp.getName().equals("FACING_HIDE")) {
|
||||||
|
jcpGetterSetter.setFACING_HIDE(xpp.nextText());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xpp.next();
|
xpp.next();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,13 +99,14 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:inputType="numberDecimal"
|
android:inputType="numberDecimal"
|
||||||
android:maxLength="3"
|
android:maxLength="3"
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="#222"
|
android:textColor="#222"
|
||||||
android:textColorHint="#666" />
|
android:textColorHint="#666" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/facing_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/black" />
|
android:background="@color/black" />
|
||||||
|
|||||||
Reference in New Issue
Block a user