Merge branch 'master' into ysy_t2p_valid
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<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">
|
||||
<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">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -15,6 +15,7 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
|
||||
@@ -116,6 +117,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_T2P_SKU);
|
||||
|
||||
db.execSQL(TableBean.getMappingPlanogram());
|
||||
db.execSQL(TableBean.getAdditionalDisplay());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2630,6 +2633,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, null, values);
|
||||
|
||||
if(skulist!=null)
|
||||
{
|
||||
|
||||
for (int j = 0; j < skulist.size(); j++) {
|
||||
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||
values1.put(CommonString.KEY_STORE_ID, skulist.get(j).getStore_id());
|
||||
@@ -2642,7 +2648,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.getMessage());
|
||||
@@ -3023,4 +3029,119 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public ArrayList<AddittionalGetterSetter> getAdditionalMainStock(String store_id, String categoryId) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<AddittionalGetterSetter> productData = new ArrayList<AddittionalGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
// cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id + "'categoryId = '"+categoryId + "'", null);
|
||||
cursordata = db.rawQuery("Select * from Stock_Additional_visibility_Main " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
AddittionalGetterSetter sb = new AddittionalGetterSetter();
|
||||
|
||||
|
||||
sb.setKey_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("KEY_ID")));
|
||||
|
||||
sb.setStore_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("Store_Id")));
|
||||
|
||||
sb.setCategoryId(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("categoryId")));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("brand_id")));
|
||||
|
||||
sb.setBrand(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("brand_name")));
|
||||
|
||||
|
||||
sb.setImage(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("image_url")));
|
||||
|
||||
sb.setSku_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("sku_id")));
|
||||
|
||||
sb.setSku(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("sku_name")));
|
||||
sb.setBtn_toogle(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("toggle_value")));
|
||||
|
||||
productData.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return productData;
|
||||
|
||||
}
|
||||
|
||||
public void InsertADDITIONAL_DISPLAY(ADDITIONAL_DISPLAY_MASTERGetterSetter data) {
|
||||
db.delete("ADDITIONAL_DISPLAY_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getDISPLAY_ID().size(); i++) {
|
||||
|
||||
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
|
||||
values.put("DISPLAY", data.getDISPLAY().get(i));
|
||||
values.put("IMAGE_PATH", data.getIMAGE_PATH().get(i));
|
||||
values.put("IMAGE_URL", data.getIMAGE_URL().get(i));
|
||||
db.insert("ADDITIONAL_DISPLAY_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " ADDITIONAL_DISPLAY_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> getADDITIONAL_DISPLAYData(String store_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> Data = new ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM ADDITIONAL_DISPLAY_MASTER ", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
ADDITIONAL_DISPLAY_MASTERGetterSetter sb = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
|
||||
sb.setDISPLAY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("DISPLAY_ID")));
|
||||
sb.setDISPLAY(cursordata.getString(cursordata.getColumnIndexOrThrow("DISPLAY")));
|
||||
sb.setIMAGE_URL(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_URL")));
|
||||
sb.setIMAGE_PATH(cursordata.getString(cursordata.getColumnIndexOrThrow("IMAGE_PATH")));
|
||||
|
||||
Data.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return Data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -884,7 +884,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_SUCCESS
|
||||
GeoTagActivity.this, getResources().getString(R.string.uploadeddata)
|
||||
+ result, getResources().getString(R.string.success), null);
|
||||
message.showMessage();
|
||||
|
||||
|
||||
+283
-142
@@ -60,6 +60,7 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.DailyDataMenuActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
@@ -71,6 +72,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
public class AdditionalVisibility extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {
|
||||
ArrayList<AdditionalDialogGetterSetter> list = new ArrayList<AdditionalDialogGetterSetter>();
|
||||
ArrayList<AddittionalGetterSetter> listdata = new ArrayList<AddittionalGetterSetter>();
|
||||
ArrayList<AddittionalGetterSetter> listMain = new ArrayList<AddittionalGetterSetter>();
|
||||
ArrayList<AdditionalDialogGetterSetter> additionalVisibilitySkuList;
|
||||
ArrayList<AdditionalDialogGetterSetter> additionalVisibilityinsertSkuList;
|
||||
ArrayList<AdditionalDialogGetterSetter> uploadlist = new ArrayList<AdditionalDialogGetterSetter>();
|
||||
@@ -92,25 +94,27 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
ArrayList<BrandMasterGetterSetter> brandList;
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brand_list;
|
||||
ArrayList<SkuMasterGetterSetter> skuMaster_list;
|
||||
ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> DisplayMaster_list;
|
||||
//ArrayList<ADDITIONAL_DISPLAY_MASTERGetterSetter> DisplayMaster_list;
|
||||
|
||||
|
||||
|
||||
ArrayList<SkuGetterSetter> empty_list = new ArrayList<>();
|
||||
String _pathforcheck, _path, str, msg;
|
||||
private SharedPreferences preferences;
|
||||
String store_id, date, intime, img_str, togglevalue = "1",CATEGORY_ID;
|
||||
String store_id, date, intime, img_str, togglevalue = "1", CATEGORY_ID, camera_allow;
|
||||
ImageView img_cam, img_clicked;
|
||||
Button btn_add, btn_close;
|
||||
EditText Edt_txt;
|
||||
MyAdaptorStock adapterData;
|
||||
ListView listviewlay;
|
||||
String errormsg,categoryName,categoryId;
|
||||
String errormsg, categoryName, categoryId;
|
||||
MyAdaptorAdditionalStock adapteradditional;
|
||||
AddittionalGetterSetter adGt,newadd;
|
||||
AddittionalGetterSetter adGt, newadd;
|
||||
LinearLayout brandlayout, diaplylayout, cameralayout;
|
||||
FloatingActionButton fab;
|
||||
//RelativeLayout skulayout;
|
||||
CardView cardvew;
|
||||
CardView cardvew, maincard;
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
|
||||
@@ -127,8 +131,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
@@ -142,8 +146,6 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
spinner_brand_list = (Spinner) findViewById(R.id.spinner_Brand1);
|
||||
spinner_sku_list = (Spinner) findViewById(R.id.spinner_SkuMaster);
|
||||
cardvew = (CardView) findViewById(R.id.cardviewid);
|
||||
|
||||
|
||||
btntoggle = (ToggleButton) findViewById(R.id.btntoggle);
|
||||
btnimage = (ImageView) findViewById(R.id.btn_image);
|
||||
btnedit = (ImageView) findViewById(R.id.btn_edit);
|
||||
@@ -154,17 +156,16 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
diaplylayout = (LinearLayout) findViewById(R.id.tv_displaylayout);
|
||||
cameralayout = (LinearLayout) findViewById(R.id.tv_cameralayout);
|
||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
//skulayout = (RelativeLayout) findViewById(R.id.tv_skulayout);
|
||||
maincard = (CardView) findViewById(R.id.cardviewid);
|
||||
|
||||
btntoggle.setChecked(true);
|
||||
|
||||
|
||||
str = CommonString.FILE_PATH;
|
||||
|
||||
///band List
|
||||
brand_list = db.getBrandMasterData(store_id);
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
String str= getResources().getString(R.string.select);
|
||||
String str = getResources().getString(R.string.select);
|
||||
brand.setBRAND(str);
|
||||
brand_list.add(0, brand);
|
||||
CustomAdapter adapter = new CustomAdapter(AdditionalVisibility.this, R.layout.custom_spinner_item, brand_list);
|
||||
@@ -173,12 +174,12 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
///Display List
|
||||
|
||||
skuMaster_list = db.getSKUMasterData(store_id);
|
||||
DisplayMaster_list = db.getADDITIONAL_DISPLAYData(store_id);
|
||||
|
||||
SkuMasterGetterSetter select = new SkuMasterGetterSetter();
|
||||
select.setSKU(str);
|
||||
skuMaster_list.add(0, select);
|
||||
CustomSkuMasterAdpter skuadapter = new CustomSkuMasterAdpter(AdditionalVisibility.this, R.layout.custom_spinner_item, skuMaster_list);
|
||||
ADDITIONAL_DISPLAY_MASTERGetterSetter select = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
|
||||
select.setDISPLAY_ID(str);
|
||||
DisplayMaster_list.add(0, select);
|
||||
CustomSkuMasterAdpter skuadapter = new CustomSkuMasterAdpter(AdditionalVisibility.this, R.layout.custom_spinner_item, DisplayMaster_list);
|
||||
spinner_sku_list.setAdapter(skuadapter);
|
||||
|
||||
spinner_brand_list.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@@ -205,8 +206,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
if (position != 0) {
|
||||
|
||||
sku_list_name = skuMaster_list.get(position).getSKU().get(0);
|
||||
sku_list_id = skuMaster_list.get(position).getSKU_ID().get(0);
|
||||
sku_list_name = DisplayMaster_list.get(position).getDISPLAY().get(0);
|
||||
sku_list_id = DisplayMaster_list.get(position).getDISPLAY_ID().get(0);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -217,18 +218,19 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
}
|
||||
});
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
/// maintable
|
||||
|
||||
listMain = db.getAdditionalMainStock(store_id, categoryId);
|
||||
|
||||
for (int k = 0; k < listdata.size(); k++) {
|
||||
for (int k = 0; k < listMain.size(); k++) {
|
||||
|
||||
String tooglevalue= listdata.get(k).getBtn_toogle();
|
||||
String tooglevalue = listMain.get(k).getBtn_toogle();
|
||||
|
||||
if(tooglevalue.equalsIgnoreCase("0"))
|
||||
{
|
||||
if (tooglevalue.equalsIgnoreCase("0")) {
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
btntoggle.setChecked(false);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
@@ -242,11 +244,33 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
}
|
||||
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
for (int k = 0; k < listdata.size(); k++) {
|
||||
|
||||
String tooglevalue = listdata.get(k).getBtn_toogle();
|
||||
|
||||
if (tooglevalue.equalsIgnoreCase("0")) {
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
btntoggle.setChecked(false);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (listdata.size() > 0) {
|
||||
for (int i = 0; i < listdata.size(); i++) {
|
||||
if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
@@ -256,6 +280,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
maincard.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,64 +290,112 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
if (togglevalue.equals("1")) {
|
||||
|
||||
if(listdata.size()>0)
|
||||
{
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
db.deleteStockEntryMainTable(store_id,categoryId);
|
||||
if (listdata.size() > 0) {
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage(getResources().getString(R.string.title_activity_save_data))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
for (int J = 0; J < listdata.size(); J++) {
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(listdata.get(J).getBrand_id());
|
||||
newadd.setBrand_id(listdata.get(J).getBrand_id());
|
||||
newadd.setImage(listdata.get(J).getImage());
|
||||
newadd.setSku(listdata.get(J).getSku());
|
||||
newadd.setSku_id(listdata.get(J).getSku_id());
|
||||
newadd.setStore_id(listdata.get(J).getStore_id());
|
||||
newadd.setBtn_toogle(listdata.get(J).getBtn_toogle());
|
||||
newadd.setCategoryId(listdata.get(J).getCategoryId());
|
||||
String KeyID = listdata.get(J).getKey_id();
|
||||
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||
db.deleteStockEntryMainTable(store_id, categoryId);
|
||||
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList,categoryId);
|
||||
for (int J = 0; J < listdata.size(); J++) {
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(listdata.get(J).getBrand_id());
|
||||
newadd.setBrand_id(listdata.get(J).getBrand_id());
|
||||
newadd.setImage(listdata.get(J).getImage());
|
||||
newadd.setSku(listdata.get(J).getSku());
|
||||
newadd.setSku_id(listdata.get(J).getSku_id());
|
||||
newadd.setStore_id(listdata.get(J).getStore_id());
|
||||
newadd.setBtn_toogle(listdata.get(J).getBtn_toogle());
|
||||
newadd.setCategoryId(listdata.get(J).getCategoryId());
|
||||
String KeyID = listdata.get(J).getKey_id();
|
||||
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||
|
||||
KeyID="";
|
||||
additionalVisibilitySkuList.clear();
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
|
||||
|
||||
KeyID = "";
|
||||
additionalVisibilitySkuList.clear();
|
||||
}
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
// show it
|
||||
alertDialog.show();
|
||||
|
||||
} else {
|
||||
Snackbar.make(view, getResources().getString(R.string.title_activity_Want_add), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_save));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage(getResources().getString(R.string.title_activity_save_data))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(brand_list_name);
|
||||
newadd.setBrand_id(brand_list_id);
|
||||
newadd.setImage(img_str);
|
||||
newadd.setSku(sku_list_name);
|
||||
newadd.setSku_id(sku_list_id);
|
||||
newadd.setStore_id(store_id);
|
||||
newadd.setBtn_toogle(togglevalue);
|
||||
newadd.setCategoryId(categoryId);
|
||||
|
||||
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
|
||||
finish();
|
||||
}
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
|
||||
// show it
|
||||
alertDialog.show();
|
||||
// show it
|
||||
alertDialog.show();
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
Snackbar.make(view, getResources().getString(R.string.title_activity_Want_add), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
|
||||
}});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
btnaddlayout.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -346,12 +419,12 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_add));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setMessage(getResources().getString(R.string.adddatatoclick))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.InsertAdditionalData(adGt, defdata,categoryId);
|
||||
db.InsertAdditionalData(adGt, defdata, categoryId);
|
||||
spinner_brand_list.setSelection(0);
|
||||
spinner_sku_list.setSelection(0);
|
||||
img_str = "";
|
||||
@@ -361,26 +434,29 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
sku_list_id = "";
|
||||
defdata.clear();
|
||||
|
||||
btnimage.setBackgroundResource(R.mipmap.camera);
|
||||
if (camera_allow.equals("1")) {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
if (listdata.size() > 0) {
|
||||
for(int i=0;i<listdata.size();i++)
|
||||
{
|
||||
if(listdata.get(i).getBtn_toogle().equalsIgnoreCase("0"))
|
||||
{
|
||||
for (int i = 0; i < listdata.size(); i++) {
|
||||
if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
maincard.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -416,22 +492,22 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (btntoggle.isChecked()) {
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
if(listdata.size()>0)
|
||||
{
|
||||
if (listdata.size() > 0) {
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_delete));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setMessage(getResources().getString(R.string.title_activity_click_delete))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
togglevalue = "1";
|
||||
db.deleteStockEntryall(store_id,categoryId);
|
||||
btntoggle.setChecked(true);
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
@@ -439,8 +515,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
@@ -452,6 +528,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
dialog.cancel();
|
||||
btntoggle.setChecked(false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -460,25 +537,75 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
// show it
|
||||
alertDialog.show();
|
||||
|
||||
}else
|
||||
{
|
||||
togglevalue = "1";
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
||||
listMain = db.getAdditionalMainStock(store_id, categoryId);
|
||||
|
||||
if(listMain.size()>0)
|
||||
{
|
||||
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_delete));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage(getResources().getString(R.string.title_activity_click_delete))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
togglevalue = "1";
|
||||
btntoggle.setChecked(true);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
dialog.cancel();
|
||||
btntoggle.setChecked(false);
|
||||
}
|
||||
});
|
||||
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
// show it
|
||||
alertDialog.show();
|
||||
|
||||
}
|
||||
else{
|
||||
togglevalue = "1";
|
||||
btntoggle.setChecked(true);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
if(listdata.size()>0)
|
||||
{
|
||||
if (listdata.size() > 0) {
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
// set title
|
||||
@@ -486,31 +613,35 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setMessage(getResources().getString(R.string.title_activity_click_delete))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.deleteStockEntryall(store_id,categoryId);
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
togglevalue = "0";
|
||||
btntoggle.setChecked(false);
|
||||
|
||||
defdata.clear();
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
// if this button is clicked, just close
|
||||
// the dialog box and do nothing
|
||||
btntoggle.setChecked(true);
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
@@ -520,32 +651,43 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
// show it
|
||||
alertDialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
togglevalue = "0";
|
||||
defdata.clear();
|
||||
btntoggle.setChecked(false);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
btnimage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck = store_id + getResources().getString(R.string.store)
|
||||
+getResources().getString(R.string.image) + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
intime = getCurrentTime();
|
||||
startCameraActivity();
|
||||
if (camera_allow.equals("1")) {
|
||||
|
||||
}
|
||||
});
|
||||
btnimage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck = store_id + getResources().getString(R.string.store)
|
||||
+ getResources().getString(R.string.image) + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
intime = getCurrentTime();
|
||||
startCameraActivity();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_grey);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
btnsku.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -713,7 +855,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
SkuMasterGetterSetter tempValues = null;
|
||||
ADDITIONAL_DISPLAY_MASTERGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
|
||||
/*************
|
||||
@@ -753,7 +895,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (SkuMasterGetterSetter) data.get(position);
|
||||
tempValues = (ADDITIONAL_DISPLAY_MASTERGetterSetter) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
@@ -764,7 +906,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getSKU().get(0));
|
||||
label.setText(tempValues.getDISPLAY().get(0));
|
||||
}
|
||||
|
||||
return row;
|
||||
@@ -821,8 +963,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 0);
|
||||
}
|
||||
catch (ActivityNotFoundException e) {
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
@@ -830,11 +971,11 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
intent.setPackage(gallery_package);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
|
||||
@@ -849,7 +990,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_done);
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_green);
|
||||
|
||||
img_str = _pathforcheck;
|
||||
_pathforcheck = "";
|
||||
@@ -1286,11 +1427,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
db.deleteStockEntry(listdata.get(position1).getKey_id());
|
||||
|
||||
|
||||
|
||||
adapteradditional.notifyDataSetChanged();
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
listdata = db.getAdditionalStock(store_id, categoryId);
|
||||
|
||||
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
@@ -1305,6 +1444,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
@@ -1312,6 +1452,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
maincard.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1363,16 +1504,18 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
flag = true;
|
||||
} else {
|
||||
|
||||
|
||||
if (brandid.equalsIgnoreCase("") || skuid.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
|
||||
errormsg = getResources().getString(R.string.title_activity_select_dropdown);
|
||||
|
||||
} else if (imageu == null || imageu.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
} else if (camera_allow.equals("1")) {
|
||||
if (imageu == null || imageu.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
|
||||
errormsg = getResources().getString(R.string.title_activity_take_image);
|
||||
errormsg = getResources().getString(R.string.title_activity_take_image);
|
||||
|
||||
}
|
||||
|
||||
} else if (dialog.size() == 0) {
|
||||
|
||||
@@ -1420,21 +1563,19 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
String lang;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
if (language.equalsIgnoreCase("English")) {
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
} else if (language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -69,7 +70,8 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
AlertDialog alert;
|
||||
ImageButton camera;
|
||||
RelativeLayout reason_lay, rel_cam;
|
||||
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
boolean leave_flag = false;
|
||||
|
||||
ArrayList<StoreBean> jcp;
|
||||
@@ -179,12 +181,21 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
}
|
||||
|
||||
protected void startCameraActivity() {
|
||||
|
||||
try {
|
||||
Log.i("MakeMachine", "startCameraActivity()");
|
||||
/*Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
Intent intent = new Intent(
|
||||
MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
|
||||
startActivityForResult(intent, 0);*/
|
||||
|
||||
Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
outputFileUri = Uri.fromFile(file);
|
||||
|
||||
String defaultCameraPackage = "";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
@@ -193,6 +204,11 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);
|
||||
|
||||
//temp value in case camera is gallery app above jellybean
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||
gallery_package = list.get(n).packageName;
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
@@ -207,18 +223,26 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(
|
||||
android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
//com.android.gallery3d
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 0);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(gallery_package);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
@@ -297,9 +321,9 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(
|
||||
NonWorkingReason.this);
|
||||
builder.setMessage("Do you want to save the data ")
|
||||
builder.setMessage( R.string.title_activity_save_data)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK",
|
||||
.setPositiveButton(R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog,
|
||||
@@ -398,7 +422,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel",
|
||||
.setNegativeButton(R.string.closed,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog,
|
||||
@@ -411,17 +435,16 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
"Please enter required remark reason",
|
||||
Toast.makeText(getApplicationContext(), R.string.title_activity_select_dropdown,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
"Please Capture Image", Toast.LENGTH_SHORT).show();
|
||||
R.string.title_activity_take_image, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
"Please Select a Reason", Toast.LENGTH_SHORT).show();
|
||||
R.string.title_activity_select_dropdown, Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,24 +302,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*{
|
||||
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
|
||||
if (coverage.get(i).getStoreId().equals(store_id)) {
|
||||
if (coverage.get(i).getStatus().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
else {
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
@@ -399,7 +381,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel,
|
||||
.setNegativeButton(R.string.closed,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.util.Locale;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
@@ -76,6 +77,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
MappingPromotionGetterSetter mappingPromotionGetterSetter;
|
||||
MAPPING_ADDITIONAL_PROMOTION_MasterGetterSetter mapping_additional_promotion_masterGetterSetter;
|
||||
STORE_PERFORMANCE_MasterGetterSetter store_performance_masterGetterSetter;
|
||||
ADDITIONAL_DISPLAY_MASTERGetterSetter additional_display_getter_setter;
|
||||
|
||||
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
|
||||
private Dialog dialog;
|
||||
private ProgressBar pb;
|
||||
@@ -639,6 +642,42 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
//ADDITIONAL_DISPLAY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "ADDITIONAL_DISPLAY_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
additional_display_getter_setter = XMLHandlers.ADDITIONAL_DISPLAY_MASTERXMLHandler(xpp, eventType);
|
||||
|
||||
if (additional_display_getter_setter.getDISPLAY_ID().size() > 0) {
|
||||
String table_store_display = additional_display_getter_setter.getTable_STORE_ADDITIONAL_DISPLAY();
|
||||
if (table_store_display != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setAdditionalDisplay(table_store_display);
|
||||
}
|
||||
} else {
|
||||
//return "ADDITIONAL_DISPLAY_MASTER";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "ADDITIONAL_DISPLAY_MASTER Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
//MAPPING_PLANOGRAM
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
@@ -809,6 +848,9 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
db.InsertSTORE_PERFORMANCE(store_performance_masterGetterSetter);
|
||||
db.InsertMAPPING_PLANOGRAM(mapping_planogram_masterGetterSetter);
|
||||
db.InsertADDITIONAL_DISPLAY(additional_display_getter_setter);
|
||||
|
||||
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
|
||||
+1
-1
@@ -230,7 +230,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
toggle_add_promoAnnouncer.setChecked(true);
|
||||
toggle_add_runningPos.setChecked(true);
|
||||
|
||||
Snackbar.make(v, "promo is add", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(v, "promo is added", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
//Toast.makeText(getApplicationContext(), "promo is add", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
})
|
||||
|
||||
+79
-28
@@ -7,6 +7,7 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
@@ -14,6 +15,7 @@ import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.net.Uri;
|
||||
@@ -38,6 +40,8 @@ import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.Button;
|
||||
@@ -67,6 +71,8 @@ import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
|
||||
import static android.R.attr.angle;
|
||||
|
||||
public class Stock_FacingActivity extends AppCompatActivity {
|
||||
static int child_position = -1;
|
||||
ExpandableListView expandableListView;
|
||||
@@ -265,7 +271,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -334,8 +340,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
//Camera allow enable
|
||||
if (camera_allow.equalsIgnoreCase("1")) {
|
||||
|
||||
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||
if (!stock.equals("0")) {
|
||||
//if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||
if (!stock.equals("0")) {
|
||||
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||
if (stock.equals("") || faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
@@ -346,17 +353,26 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (stock.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
break;
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.click_image);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (stock.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*} else {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
@@ -364,7 +380,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.click_image);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
} else {
|
||||
//Camera allow disable
|
||||
@@ -660,7 +676,6 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
finish();
|
||||
}
|
||||
})
|
||||
@@ -683,24 +698,35 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
//dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.planogram_dialog_layout);
|
||||
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
||||
|
||||
ImageView img_planogram = (ImageView) dialog.findViewById(R.id.img_planogram);
|
||||
dialog.setCancelable(false);
|
||||
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mp = db.getMappingPlanogramData("");
|
||||
|
||||
//ImageView img_planogram = (ImageView) dialog.findViewById(R.id.img_planogram);
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
|
||||
WebView webView = (WebView) dialog.findViewById(R.id.webview);
|
||||
webView.setWebViewClient(new MyWebViewClient());
|
||||
|
||||
webView.getSettings().setAllowFileAccess(true);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.getSettings().setBuiltInZoomControls(true);
|
||||
|
||||
String planogram_image = mp.get(0).getPLANOGRAM_IMAGE();
|
||||
if (new File(str + planogram_image).exists()) {
|
||||
Bitmap bmp = BitmapFactory.decodeFile(str + planogram_image);
|
||||
img_planogram.setImageBitmap(bmp);
|
||||
} else {
|
||||
img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||
}
|
||||
// img_planogram.setRotation(90);
|
||||
//img_planogram.setImageBitmap(bmp);
|
||||
|
||||
/*if (new File(str + "Stock_Cam1_3_9_01122017_162052.jpg").exists()) {
|
||||
Bitmap bmp = BitmapFactory.decodeFile(str + "Stock_Cam1_3_9_01122017_162052.jpg");
|
||||
img_planogram.setImageBitmap(bmp);
|
||||
} else {
|
||||
img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||
String imagePath = "file://" + CommonString.FILE_PATH + "/" + planogram_image;
|
||||
String html = "<html><head></head><body><img src=\"" + imagePath + "\"></body></html>";
|
||||
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
||||
|
||||
dialog.show();
|
||||
} /*else {
|
||||
//webView.loadUrl(String.valueOf(R.drawable.sad_cloud));
|
||||
|
||||
//img_planogram.setBackgroundResource(R.drawable.sad_cloud);
|
||||
}*/
|
||||
|
||||
|
||||
@@ -708,17 +734,39 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
cancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
//dialog.show();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private class MyWebViewClient extends WebViewClient {
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
view.clearCache(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
@@ -728,14 +776,12 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
@@ -951,7 +997,11 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (childData.getStock().equals("0")) {
|
||||
holder.ed_facing.setEnabled(false);
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
holder.ed_facing.setEnabled(false);
|
||||
} else {
|
||||
holder.ed_facing.setEnabled(true);
|
||||
}
|
||||
} else {
|
||||
holder.ed_facing.setEnabled(true);
|
||||
}
|
||||
@@ -971,6 +1021,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (stock.equals("0")) {
|
||||
childData.setFacing("0");
|
||||
finalHolder.ed_facing.setText("0");
|
||||
|
||||
finalHolder.ed_facing.setEnabled(false);
|
||||
} else {
|
||||
childData.setFacing(childData.getFacing());
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
import cpm.com.gskmtorange.R;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 03-01-2017.
|
||||
@@ -63,9 +64,9 @@ public class AlertMessage {
|
||||
public void ShowAlert1(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setTitle(R.string.dialog_title);
|
||||
builder.setMessage(str).setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
Intent i = new Intent(activity, GeoTagStoreList.class);
|
||||
@@ -84,9 +85,9 @@ public class AlertMessage {
|
||||
public void ShowAlertSocket(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setTitle(R.string.dialog_title);
|
||||
builder.setMessage(str).setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
Intent i = new Intent(activity, GeoTagStoreList.class);
|
||||
|
||||
@@ -865,6 +865,36 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
//// ashish close image
|
||||
|
||||
///////Start store images
|
||||
|
||||
if (coverageList.size() > 0) {
|
||||
for (int i1 = 0; i1 < coverageList.size(); i1++) {
|
||||
|
||||
if (coverageList.get(i1).getImage() != null && !coverageList.get(i1).getImage().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + coverageList.get(i1).getImage()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(coverageList.get(i1).getImage(), "StoreImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("StoreImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////close store images
|
||||
|
||||
for (int m = 0; m < t2PGetterSetters.size(); m++) {
|
||||
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 18-01-2017.
|
||||
*/
|
||||
|
||||
public class ADDITIONAL_DISPLAY_MASTERGetterSetter {
|
||||
|
||||
|
||||
ArrayList<String> DISPLAY_ID = new ArrayList<>();
|
||||
|
||||
public String getTable_STORE_ADDITIONAL_DISPLAY() {
|
||||
return table_STORE_ADDITIONAL_DISPLAY;
|
||||
}
|
||||
|
||||
public void setTable_STORE_ADDITIONAL_DISPLAY(String table_STORE_ADDITIONAL_DISPLAY) {
|
||||
this.table_STORE_ADDITIONAL_DISPLAY = table_STORE_ADDITIONAL_DISPLAY;
|
||||
}
|
||||
|
||||
String table_STORE_ADDITIONAL_DISPLAY;
|
||||
|
||||
|
||||
public ArrayList<String> getDISPLAY() {
|
||||
return DISPLAY;
|
||||
}
|
||||
|
||||
public void setDISPLAY(String DISPLAY) {
|
||||
this.DISPLAY.add(DISPLAY);
|
||||
}
|
||||
|
||||
public ArrayList<String> getDISPLAY_ID() {
|
||||
return DISPLAY_ID;
|
||||
}
|
||||
|
||||
public void setDISPLAY_ID(String DISPLAY_ID) {
|
||||
this.DISPLAY_ID.add(DISPLAY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getIMAGE_URL() {
|
||||
return IMAGE_URL;
|
||||
}
|
||||
|
||||
public void setIMAGE_URL(String IMAGE_URL) {
|
||||
this.IMAGE_URL.add(IMAGE_URL);
|
||||
}
|
||||
|
||||
ArrayList<String> DISPLAY = new ArrayList<>();
|
||||
ArrayList<String> IMAGE_URL = new ArrayList<>();
|
||||
|
||||
public ArrayList<String> getIMAGE_PATH() {
|
||||
return IMAGE_PATH;
|
||||
}
|
||||
|
||||
public void setIMAGE_PATH(String IMAGE_PATH) {
|
||||
this.IMAGE_PATH.add(IMAGE_PATH);
|
||||
}
|
||||
|
||||
ArrayList<String> IMAGE_PATH = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -24,6 +24,16 @@ public class TableBean {
|
||||
public static String STORE_PERFORMANCE;
|
||||
public static String MAPPING_PLANOGRAM;
|
||||
|
||||
public static String getAdditionalDisplay() {
|
||||
return ADDITIONAL_DISPLAY;
|
||||
}
|
||||
|
||||
public static void setAdditionalDisplay(String additionalDisplay) {
|
||||
ADDITIONAL_DISPLAY = additionalDisplay;
|
||||
}
|
||||
|
||||
public static String ADDITIONAL_DISPLAY;
|
||||
|
||||
//Gagan end code
|
||||
|
||||
public static String getJourneyPlan() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ADDITIONAL_DISPLAY_MASTERGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
@@ -712,4 +713,49 @@ public class XMLHandlers {
|
||||
return st;
|
||||
}
|
||||
//Gagan End Code
|
||||
|
||||
|
||||
public static ADDITIONAL_DISPLAY_MASTERGetterSetter ADDITIONAL_DISPLAY_MASTERXMLHandler(XmlPullParser xpp, int eventType) {
|
||||
ADDITIONAL_DISPLAY_MASTERGetterSetter st = new ADDITIONAL_DISPLAY_MASTERGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
st.setTable_STORE_ADDITIONAL_DISPLAY(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("DISPLAY_ID")) {
|
||||
st.setDISPLAY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("DISPLAY")) {
|
||||
st.setDISPLAY(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("IMAGE_URL")) {
|
||||
st.setIMAGE_URL(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("IMAGE_PATH")) {
|
||||
st.setIMAGE_PATH(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return st;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="10"
|
||||
android:text="Brand Name"
|
||||
android:text="@string/brandname"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -59,7 +59,7 @@
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="10"
|
||||
android:text="SKU Name"
|
||||
android:text="@string/displayname"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -118,7 +118,7 @@
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_weight="10"
|
||||
android:background="@color/grey_background"
|
||||
android:text="Delete" />
|
||||
android:text="@string/delete" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#70888888"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -154,14 +154,15 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@mipmap/new_camera" />
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@mipmap/camera_orange" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -228,6 +229,7 @@
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
|
||||
|
||||
@@ -36,12 +36,18 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
<!-- <ImageView
|
||||
android:id="@+id/img_planogram"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@drawable/sad_cloud"/>
|
||||
android:src="@drawable/sad_cloud" />-->
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
android:id="@+id/action_planogram"
|
||||
android:icon="@mipmap/ref_images_white"
|
||||
android:orderInCategory="100"
|
||||
android:title="planogram"
|
||||
android:title="@string/stock_facing_planogram_dialog_title"
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
|
||||
@@ -73,26 +73,28 @@
|
||||
<string name="daily_data_menu_additional_promotions">Promosyon</string>
|
||||
|
||||
<string name="msl_availability_sku">Ürün Adı</string>
|
||||
<string name="msl_availability_mbq">MBQ</string>
|
||||
<string name="msl_availability_mbq">X</string>
|
||||
<string name="msl_availability_availability">Bulunurluk</string>
|
||||
|
||||
<string name="stock_facing_reference_image">Örnek Fotoğraf</string>
|
||||
<string name="stock_facing_sku_name">Ürün Adı</string>
|
||||
<string name="stock_facing_stock">Stock</string>
|
||||
<string name="stock_facing_stock">Stock</string> <!--change string-->
|
||||
<string name="stock_facing_faceup">Önyüz</string>
|
||||
<string name="stock_facing_sos_target">Raf Payı Hedefi</string>
|
||||
<string name="stock_facing_sos">Raf Payi</string>
|
||||
<!--Gagan end code-->
|
||||
|
||||
<!--Gagan start new code 1-->
|
||||
<string name="title_activity_promo_compliance">Promosyon</string>
|
||||
|
||||
<string name="promo_compliance_additional_promo">Additional Promos</string>
|
||||
<string name="promo_compliance_promo">Promos</string>
|
||||
<string name="promo_compliance_additional_promo">Ek Promosyon</string>
|
||||
<string name="promo_compliance_promo">Promosyon</string>
|
||||
<string name="promo_compliance_promos_sku">Promosyon Ürünü</string>
|
||||
<string name="promo_compliance_sku">Promosyon Ürünü</string>
|
||||
<string name="promo_compliance_inStock">Ürün Bulunuyor</string>
|
||||
<string name="promo_compliance_promoAnnouncer">Duyuru Var</string>
|
||||
<string name="promo_compliance_runningPOS">Kasa Okuyor</string>
|
||||
<string name="promo_compliance_add">Add</string>
|
||||
<string name="promo_compliance_add">Ekle</string>
|
||||
|
||||
<string name="category_performance_period">Zaman</string>
|
||||
<string name="category_performance_msl_availability">Bulunurluk</string>
|
||||
@@ -106,11 +108,7 @@
|
||||
<string name="category_performance_lsv">Son Ziyaret</string>
|
||||
|
||||
<string name="title_activity_store_wise_performance">Mağaza Performansı</string>
|
||||
<!--Gagan End Code -->
|
||||
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||
<!--Gagan end new code 2-->
|
||||
<!--Gagan end new code 1-->
|
||||
|
||||
<string name="stock">Stock</string>
|
||||
<string name="AdditionalDisplay">Ek Teşhir</string>
|
||||
@@ -120,13 +118,13 @@
|
||||
|
||||
<string name="select_language_item">Dil Seçimi</string>
|
||||
|
||||
<string name="title_activity_Want_save"> Do You Want To Save</string>
|
||||
<string name="title_activity_Want_add"> Please Add Data</string>
|
||||
<string name="title_activity_Want_to_add">Do You Want To Add</string>
|
||||
<string name="title_activity_Want_to_delete"> Do You Want To Delete Data</string>
|
||||
<string name="store"> store</string>
|
||||
<string name="title_activity_Want_to_delete1"> Do You Want To Delete</string>
|
||||
<string name="title_activity_click_delete">Click Yes To Delete!</string>
|
||||
<string name="title_activity_Want_save">Veriyi saklamak istiyor musunuz?</string>
|
||||
<string name="title_activity_Want_add">Tüm alanlari doldurunuz</string>
|
||||
<string name="title_activity_Want_to_add">Veri eklemek istiyor musun</string>
|
||||
<string name="title_activity_Want_to_delete"> Verileri silmek istiyor musun</string>
|
||||
<string name="store"> Mağazalar</string>
|
||||
<string name="title_activity_Want_to_delete1"> Verileri silmek istiyor musun</string>
|
||||
<string name="title_activity_click_delete">Silme için Evet tıklayın</string>
|
||||
<string name="title_activity_select_dropdown">Please Select dropdown</string>
|
||||
<string name="title_activity_take_image">Please Take a image</string>
|
||||
|
||||
@@ -153,6 +151,54 @@
|
||||
<string name="export_database">Veritabanı Aktar</string>
|
||||
<string name="title_activity_service">Servisler</string>
|
||||
|
||||
<string name="title_activity_take_image">En az bir fotoğraf çekiniz</string>
|
||||
|
||||
<string name="title_activity_fill_sku">Ürün ekle</string>
|
||||
<string name="title_activity_enter_quantity">Teşhir Sayısı Doldur </string>
|
||||
<string name="title_activity_save_data">Veriyi saklamak istiyor musunuz?</string>
|
||||
|
||||
|
||||
<string name="clickimage">En az bir fotoğraf çekiniz</string>
|
||||
<string name="gps">GPS devre dışı</string>
|
||||
<string name="gpsebale">Etkinleştir GPS</string>
|
||||
<string name="takeimage">En az bir fotoğraf çekiniz</string>
|
||||
<string name="notsuppoted">Bu cihaz desteklenmiyor</string>
|
||||
<string name="uploaddata">Veri paylaşılıyor</string>
|
||||
<string name="geotagdata">Coğrafi Konum paylaşılıyor</string>
|
||||
<string name="failure">Başarısızlık</string>
|
||||
<string name="uploadimge">Fotoğraflar paylaşılıyor</string>
|
||||
<string name="success">Başarı</string>
|
||||
<string name="wantcheckout">Mağazadan çıkmak istiyor musunuz?</string>
|
||||
<string name="nonetwork">Bağlantı kurulamıyor. İnternet bağlantınızı kontrol ediniz</string>
|
||||
<string name="click_image">En az bir fotoğraf çekiniz</string>
|
||||
|
||||
<string name="title_store_list_activity_already_store_closed">Mağaza kapalı</string>
|
||||
<string name="title_store_list_activity_store_closed">Mağaza kapalı</string>
|
||||
<string name="title_store_list_activity_store_already_done">Paylaşılan mağaza</string>
|
||||
<string name="title_store_list_activity_store_data_uploaded">Paylaşılan mağaza</string>
|
||||
<string name="title_store_list_activity_store_already_checkout">Mağaza zaten çıkılmış</string>
|
||||
<string name="title_store_list_activity_store_again_uploaded">Please Store data again Uploaded</string>
|
||||
<string name="title_store_list_checkout_current">Lütfen önce mağazadan çık</string>
|
||||
<string name="title_store_list_checkout_Already_filled">Doldurulmuş veriler</string>
|
||||
<string name="NetworkError">Bağlantı kurulamıyor ,</string>
|
||||
<string name="uploadeddata">Veriler Paylaşılıyor ,</string>
|
||||
<string name="DataNot">Veriler Paylaşılmadı ,</string>
|
||||
<string name="delete">Sil</string>
|
||||
<string name="adddatatoclick">Click Yes To Add Data</string>
|
||||
<string name="displayname">Teşhir Türü</string>
|
||||
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Örnek Fotoğraf</string>
|
||||
<string name="title_activity_settings">Ayarlar</string>
|
||||
|
||||
<string name="ok">Tamam</string>
|
||||
<string name="check_save_message">Veriyi saklamak istiyor musunuz?</string>
|
||||
<string name="save_message">Veriler Kaydedildi</string>
|
||||
<string name="update_message">Veriler Kaydedildi</string>
|
||||
<string name="empty_field">Tüm alanlari doldurunuz </string>
|
||||
<string name="fill_data">Tüm alanlari doldurunuz</string>
|
||||
<string name="dialog_title">Parinaam</string>
|
||||
<!--Gagan end new code 2-->
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
<string name="title_activity_t2_pcompliance">T2P Compliance</string>
|
||||
|
||||
<!--Gagan start code-->
|
||||
|
||||
<string name="title_activity_category_list">Category List</string>
|
||||
<string name="title_activity_category_wise_performance">Categorywise Performance</string>
|
||||
<string name="title_activity_daily_main_menu">Daily Data Menu</string>
|
||||
@@ -93,7 +92,6 @@
|
||||
<string name="stock_facing_faceup">Facing</string>
|
||||
<string name="stock_facing_sos_target">SOS Target</string>
|
||||
<string name="stock_facing_sos">SOS</string>
|
||||
|
||||
<!--Gagan end code-->
|
||||
|
||||
<string name="title_geo_tag_activity_upload_data">Store Uploaded</string>
|
||||
@@ -175,7 +173,7 @@
|
||||
<string name="uploadimge">Uploading Geotag Images</string>
|
||||
<string name="success">success</string>
|
||||
<string name="wantcheckout">Are you sure you want to Checkout</string>
|
||||
<string name="nonetwork"> No Network</string>
|
||||
<string name="nonetwork"> No Network Connection. Please check your Internet Connection</string>
|
||||
|
||||
<string name="title_activity_Non_Work">Non Working Reason</string>
|
||||
<string name="closed">Close</string>
|
||||
@@ -195,7 +193,7 @@
|
||||
<string name="daily_activity_menu">Daily Data Menu</string>
|
||||
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||
<string name="stock_facing_planogram_dialog_title">Reference Image</string>
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
|
||||
<string name="ok">OK</string>
|
||||
@@ -205,7 +203,6 @@
|
||||
<string name="empty_field">Fill the value </string>
|
||||
<string name="fill_data">Please fill all the data</string>
|
||||
<string name="dialog_title">Parinaam</string>
|
||||
|
||||
<!--Gagan end new code 2-->
|
||||
|
||||
<string name="select_language_item">Select language</string>
|
||||
@@ -214,8 +211,14 @@
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="title_activity_checkout">CheckoutActivity</string>
|
||||
<string name="checkout_successful">Checkout Success</string>
|
||||
<string name="title_activity_service">Service</string>
|
||||
|
||||
<string name="NetworkError">Network Error ,</string>
|
||||
<string name="DataNot"> Data Not Uploaded ,</string>
|
||||
<string name="displayname">Display Name</string>
|
||||
<string name="adddatatoclick">Click Yes To Add Data</string>
|
||||
|
||||
<string name="title_activity_service">Service</string>
|
||||
|
||||
<string name="data_downloaded_successfully">Data downloaded successfully</string>
|
||||
<string name="export_database">Export Database</string>
|
||||
<string name="data_exported_successfully">Database Exported Successfully</string>
|
||||
|
||||
Reference in New Issue
Block a user