Merge remote-tracking branch 'origin/ysy_final' into ysy_final
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "24.0.1"
|
||||
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
@@ -18,6 +18,7 @@ import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_MasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -95,6 +96,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(CommonString.CREATE_TABLE_STOCK_ADDITIONAL_STOCK_DATA);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_PROMO_SKU);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN);
|
||||
db.execSQL(CommonString.CREATE_TABLE_STOCK_DIALOG_MAIN);
|
||||
|
||||
db.execSQL(TableBean.getStorePerformance());
|
||||
|
||||
@@ -2158,13 +2161,17 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setCOMMON_ID(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_Common_ID)));
|
||||
|
||||
sb.setStore_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_STORE_ID)));
|
||||
sb.setCategoryId(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("categoryId")));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||
|
||||
sb.setBrand(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_BRAND)));
|
||||
|
||||
|
||||
sb.setQuantity(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_QUANTITY)));
|
||||
|
||||
@@ -2174,7 +2181,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setSku_name(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_SKUNAME)));
|
||||
|
||||
|
||||
productData.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
@@ -2202,6 +2208,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public void deleteStockEntry(String id) {
|
||||
try {
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL, "KEY_ID" + "='" + id + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, "KEY_ID" + "='" + id + "'", null);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("" + e);
|
||||
}
|
||||
@@ -2210,8 +2219,12 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public void deleteStockEntryall(String storeid,String categoryid) {
|
||||
try {
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL, "Store_Id" + "='" + storeid +"categoryId" + "='" + categoryid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_DIALOG, "Store_Id" + "='" + storeid +"categoryId" + "='" + categoryid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL, "Store_Id" + "='" + storeid +"'AND categoryId" + "='" + categoryid + "'", null);
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_DIALOG, "Store_Id" + "='" + storeid +"'AND categoryId" + "='" + categoryid + "'", null);
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, "Store_Id" + "='" + storeid +"'AND categoryId" + "='" + categoryid + "'", null);
|
||||
|
||||
db.delete(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, "Store_Id" + "='" + storeid +"'AND categoryId" + "='" + categoryid + "'", null);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("" + e);
|
||||
@@ -2474,7 +2487,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Additional_visibility " + "where categoryId='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||
dbcursor = db.rawQuery("Select * from Stock_Additional_visibility_Main " + "where categoryId='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
if (dbcursor.moveToFirst()) {
|
||||
@@ -2507,7 +2520,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id +"'", null);
|
||||
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility_Main WHERE Store_Id = '"+store_id +"'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
@@ -2556,6 +2569,101 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
return productData;
|
||||
|
||||
}
|
||||
|
||||
public void InsertMainListAdditionalData(AddittionalGetterSetter Mainlist,ArrayList<AdditionalDialogGetterSetter> skulist,String categoryId) {
|
||||
ContentValues values = new ContentValues();
|
||||
ContentValues values1 = new ContentValues();
|
||||
try {
|
||||
|
||||
values.put("Store_Id", Mainlist.getStore_id());
|
||||
values.put("categoryId", categoryId);
|
||||
values.put("brand_name", Mainlist.getBrand());
|
||||
values.put("brand_id", Mainlist.getBrand_id());
|
||||
values.put("image_url", Mainlist.getImage());
|
||||
values.put("sku_id", Mainlist.getSku_id());
|
||||
values.put("sku_name", Mainlist.getSku());
|
||||
values.put("toggle_value", Mainlist.getBtn_toogle());
|
||||
|
||||
long key_id = db.insert(CommonString.TABLE_INSERT_STOCK_ADDITIONAL_MAIN, null, values);
|
||||
|
||||
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());
|
||||
values1.put("categoryId", categoryId);
|
||||
values1.put(CommonString.KEY_BRAND, skulist.get(j).getBrand());
|
||||
values1.put(CommonString.KEY_BRAND_ID, skulist.get(j).getBrand_id());
|
||||
values1.put(CommonString.KEY_QUANTITY, skulist.get(j).getQuantity());
|
||||
values1.put(CommonString.KEY_SKU_ID, skulist.get(j).getSku_id());
|
||||
values1.put(CommonString.KEY_SKUNAME, skulist.get(j).getSku_name());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG_MAIN, null, values1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<AdditionalDialogGetterSetter> getDialogStockUpload(String keyid) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<AdditionalDialogGetterSetter> productData = new ArrayList<AdditionalDialogGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM STOCK_DIALOG_MAIN WHERE COMMON_ID = '"+keyid + "'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
AdditionalDialogGetterSetter sb = new AdditionalDialogGetterSetter();
|
||||
|
||||
sb.setKEY_ID(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_ID)));
|
||||
|
||||
sb.setCOMMON_ID(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_Common_ID)));
|
||||
|
||||
sb.setStore_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_STORE_ID)));
|
||||
sb.setCategoryId(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("categoryId")));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||
|
||||
sb.setBrand(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_BRAND)));
|
||||
|
||||
sb.setQuantity(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_QUANTITY)));
|
||||
|
||||
sb.setSku_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_SKU_ID)));
|
||||
|
||||
sb.setSku_name(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_SKUNAME)));
|
||||
|
||||
productData.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return productData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get T2P Compliance data
|
||||
public ArrayList<T2PGetterSetter> getT2pComplianceData(String store_id, String category_id) {
|
||||
@@ -2564,11 +2672,10 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
|
||||
if(category_id == null){
|
||||
if (category_id == null) {
|
||||
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_T2P_COMPLIANCE + " where " +
|
||||
CommonString.KEY_STORE_ID + "='" + store_id + "'", null);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
dbcursor = db.rawQuery("SELECT * FROM " + CommonString.TABLE_INSERT_T2P_COMPLIANCE + " where " +
|
||||
CommonString.KEY_STORE_ID + "='" + store_id + "' AND " +
|
||||
CommonString.KEY_CATEGORY_ID + "='" + category_id + "'", null);
|
||||
@@ -2686,6 +2793,36 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Log.d("Exception ", " MAPPING_PLANOGRAM " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> getMappingPlanogramData(String category_id) {
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM MAPPING_PLANOGRAM", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
MAPPING_PLANOGRAM_DataGetterSetter mp = new MAPPING_PLANOGRAM_DataGetterSetter();
|
||||
|
||||
mp.setKEYACCOUNT_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("KEYACCOUNT_ID")));
|
||||
mp.setSTORETYPE_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORETYPE_ID")));
|
||||
mp.setCLASS_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("CLASS_ID")));
|
||||
mp.setPLANOGRAM_IMAGE(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PLANOGRAM_IMAGE")));
|
||||
mp.setIMAGE_PATH(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IMAGE_PATH")));
|
||||
|
||||
list.add(mp);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//Gagan end new code 2
|
||||
|
||||
//T2P is filled
|
||||
@@ -2803,4 +2940,5 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package cpm.com.gskmtorange.GeoTag;
|
||||
import android.Manifest;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -117,6 +118,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
private static final String TAG = GeoTagActivity.class.getSimpleName();
|
||||
String defaultCameraPackage = "";
|
||||
File file;
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
private int factor, k;
|
||||
ArrayList<GeotaggingBeans> geotaglist = new ArrayList<GeotaggingBeans>();
|
||||
private TextView percentage, message;
|
||||
@@ -188,13 +191,13 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
GeoTagActivity.this);
|
||||
|
||||
// Setting Dialog Title
|
||||
alertDialog.setTitle("GPS IS DISABLED...");
|
||||
alertDialog.setTitle(getResources().getString(R.string.gps));
|
||||
|
||||
// Setting Dialog Message
|
||||
alertDialog.setMessage("Click ok to enable GPS.");
|
||||
alertDialog.setMessage(getResources().getString(R.string.gpsebale));
|
||||
|
||||
// Setting Positive "Yes" Button
|
||||
alertDialog.setPositiveButton("YES",
|
||||
alertDialog.setPositiveButton(getResources().getString(R.string.yes),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
@@ -205,7 +208,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
});
|
||||
|
||||
// Setting Negative "NO" Button
|
||||
alertDialog.setNegativeButton("NO",
|
||||
alertDialog.setNegativeButton(getResources().getString(R.string.no),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
// Write your code here to invoke NO event
|
||||
@@ -234,7 +237,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
|
||||
} else {
|
||||
Snackbar.make(view, "Please Take Image Before Save", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.takeimage), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
}
|
||||
@@ -257,7 +260,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
}
|
||||
}
|
||||
|
||||
_pathforcheck = storeid + "Store" + "Image" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_pathforcheck = storeid + getResources().getString(R.string.store) + getResources().getString(R.string.image) + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
|
||||
@@ -279,8 +282,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
GooglePlayServicesUtil.getErrorDialog(resultCode, this,
|
||||
PLAY_SERVICES_RESOLUTION_REQUEST).show();
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
"This device is not supported.", Toast.LENGTH_LONG)
|
||||
Toast.makeText(getApplicationContext(),getResources().getString(R.string.notsuppoted)
|
||||
, Toast.LENGTH_LONG)
|
||||
.show();
|
||||
finish();
|
||||
}
|
||||
@@ -433,59 +436,70 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
}
|
||||
|
||||
protected void startCameraActivity() {
|
||||
/* Log.i("MakeMachine", "startCameraActivity()");
|
||||
file = new File(_path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
try {
|
||||
/*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);
|
||||
|
||||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
startActivityForResult(intent, 0);*/
|
||||
|
||||
Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
outputFileUri = Uri.fromFile(file);
|
||||
|
||||
takePictureIntent.setPackage(defaultCameraPackage);
|
||||
String defaultCameraPackage = "";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);
|
||||
|
||||
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
|
||||
startActivityForResult(takePictureIntent, 1);*/
|
||||
|
||||
Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
String defaultCameraPackage="";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n=0;n<list.size();n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + 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;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//temp value in case camera is gallery app above jellybean
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//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 takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
|
||||
|
||||
takePictureIntent.setPackage(defaultCameraPackage);
|
||||
|
||||
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
|
||||
startActivityForResult(takePictureIntent, 1);
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(gallery_package);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
|
||||
Log.i("MakeMachine", "resultCode: " + resultCode);
|
||||
@@ -548,7 +562,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
dialog = new Dialog(context);
|
||||
dialog.setContentView(R.layout.custom);
|
||||
dialog.setTitle("Uploading Data");
|
||||
dialog.setTitle(getResources().getString(R.string.uploaddata));
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
@@ -584,7 +598,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
k = k + factor;
|
||||
pb.setProgress(k);
|
||||
percentage.setText(k + "%");
|
||||
message.setText("Uploading Geotag Data...");
|
||||
message.setText(getResources().getString(R.string.geotagdata));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -716,7 +730,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_DATA_NOT
|
||||
+ result, "failure", null);
|
||||
+ result, getResources().getString(R.string.failure), null);
|
||||
message.showMessage();
|
||||
|
||||
|
||||
@@ -746,7 +760,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
dialog = new Dialog(context);
|
||||
dialog.setContentView(R.layout.custom);
|
||||
dialog.setTitle("Uploading Geotag Images");
|
||||
dialog.setTitle(getResources().getString(R.string.uploadimge));
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
@@ -783,7 +797,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
k = k + factor;
|
||||
pb.setProgress(k);
|
||||
percentage.setText(k + "%");
|
||||
message.setText("Uploading Geotag Images...");
|
||||
message.setText(getResources().getString(R.string.uploadimge));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -886,7 +900,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_ERROR
|
||||
+ result, "success", null);
|
||||
+ result, getResources().getString(R.string.success), null);
|
||||
message.showMessage();
|
||||
|
||||
|
||||
@@ -896,7 +910,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
|
||||
AlertMessage message = new AlertMessage(
|
||||
GeoTagActivity.this, AlertMessage.MESSAGE_DATA_NOT
|
||||
+ result, "failure", null);
|
||||
+ result, getResources().getString(R.string.failure), null);
|
||||
message.showMessage();
|
||||
|
||||
|
||||
|
||||
@@ -80,11 +80,6 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
db = new GSKOrangeDB(GeoTagStoreList.this);
|
||||
db.open();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -94,7 +89,6 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
finish();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -115,10 +109,8 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
@@ -261,11 +253,9 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
imageview=(ImageView) itemView.findViewById(R.id.imageView1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<StoreBean> getdata() {
|
||||
List<StoreBean> data = new ArrayList<>();
|
||||
|
||||
@@ -273,24 +263,17 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
StoreBean storelistdata=new StoreBean();
|
||||
|
||||
|
||||
for(int i=0;i<storelist.size();i++)
|
||||
{
|
||||
|
||||
storelistdata.setSTORE_NAME(storelist.get(0).getSTORE_NAME());
|
||||
|
||||
data.add(storelistdata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
@@ -330,4 +313,5 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -209,7 +209,8 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
Snackbar.make(webView, R.string.no_data_for_upload, Snackbar.LENGTH_SHORT)
|
||||
.setAction("Action", null).show();
|
||||
|
||||
Intent i = new Intent(getBaseContext(), UploadActivity.class);
|
||||
startActivity(i);
|
||||
|
||||
} else {
|
||||
if (isStoreCheckedIn()&& isValid()) {
|
||||
|
||||
@@ -359,11 +359,14 @@ public class CommonString {
|
||||
+ "STORE_ID"
|
||||
+ " INTEGER,"
|
||||
|
||||
/*+ "SKU_ID"
|
||||
+ "CATEGORY_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "SKU_ID"
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "SKU"
|
||||
+ " VARCHAR,"*/
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "PROMO_ID"
|
||||
+ " INTEGER,"
|
||||
@@ -431,6 +434,50 @@ public class CommonString {
|
||||
+ KEY_IMAGE + " VARCHAR)";
|
||||
|
||||
|
||||
public static final String TABLE_INSERT_STOCK_ADDITIONAL_MAIN = "Stock_Additional_visibility_Main";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_STOCK_ADDITIONAL_VISIBILITY_MAIN = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_STOCK_ADDITIONAL_MAIN
|
||||
+ "("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "Store_Id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "brand_name"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "brand_id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "image_url"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "sku_id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "sku_name"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "toggle_value"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "categoryId"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
public static final String TABLE_INSERT_STOCK_DIALOG_MAIN = "STOCK_DIALOG_MAIN";
|
||||
public static final String CREATE_TABLE_STOCK_DIALOG_MAIN = "CREATE TABLE "
|
||||
+ TABLE_INSERT_STOCK_DIALOG_MAIN + " (" + KEY_ID
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT," + KEY_STORE_ID + " VARCHAR,"
|
||||
+ KEY_BRAND_ID + " VARCHAR," + KEY_BRAND + " VARCHAR,"
|
||||
+ KEY_DISPLAY_ID +" VARCHAR,"
|
||||
+ KEY_SKU_ID + " VARCHAR," + KEY_QUANTITY + " VARCHAR," + KEY_Common_ID + " VARCHAR,"
|
||||
+ "categoryId" + " VARCHAR,"
|
||||
+ KEY_SKUNAME + " VARCHAR,"
|
||||
+ KEY_PROCESS_ID + " VARCHAR)";
|
||||
|
||||
//Tables related to T2p Compliance
|
||||
|
||||
@@ -480,4 +527,5 @@ public class CommonString {
|
||||
+ KEY_BRAND+ " VARCHAR,"
|
||||
+ KEY_SKU + " VARCHAR"
|
||||
+ ")";
|
||||
|
||||
}
|
||||
|
||||
+244
-87
@@ -3,6 +3,7 @@ package cpm.com.gskmtorange.dailyentry;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -20,6 +21,7 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
@@ -52,10 +54,12 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagActivity;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
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.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
@@ -67,12 +71,14 @@ 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<AdditionalDialogGetterSetter> additionalVisibilitySkuList;
|
||||
ArrayList<AdditionalDialogGetterSetter> additionalVisibilityinsertSkuList;
|
||||
ArrayList<AdditionalDialogGetterSetter> uploadlist = new ArrayList<AdditionalDialogGetterSetter>();
|
||||
ArrayList<AdditionalDialogGetterSetter> defdata = new ArrayList<AdditionalDialogGetterSetter>();
|
||||
Spinner spinner_brand, spinner_sku;
|
||||
Spinner spinner_brand_list, spinner_sku_list;
|
||||
|
||||
AdditionalDialogGetterSetter additionalgeetersetter;
|
||||
public static ArrayList<AddittionalGetterSetter> data = new ArrayList<AddittionalGetterSetter>();
|
||||
ToggleButton btntoggle;
|
||||
ImageView btnimage, btnedit;
|
||||
@@ -99,10 +105,14 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
ListView listviewlay;
|
||||
String errormsg,categoryName,categoryId;
|
||||
MyAdaptorAdditionalStock adapteradditional;
|
||||
AddittionalGetterSetter adGt;
|
||||
AddittionalGetterSetter adGt,newadd;
|
||||
LinearLayout brandlayout, diaplylayout, cameralayout;
|
||||
FloatingActionButton fab;
|
||||
//RelativeLayout skulayout;
|
||||
CardView cardvew;
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
|
||||
////String brand_id,SKU_ID;
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
@@ -142,7 +152,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
brandlayout = (LinearLayout) findViewById(R.id.tv_brandlayout);
|
||||
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);
|
||||
|
||||
btntoggle.setChecked(true);
|
||||
@@ -153,7 +163,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
///band List
|
||||
brand_list = db.getBrandMasterData(store_id);
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
brand.setBRAND("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);
|
||||
|
||||
@@ -164,7 +175,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
skuMaster_list = db.getSKUMasterData(store_id);
|
||||
|
||||
SkuMasterGetterSetter select = new SkuMasterGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(str);
|
||||
skuMaster_list.add(0, select);
|
||||
CustomSkuMasterAdpter skuadapter = new CustomSkuMasterAdpter(AdditionalVisibility.this, R.layout.custom_spinner_item, skuMaster_list);
|
||||
spinner_sku_list.setAdapter(skuadapter);
|
||||
@@ -214,7 +225,6 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
if(tooglevalue.equalsIgnoreCase("0"))
|
||||
{
|
||||
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
@@ -225,8 +235,6 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* String KeyID = listdata.get(k).getKey_id();
|
||||
|
||||
uploadlist = db.getDialogStock(KeyID);*/
|
||||
@@ -234,9 +242,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (listdata.size() > 0) {
|
||||
|
||||
for (int i = 0; i < listdata.size(); i++) {
|
||||
if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
@@ -254,13 +260,71 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
}
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
listdata = db.getAdditionalStock(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("")
|
||||
.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.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList,categoryId);
|
||||
|
||||
/*Intent in =new Intent(AdditionalVisibility.this, DailyDataMenuActivity.class);
|
||||
|
||||
startActivity(in);*/
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}});
|
||||
|
||||
/* if (listdata.size() > 0) {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
}*/
|
||||
|
||||
btnaddlayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -276,46 +340,32 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
adGt.setBtn_toogle(togglevalue);
|
||||
adGt.setCategoryId(categoryId);
|
||||
|
||||
|
||||
if (validateData(adGt, defdata)) {
|
||||
|
||||
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
|
||||
AdditionalVisibility.this);
|
||||
|
||||
// set title
|
||||
alertDialogBuilder.setTitle("Do You Want To Save");
|
||||
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_add));
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.InsertAdditionalData(adGt, defdata,categoryId);
|
||||
|
||||
spinner_brand_list.setSelection(0);
|
||||
|
||||
spinner_sku_list.setSelection(0);
|
||||
|
||||
img_str = "";
|
||||
brand_list_name = "";
|
||||
brand_list_id = "";
|
||||
sku_list_name = "";
|
||||
sku_list_id = "";
|
||||
|
||||
defdata.clear();
|
||||
|
||||
// btntoggle.setChecked(true);
|
||||
|
||||
btnimage.setBackgroundResource(R.mipmap.camera);
|
||||
// togglevalue = "1";
|
||||
|
||||
|
||||
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"))
|
||||
@@ -333,22 +383,16 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.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
|
||||
@@ -372,30 +416,121 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btntoggle.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
if (btntoggle.isChecked()) {
|
||||
togglevalue = "1";
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
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("")
|
||||
.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);
|
||||
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);
|
||||
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
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
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
// 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 {
|
||||
|
||||
db.deleteStockEntryall(store_id,categoryId);
|
||||
listdata = db.getAdditionalStock(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_to_delete));
|
||||
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.deleteStockEntryall(store_id,categoryId);
|
||||
togglevalue = "0";
|
||||
defdata.clear();
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.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
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
// create alert dialog
|
||||
AlertDialog alertDialog = alertDialogBuilder.create();
|
||||
// show it
|
||||
alertDialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
togglevalue = "0";
|
||||
defdata.clear();
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
togglevalue = "0";
|
||||
defdata.clear();
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -403,8 +538,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnimage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck = store_id + "Store"
|
||||
+ "Image" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_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();
|
||||
@@ -501,7 +636,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText("Select");
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
@@ -563,7 +698,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText("Select");
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
@@ -626,7 +761,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText("Select");
|
||||
label.setText(getResources().getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
@@ -639,12 +774,20 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
|
||||
protected void startCameraActivity() {
|
||||
|
||||
try {
|
||||
/*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);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
outputFileUri = Uri.fromFile(file);
|
||||
|
||||
String defaultCameraPackage = "";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
@@ -654,6 +797,11 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
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;
|
||||
@@ -666,21 +814,28 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//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) {
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
|
||||
@@ -712,7 +867,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
public void showSkuDialog() {
|
||||
final ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData("1", "1", "1");
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
brand.setBRAND("select");
|
||||
brand.setBRAND(getResources().getString(R.string.select));
|
||||
brandList.add(0, brand);
|
||||
// ArrayList<SkuMasterGetterSetter> skuMasterGetterSetterArrayList = db.getSkuT2PData("1", "1", "1",)
|
||||
final Dialog dialog = new Dialog(AdditionalVisibility.this);
|
||||
@@ -824,7 +979,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
ArrayList<SkuGetterSetter> empty_list = new ArrayList<>();
|
||||
SkuGetterSetter select = new SkuGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(getResources().getString(R.string.select));
|
||||
empty_list.add(select);
|
||||
CustomSkuAdapter skuadapter = new CustomSkuAdapter(AdditionalVisibility.this, R.layout.custom_spinner_item, empty_list);
|
||||
spinner_sku.setAdapter(skuadapter);
|
||||
@@ -840,7 +995,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
sku_list = db.getSkuT2PData("1", "1", "1", brand_id);
|
||||
SkuGetterSetter select = new SkuGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(getResources().getString(R.string.select));
|
||||
sku_list.add(0, select);
|
||||
// Create custom adapter object ( see below CustomSkuAdapter.java )
|
||||
CustomSkuAdapter skuadapter = new CustomSkuAdapter(AdditionalVisibility.this, R.layout.custom_spinner_item, sku_list);
|
||||
@@ -980,13 +1135,13 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
AdditionalVisibility.this);
|
||||
|
||||
// set title
|
||||
alertDialogBuilder.setTitle("Do You Want To Delete?");
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_delete1));
|
||||
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("Click Yes To Delete!")
|
||||
.setMessage(getResources().getString(R.string.title_activity_click_delete))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
// db.deletedialogStockEntry(list.get(position1).getKEY_ID());
|
||||
@@ -1006,7 +1161,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.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
|
||||
@@ -1110,24 +1265,29 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
AdditionalVisibility.this);
|
||||
|
||||
// set title
|
||||
alertDialogBuilder.setTitle("Do You Want To Delete?");
|
||||
alertDialogBuilder.setTitle(getResources().getString(R.string.title_activity_Want_to_delete1));
|
||||
|
||||
// set dialog message
|
||||
alertDialogBuilder
|
||||
.setMessage("Click Yes To Delete!")
|
||||
.setMessage(getResources().getString(R.string.title_activity_click_delete))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.deleteStockEntry(listdata.get(position1).getKey_id());
|
||||
|
||||
|
||||
|
||||
adapteradditional.notifyDataSetChanged();
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
/* adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
|
||||
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();*/
|
||||
|
||||
listviewlay.invalidateViews();
|
||||
|
||||
if (listdata.size() > 0) {
|
||||
|
||||
@@ -1148,12 +1308,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.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
|
||||
@@ -1201,16 +1358,16 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (brandid.equalsIgnoreCase("") || skuid.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
|
||||
errormsg = "Please Select dropdown";
|
||||
errormsg = getResources().getString(R.string.title_activity_select_dropdown);
|
||||
|
||||
} else if (imageu == null || imageu.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
|
||||
errormsg = "Please Take a image";
|
||||
errormsg = getResources().getString(R.string.title_activity_take_image);
|
||||
|
||||
} else if (dialog.size() == 0) {
|
||||
|
||||
errormsg = "Please fill sku data";
|
||||
errormsg = getResources().getString(R.string.title_activity_fill_sku);
|
||||
flag = false;
|
||||
|
||||
|
||||
@@ -1236,13 +1393,13 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
if (brandid.equalsIgnoreCase("") || brandid == null) {
|
||||
flag = false;
|
||||
|
||||
msg = "Please Select Dropdown";
|
||||
msg = getResources().getString(R.string.title_activity_select_dropdown);
|
||||
} else if (displayid == null || displayid.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
msg = "Please Select Dropdown";
|
||||
msg = getResources().getString(R.string.title_activity_select_dropdown);
|
||||
} else if (QTy.equalsIgnoreCase("") || QTy == null) {
|
||||
flag = false;
|
||||
msg = "Please enter Quantity";
|
||||
msg = getResources().getString(R.string.title_activity_enter_quantity);
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,19 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
@@ -66,6 +72,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
private Dialog dialog;
|
||||
boolean result_flag = false, leaveflag = false;
|
||||
FloatingActionButton fab;
|
||||
String storeid;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -109,7 +117,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
coverage=db.getCoverageData(date);
|
||||
coverage = db.getCoverageData(date);
|
||||
|
||||
|
||||
if (storelist.size() > 0) {
|
||||
//list.setAdapter(new MyAdaptor());
|
||||
@@ -134,8 +143,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
int id = item.getItemId();
|
||||
|
||||
|
||||
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
@@ -179,7 +186,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
final StoreBean current = data.get(position);
|
||||
|
||||
|
||||
String storeid = current.getSTORE_ID();
|
||||
storeid = current.getSTORE_ID();
|
||||
//viewHolder.txt.setText(current.txt);
|
||||
|
||||
viewHolder.txt.setText(current.getSTORE_NAME());
|
||||
@@ -190,35 +197,29 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_u);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_d);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_C)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_c);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_P)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_p);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tickl);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.leave_tick);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||
|
||||
|
||||
if (coverage.size() > 0) {
|
||||
@@ -234,8 +235,10 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
if (storeid.equals(coverage.get(i).getStoreId())) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.checkin);
|
||||
// viewHolder.imageview.setBackgroundResource(R.mipmap.checkin);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.green));
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -246,6 +249,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
@@ -271,12 +276,9 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_again_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
|
||||
} else if (current.getUPLOAD_STATUS().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 {
|
||||
} else {
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
@@ -324,8 +326,64 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
viewHolder.chkbtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(
|
||||
StoreListActivity.this);
|
||||
builder.setMessage(R.string.wantcheckout)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
if (CheckNetAvailability()) {
|
||||
|
||||
|
||||
/*Intent i = new Intent(StoreListActivity.this, CheckOutStoreActivity.class);
|
||||
|
||||
intent.putExtra("storeId",store_id );
|
||||
|
||||
startActivity(i);*/
|
||||
} else {
|
||||
|
||||
Snackbar.make(recyclerView, R.string.nonetwork, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.cancel,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
public boolean CheckNetAvailability() {
|
||||
|
||||
boolean connected = false;
|
||||
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)
|
||||
.getState() == NetworkInfo.State.CONNECTED
|
||||
|| connectivityManager.getNetworkInfo(
|
||||
ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {
|
||||
// we are connected to a network
|
||||
connected = true;
|
||||
}
|
||||
return connected;
|
||||
}
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
@@ -338,6 +396,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
RelativeLayout relativelayout;
|
||||
ImageView imageview;
|
||||
Button chkbtn;
|
||||
CardView Cardbtn;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
@@ -348,6 +407,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
imageview = (ImageView) itemView.findViewById(R.id.imageView2);
|
||||
|
||||
chkbtn = (Button) itemView.findViewById(R.id.chkout);
|
||||
Cardbtn = (CardView) itemView.findViewById(R.id.card_view);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -368,25 +429,22 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
// find which radio button is selected
|
||||
if (checkedId == R.id.yes) {
|
||||
boolean flag=true;
|
||||
if(coverage.size()>0) {
|
||||
boolean flag = true;
|
||||
if (coverage.size() > 0) {
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
if (store_id.equals(coverage.get(i).getStoreId())) {
|
||||
flag=false;
|
||||
flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag==true)
|
||||
{
|
||||
if (flag == true) {
|
||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||
startActivity(in);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
dialog.cancel();
|
||||
}
|
||||
else
|
||||
{
|
||||
Intent in=new Intent(StoreListActivity.this,CategoryListActivity.class);
|
||||
} else {
|
||||
Intent in = new Intent(StoreListActivity.this, CategoryListActivity.class);
|
||||
startActivity(in);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
dialog.cancel();
|
||||
@@ -400,7 +458,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
||||
builder.setMessage(CommonString.DATA_DELETE_ALERT_MESSAGE)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes",
|
||||
.setPositiveButton(getResources().getString(R.string.yes),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog,
|
||||
int id) {
|
||||
@@ -409,13 +467,12 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
UpdateStore(store_id);
|
||||
|
||||
|
||||
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
startActivity(in);
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No",
|
||||
.setNegativeButton(getResources().getString(R.string.no),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog,
|
||||
int id) {
|
||||
@@ -430,7 +487,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
} else {
|
||||
|
||||
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
startActivity(in);
|
||||
}
|
||||
|
||||
@@ -500,3 +557,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,8 +157,8 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
|
||||
case R.id.img_cam_selfie:
|
||||
|
||||
_pathforcheck = store_id + "Store"
|
||||
+ "Image" + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_pathforcheck = store_id + getResources().getString(R.string.store)
|
||||
+ getResources().getString(R.string.image) + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
|
||||
@@ -173,9 +173,9 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
if (img_str != null) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreimageActivity.this);
|
||||
builder.setMessage("Do you want to save the data ")
|
||||
builder.setMessage(getResources().getString(R.string.title_activity_save_data))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
alert.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);
|
||||
@@ -211,7 +211,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
alert.show();
|
||||
|
||||
} else {
|
||||
Toast.makeText(getApplicationContext(), "Please click the image", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getApplicationContext(), getResources().getString(R.string.clickimage), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.content.res.Resources;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.Window;
|
||||
@@ -24,11 +25,16 @@ import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -669,6 +675,62 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
//MAPPING_PLANOGRAM Image save into folder
|
||||
if (mapping_planogram_masterGetterSetter != null) {
|
||||
|
||||
for (int i = 0; i < mapping_planogram_masterGetterSetter.getIMAGE_PATH().size(); i++) {
|
||||
//publishing image download
|
||||
data.value = data.value + 1;
|
||||
if (data.value < 100) {
|
||||
publishProgress(data);
|
||||
}
|
||||
|
||||
String image_name = mapping_planogram_masterGetterSetter.getPLANOGRAM_IMAGE().get(i);
|
||||
String path = mapping_planogram_masterGetterSetter.getIMAGE_PATH().get(i);
|
||||
|
||||
if (!image_name.equalsIgnoreCase("NA") && !image_name.equalsIgnoreCase("")) {
|
||||
URL url = new URL(path + "/" + image_name);
|
||||
HttpURLConnection c = (HttpURLConnection) url.openConnection();
|
||||
c.setRequestMethod("GET");
|
||||
c.getResponseCode();
|
||||
c.connect();
|
||||
|
||||
if (c.getResponseCode() == 200) {
|
||||
int length = c.getContentLength();
|
||||
|
||||
String size = new DecimalFormat("##.##").format((double) length / 1024) + " KB";
|
||||
|
||||
//String PATH = Environment.getExternalStorageDirectory() + "/Download/GT_GSK_Images/";
|
||||
String PATH = CommonString.FILE_PATH;
|
||||
File file = new File(PATH);
|
||||
if (!file.isDirectory()) {
|
||||
file.mkdir();
|
||||
}
|
||||
|
||||
// Environment.getExternalStorageDirectory() + "/GT_GSK_Images/" + _pathforcheck1;
|
||||
if (!new File(PATH + image_name).exists() && !size.equalsIgnoreCase("0 KB")) {
|
||||
File outputFile = new File(file, image_name);
|
||||
FileOutputStream fos = new FileOutputStream(outputFile);
|
||||
InputStream is1 = c.getInputStream();
|
||||
|
||||
int bytes = 0;
|
||||
byte[] buffer = new byte[1024];
|
||||
int len1 = 0;
|
||||
|
||||
while ((len1 = is1.read(buffer)) != -1) {
|
||||
bytes = (bytes + len1);
|
||||
// data.value = (int) ((double) (((double)
|
||||
// bytes) / length) * 100);
|
||||
fos.write(buffer, 0, len1);
|
||||
}
|
||||
fos.close();
|
||||
is1.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Gagan end code
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
//getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+39
-127
@@ -37,54 +37,28 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
||||
CategoryWisePerformaceAdapter adapter;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
GSKOrangeDB db;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_category_wise_performance);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
//txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
//txt_categoryName.setText(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
||||
toolbar.setTitle(getResources().getString(R.string.title_activity_category_wise_performance) + " " + categoryName);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
||||
intent.putExtra("categoryName", categoryName);
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
setContentView(R.layout.activity_category_wise_performance);
|
||||
|
||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
@@ -103,7 +77,16 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
||||
intent.putExtra("categoryName", categoryName);
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
} catch (Resources.NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -113,79 +96,8 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
categoryWisePerformanceList = new ArrayList<>();
|
||||
CategoryWisePerformaceGetterSetter data = new CategoryWisePerformaceGetterSetter();
|
||||
|
||||
data.setPeriod("Period");
|
||||
data.setSos("SOS");
|
||||
data.setT2p("T2P");
|
||||
data.setPromo("Promo");
|
||||
data.setMsl_availability("MSL Availability");
|
||||
data.setOss("OSS");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("LTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("MTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("RTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("LTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("MTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("RTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
adapter = new CategoryWisePerformaceAdapter(CategoryWisePerformanceActivity.this, categoryWisePerformanceList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
|
||||
try {
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
categoryWisePerformanceList = db.getCategoryWisePerformance(store_id, categoryId);
|
||||
|
||||
adapter = new CategoryWisePerformaceAdapter(CategoryWisePerformanceActivity.this, categoryWisePerformanceList);
|
||||
@@ -194,13 +106,31 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
public class CategoryWisePerformaceAdapter extends RecyclerView.Adapter<CategoryWisePerformaceAdapter.MyViewHolder> {
|
||||
Context context;
|
||||
private LayoutInflater inflator;
|
||||
List<CategoryWisePerformaceGetterSetter> list = Collections.emptyList();
|
||||
private LayoutInflater inflator;
|
||||
|
||||
public CategoryWisePerformaceAdapter(Context context, List<CategoryWisePerformaceGetterSetter> list) {
|
||||
inflator = LayoutInflater.from(context);
|
||||
@@ -256,25 +186,6 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
@@ -301,4 +212,5 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-2
@@ -181,7 +181,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
//getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,6 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
+54
-14
@@ -72,12 +72,11 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
@@ -106,18 +105,18 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
|
||||
//if (validateData(listDataHeader, listDataChild)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MSL_AvailabilityActivity.this);
|
||||
builder.setMessage("Are you sure you want to save")
|
||||
builder.setMessage(getResources().getString(R.string.check_save_message))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.open();
|
||||
|
||||
if (db.checkMsl_AvailabilityData(store_id, categoryId)) {
|
||||
db.updateMSL_Availability(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Snackbar.make(view, "Data has been updated", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else {
|
||||
db.InsertMSL_Availability(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Snackbar.make(view, "Data has been saved", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
|
||||
//Toast.makeText(getApplicationContext(), "Data has been saved", Toast.LENGTH_LONG).show();
|
||||
@@ -125,7 +124,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@@ -221,6 +220,13 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
} catch (Resources.NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
@@ -260,7 +266,23 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(MSL_AvailabilityActivity.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.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();
|
||||
alert.show();
|
||||
//finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
@@ -271,6 +293,28 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(MSL_AvailabilityActivity.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.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();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
private Context _context;
|
||||
private List<MSL_AvailabilityGetterSetter> _listDataHeader;
|
||||
@@ -312,6 +356,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||
|
||||
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||
|
||||
/*img_camera.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -393,6 +438,7 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimary));
|
||||
holder.txt_skuName.setText(childData.getSku());
|
||||
holder.txt_mbq.setText(childData.getMbq());
|
||||
|
||||
@@ -443,12 +489,6 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
+71
-35
@@ -45,9 +45,35 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
GSKOrangeDB db;
|
||||
String categoryName, categoryId;
|
||||
|
||||
private SharedPreferences preferences;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -73,13 +99,11 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
btn_add = (Button) findViewById(R.id.btn_add);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
db.open();
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
@@ -265,6 +289,13 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
@@ -418,7 +449,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
//getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -430,7 +461,23 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(PromoComplianceActivity.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.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();
|
||||
alert.show();
|
||||
//finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
@@ -442,35 +489,24 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(PromoComplianceActivity.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.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) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
|
||||
+378
-155
@@ -2,6 +2,7 @@ package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -26,6 +27,8 @@ import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
@@ -60,6 +63,7 @@ import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
|
||||
@@ -79,8 +83,37 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
boolean isDialogOpen = true;
|
||||
boolean checkflag = true;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
Uri outputFileUri = null;
|
||||
String gallery_package = "";
|
||||
private SharedPreferences preferences;
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -94,12 +127,11 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
//txt_stockFacingName = (TextView) findViewById(R.id.txt_stockFacingName);
|
||||
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
@@ -132,18 +164,18 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
if (validateData(hashMapListHeaderData, hashMapListChildData)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Are you sure you want to save")
|
||||
builder.setMessage(getResources().getString(R.string.check_save_message))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
db.open();
|
||||
|
||||
if (db.checkStockAndFacingData(store_id, categoryId)) {
|
||||
db.updateStockAndFacing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Snackbar.make(view, "Data has been updated", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.update_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else {
|
||||
db.InsertStock_Facing(store_id, categoryId, hashMapListHeaderData, hashMapListChildData);
|
||||
Snackbar.make(view, "Data has been saved", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
Snackbar.make(view, getResources().getString(R.string.save_message), Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
//Toast.makeText(getApplicationContext(), "Data has been saved", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
@@ -151,7 +183,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
@@ -160,9 +192,10 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
alert.show();
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Fill the value or fill 0 ")
|
||||
//builder.setMessage(getResources().getString(R.string.empty_field))
|
||||
builder.setMessage(Error_Message)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
@@ -218,6 +251,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -231,6 +266,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
fab.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -245,6 +282,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
} catch (Resources.NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
@@ -293,10 +331,45 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
String stock = listDataChild.get(listDataHeader.get(i)).get(j).getStock();
|
||||
String faceup = listDataChild.get(listDataHeader.get(i)).get(j).getFacing();
|
||||
|
||||
//Camera allow enable
|
||||
if (camera_allow.equalsIgnoreCase("1")) {
|
||||
//Company_id
|
||||
if (listDataChild.get(listDataHeader.get(i)).get(j).getCompany_id().equals("1")) {
|
||||
//Camera allow enable
|
||||
if (camera_allow.equalsIgnoreCase("1")) {
|
||||
|
||||
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||
if (!imagePath.equals("") || !imagePath1.equals("")) {
|
||||
if (!stock.equals("0")) {
|
||||
if (stock.equals("") || faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.fill_data);
|
||||
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);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.click_image);
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
//Camera allow disable
|
||||
if (!stock.equals("0")) {
|
||||
if (stock.equals("") || faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
@@ -318,40 +391,17 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
if (faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please click either 1 image";
|
||||
Error_Message = "Please fill all the data";
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
//Camera allow disable
|
||||
if (!stock.equals("0")) {
|
||||
if (stock.equals("") || faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please fill all the data";
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (stock.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
|
||||
flag = false;
|
||||
Error_Message = "Please fill all the data";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,16 +419,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void startCameraActivity1(int position) {
|
||||
try {
|
||||
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
||||
File file = new File(path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
startActivityForResult(intent, position);*/
|
||||
|
||||
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||
/*try {
|
||||
Log.e("Stock & Facing ", "startCameraActivity()");
|
||||
File file = new File(path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
@@ -387,8 +429,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
/*Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);*/
|
||||
*//*Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);*//*
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
@@ -410,21 +452,58 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
startActivityForResult(intent, 1);
|
||||
//startActivityForResult(intent, position);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
|
||||
try {
|
||||
Log.e("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);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
//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;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 1);
|
||||
} 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, 1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void startCameraActivity2(int position) {
|
||||
try {
|
||||
/*Log.e("Stock and Facing ", "startCameraActivity()");
|
||||
File file = new File(path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
startActivityForResult(intent, position);*/
|
||||
|
||||
/*try {
|
||||
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||
File file = new File(path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
@@ -434,8 +513,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
/*Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);*/
|
||||
*//*Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);*//*
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
@@ -455,7 +534,51 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 2);
|
||||
//startActivityForResult(intent, position);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
|
||||
try {
|
||||
Log.e("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);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
//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;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 2);
|
||||
} 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, 2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -534,7 +657,24 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(Stock_FacingActivity.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.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();
|
||||
alert.show();
|
||||
//finish();
|
||||
}
|
||||
|
||||
//Planogram Dialog
|
||||
@@ -548,7 +688,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
ImageView img_planogram = (ImageView) dialog.findViewById(R.id.img_planogram);
|
||||
|
||||
String planogram_image = "";
|
||||
ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mp = db.getMappingPlanogramData("");
|
||||
|
||||
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);
|
||||
@@ -579,6 +721,35 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
//super.onBackPressed();
|
||||
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(Stock_FacingActivity.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.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();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
private Context _context;
|
||||
private List<Stock_FacingGetterSetter> _listDataHeader;
|
||||
@@ -628,8 +799,16 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
if (headerTitle.getCompany_id().equals("1")) {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
|
||||
txt_sosHeader.setVisibility(View.VISIBLE);
|
||||
img_camera1.setVisibility(View.VISIBLE);
|
||||
img_camera2.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.black));
|
||||
|
||||
txt_sosHeader.setVisibility(View.GONE);
|
||||
img_camera1.setVisibility(View.GONE);
|
||||
img_camera2.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//Camera allow enable
|
||||
@@ -641,7 +820,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
//String date = new Date().toLocaleString().toString();
|
||||
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||
|
||||
_pathforcheck = "Stock_Cam1_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_pathforcheck = "Stock_Cam1_" + store_id + "_" + headerTitle.getBrand_id()
|
||||
+ "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = groupPosition;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
@@ -669,7 +849,8 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
//String date = new Date().toLocaleString().toString();
|
||||
//String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||
|
||||
_pathforcheck = "Stock_Cam2_" + store_id + "_" + headerTitle.getBrand_id() + "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_pathforcheck = "Stock_Cam2_" + store_id + "_" + headerTitle.getBrand_id()
|
||||
+ "_" + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = groupPosition;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
@@ -695,11 +876,29 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
img_camera2.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.black));
|
||||
if (headerTitle.getCompany_id().equals("1")) {
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||
} else {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.black));
|
||||
}*/
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
} else {*/
|
||||
txt_stockFaceupHeader.setTextColor(getResources().getColor(R.color.black));
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -747,8 +946,10 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
holder.ed_stock.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.txt_skuName.setTextColor(getResources().getColor(R.color.black));
|
||||
holder.ed_stock.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -785,6 +986,43 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
/*holder.ed_stock.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
//final EditText caption = (EditText) v;
|
||||
String edStock = s.toString();
|
||||
|
||||
if (!edStock.equals("")) {
|
||||
String stock = edStock.replaceFirst("^0+(?!$)", "");
|
||||
childData.setStock(stock);
|
||||
|
||||
if (edStock.equals("0")) {
|
||||
childData.setFacing("0");
|
||||
|
||||
finalHolder.ed_facing.setEnabled(false);
|
||||
} else {
|
||||
childData.setFacing(childData.getFacing());
|
||||
finalHolder.ed_facing.setEnabled(true);
|
||||
}
|
||||
} else {
|
||||
childData.setStock("");
|
||||
finalHolder.ed_facing.setEnabled(true);
|
||||
}
|
||||
|
||||
expandableListView.invalidateViews();
|
||||
}
|
||||
});*/
|
||||
|
||||
holder.ed_stock.setText(childData.getStock());
|
||||
|
||||
holder.ed_facing.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@@ -793,44 +1031,49 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
final EditText caption = (EditText) v;
|
||||
final String edFaceup = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||
|
||||
if (!childData.getStock().equals("")) {
|
||||
if (!edFaceup.equals("")) {
|
||||
if (Integer.parseInt(edFaceup) <= Integer.parseInt(childData.getStock())) {
|
||||
childData.setFacing(edFaceup);
|
||||
} else {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Faceup can not be greater than stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
if (!childData.getStock().equals("")) {
|
||||
if (!edFaceup.equals("")) {
|
||||
if (Integer.parseInt(edFaceup) <= Integer.parseInt(childData.getStock())) {
|
||||
childData.setFacing(edFaceup);
|
||||
} else {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("Faceup can not be greater than stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
childData.setFacing("");
|
||||
}
|
||||
} else {
|
||||
childData.setFacing("");
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("First fill the stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isDialogOpen) {
|
||||
isDialogOpen = !isDialogOpen;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(Stock_FacingActivity.this);
|
||||
builder.setMessage("First fill the stock value")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.dismiss();
|
||||
isDialogOpen = !isDialogOpen;
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
childData.setFacing(edFaceup);
|
||||
childData.setStock("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -840,24 +1083,39 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
if (!checkflag) {
|
||||
boolean tempflag = false;
|
||||
|
||||
if (holder.ed_stock.getText().toString().equals("")) {
|
||||
holder.ed_stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_stock.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_stock.setHint("Empty");
|
||||
tempflag = true;
|
||||
}
|
||||
if (childData.getCompany_id().equals("1")) {
|
||||
if (holder.ed_stock.getText().toString().equals("")) {
|
||||
holder.ed_stock.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_stock.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_stock.setHint("Empty");
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
if (holder.ed_facing.getText().toString().equals("")) {
|
||||
holder.ed_facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_facing.setHint("Empty");
|
||||
tempflag = true;
|
||||
}
|
||||
if (holder.ed_facing.getText().toString().equals("")) {
|
||||
holder.ed_facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_facing.setHint("Empty");
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
if (tempflag) {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
if (tempflag) {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
} else {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
if (holder.ed_facing.getText().toString().equals("")) {
|
||||
holder.ed_facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.ed_facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.ed_facing.setHint("Empty");
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
if (tempflag) {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -881,39 +1139,4 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
TextView txt_skuName;
|
||||
LinearLayout lin_category;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+56
-21
@@ -3,6 +3,7 @@ package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
@@ -21,6 +22,7 @@ import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -36,8 +38,35 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
StoreWisePerformaceAdapter adapter;
|
||||
|
||||
GSKOrangeDB db;
|
||||
private SharedPreferences preferences;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equalsIgnoreCase("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equalsIgnoreCase("UAE")) {
|
||||
lang = "AR";
|
||||
}
|
||||
else {
|
||||
lang = "TR";
|
||||
}
|
||||
|
||||
Locale locale = new Locale(lang);
|
||||
Locale.setDefault(locale);
|
||||
|
||||
Resources resources = context.getResources();
|
||||
|
||||
Configuration configuration = resources.getConfiguration();
|
||||
configuration.locale = locale;
|
||||
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -49,10 +78,11 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
db.open();
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
@@ -78,12 +108,15 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
} catch (Resources.NotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
try {
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
storeWisePerformanceList = db.getStoreWisePerformance(store_id);
|
||||
|
||||
adapter = new StoreWisePerformaceAdapter(StoreWisePerformanceActivity.this, storeWisePerformanceList);
|
||||
@@ -94,10 +127,29 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
public class StoreWisePerformaceAdapter extends RecyclerView.Adapter<StoreWisePerformaceAdapter.MyViewHolder> {
|
||||
Context context;
|
||||
private LayoutInflater inflator;
|
||||
List<StoreWisePerformaceGetterSetter> list = Collections.emptyList();
|
||||
private LayoutInflater inflator;
|
||||
|
||||
public StoreWisePerformaceAdapter(Context context, List<StoreWisePerformaceGetterSetter> list) {
|
||||
inflator = LayoutInflater.from(context);
|
||||
@@ -152,22 +204,5 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UPLOAD_STORE_COVERAGE, envelope);
|
||||
|
||||
@@ -541,30 +541,30 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
||||
|
||||
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||
additionalVisibilitySkuList = db.getDialogStockUpload(KeyID);
|
||||
|
||||
if (additionalVisibilitySkuList.size() > 0) {
|
||||
|
||||
for (int k = 0; k < additionalVisibilitySkuList.size(); k++) {
|
||||
|
||||
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
/* + "[DIALOG_BRAND_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getBrand_id()
|
||||
+ "[/DIALOG_BRAND_ID]"*/
|
||||
+ "[SKU_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getSku_id()
|
||||
+ "[/SKU_ID]"
|
||||
+ "[QUANTITY]"
|
||||
+ additionalVisibilitySkuList.get(k).getQuantity()
|
||||
+ "[/QUANTITY]"
|
||||
+ "[/VISIBILITY_DAILOG]";
|
||||
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[CATEGORY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getCategoryId()
|
||||
+ "[/CATEGORY_ID]"
|
||||
+ "[SKU_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getSku_id()
|
||||
+ "[/SKU_ID]"
|
||||
+ "[QUANTITY]"
|
||||
+ additionalVisibilitySkuList.get(k).getQuantity()
|
||||
+ "[/QUANTITY]"
|
||||
+ "[/VISIBILITY_DAILOG]";
|
||||
|
||||
additional_visibility_dialog_xml = additional_visibility_dialog_xml + onXMLdIALOG;
|
||||
|
||||
@@ -599,7 +599,12 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[/SKU_LIST]"
|
||||
+ "[/ADDITIONAL_VISIBILITY_DATA]";
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
KeyID="";
|
||||
additionalVisibilitySkuList.clear();
|
||||
|
||||
additional_visibility_dialog_xml="";
|
||||
|
||||
}
|
||||
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by gagang on 12-01-2017.
|
||||
*/
|
||||
|
||||
public class MAPPING_PLANOGRAM_DataGetterSetter {
|
||||
String KEYACCOUNT_ID, STORETYPE_ID, CLASS_ID, PLANOGRAM_IMAGE, IMAGE_PATH;
|
||||
|
||||
public String getKEYACCOUNT_ID() {
|
||||
return KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public void setKEYACCOUNT_ID(String KEYACCOUNT_ID) {
|
||||
this.KEYACCOUNT_ID = KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public String getSTORETYPE_ID() {
|
||||
return STORETYPE_ID;
|
||||
}
|
||||
|
||||
public void setSTORETYPE_ID(String STORETYPE_ID) {
|
||||
this.STORETYPE_ID = STORETYPE_ID;
|
||||
}
|
||||
|
||||
public String getCLASS_ID() {
|
||||
return CLASS_ID;
|
||||
}
|
||||
|
||||
public void setCLASS_ID(String CLASS_ID) {
|
||||
this.CLASS_ID = CLASS_ID;
|
||||
}
|
||||
|
||||
public String getPLANOGRAM_IMAGE() {
|
||||
return PLANOGRAM_IMAGE;
|
||||
}
|
||||
|
||||
public void setPLANOGRAM_IMAGE(String PLANOGRAM_IMAGE) {
|
||||
this.PLANOGRAM_IMAGE = PLANOGRAM_IMAGE;
|
||||
}
|
||||
|
||||
public String getIMAGE_PATH() {
|
||||
return IMAGE_PATH;
|
||||
}
|
||||
|
||||
public void setIMAGE_PATH(String IMAGE_PATH) {
|
||||
this.IMAGE_PATH = IMAGE_PATH;
|
||||
}
|
||||
}
|
||||
@@ -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/skuname"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -88,7 +88,7 @@
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="10"
|
||||
android:text="Quantity"
|
||||
android:text="@string/quantity"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
@@ -118,7 +118,7 @@
|
||||
android:layout_weight="10"
|
||||
android:background="@color/grey_background"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:text="Delete" />
|
||||
android:text="@string/delete" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
|
||||
<include layout="@layout/contentadditionalvisibility" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@android:drawable/ic_menu_save"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -160,9 +160,9 @@
|
||||
android:id="@+id/toggle_add_InStock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background"/>
|
||||
android:textOn="@string/yes"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -199,9 +199,9 @@
|
||||
android:id="@+id/toggle_add_promoAnnouncer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background" />
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -238,9 +238,9 @@
|
||||
android:id="@+id/toggle_add_runningPos"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
android:textOn="@string/yes"
|
||||
android:background="@drawable/toggle_selector_background" />
|
||||
android:textOn="@string/yes" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -258,7 +258,7 @@
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:text="@string/promo_compliance_add"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
android:id="@+id/btntoggle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textOn="Yes"
|
||||
android:textOff="No"
|
||||
android:textOn="@string/yes"
|
||||
android:textOff="@string/no"
|
||||
android:layout_weight=".5" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/store_image"
|
||||
android:text="@string/storefront"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/white"
|
||||
@@ -90,8 +90,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save_selfie"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/store_visited"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp" />
|
||||
android:textSize="18sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:hint="@string/stock_facing_stock"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
@@ -105,6 +106,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:hint="@string/stock_facing_faceup"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/storelistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/storelistviewxml_storeico"
|
||||
android:text="GSK MT ORANGE STORE"
|
||||
android:text="@string/GSKMT"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -55,19 +55,20 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/storelistviewxml_storename"
|
||||
android:layout_below="@+id/storelistviewxml_storename"
|
||||
android:text="C 126, Okhla II, "
|
||||
android:text="@string/address"
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:focusable="false"
|
||||
android:visibility="invisible" />
|
||||
android:background="@mipmap/checkout"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
@@ -76,7 +77,6 @@
|
||||
android:layout_alignBottom="@+id/storelistviewxml_storeico"
|
||||
android:layout_alignParentRight="true"
|
||||
|
||||
android:background="@mipmap/tick_c"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_planogram"
|
||||
android:icon="@mipmap/star"
|
||||
android:icon="@mipmap/ref_images_white"
|
||||
android:orderInCategory="100"
|
||||
android:title="planogram"
|
||||
app:showAsAction="always" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@@ -120,4 +120,45 @@
|
||||
|
||||
<string name="select_language_item">Dil Seçimi</string>
|
||||
|
||||
</resources>
|
||||
<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_select_dropdown">Please Select dropdown</string>
|
||||
<string name="title_activity_take_image">Please Take a image</string>
|
||||
|
||||
<string name="title_activity_fill_sku">Please fill sku data</string>
|
||||
<string name="title_activity_enter_quantity">Please enter Quantity</string>
|
||||
<string name="title_activity_save_data">Do you want to save the data</string>
|
||||
|
||||
|
||||
<string name="clickimage">Please click the image</string>
|
||||
<string name="gps">GPS IS DISABLED...</string>
|
||||
<string name="gpsebale">Click ok to enable GPS.</string>
|
||||
<string name="takeimage"> Please Take Image Before Save</string>
|
||||
<string name="notsuppoted">This device is not supported.</string>
|
||||
<string name="uploaddata">Uploading Data</string>
|
||||
<string name="geotagdata">Uploading Geotag Data...</string>
|
||||
<string name="failure">failure</string>
|
||||
<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="click_image">Please click image</string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +36,17 @@
|
||||
<string name="add">Add</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="brandname">Brand Name</string>
|
||||
<string name="skuname">SKU Name</string>
|
||||
<string name="quantity">Quantity</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="StoreVisited"> Store Visited</string>
|
||||
<string name="GSKMT">GSK MT ORANGE STORE</string>
|
||||
<string name="address">C 126, Okhla II,</string>
|
||||
<string name="storefront">Click Store Front Image</string>
|
||||
|
||||
<string name="select_language">Please select language</string>
|
||||
<string name="title_activity_select_language">Select Language</string>
|
||||
|
||||
@@ -103,9 +114,6 @@
|
||||
|
||||
<string name="enter_the_values">Enter the values</string>
|
||||
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
|
||||
<string name="title_activity_upload">Upload Data</string>
|
||||
<string name="no_data_for_upload">No Data For Upload</string>
|
||||
<string name="first_checkout_store">First checkout of store</string>
|
||||
@@ -141,6 +149,34 @@
|
||||
<string name="Display">Display</string>
|
||||
<string name="Photo">Photo</string>
|
||||
<string name="title_activity_Additional_visibility">Additional Visibility</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_select_dropdown">Please Select dropdown</string>
|
||||
<string name="title_activity_take_image">Please Take a image</string>
|
||||
|
||||
<string name="title_activity_fill_sku">Please fill sku data</string>
|
||||
<string name="title_activity_enter_quantity">Please enter Quantity</string>
|
||||
<string name="title_activity_save_data">Do you want to save the data</string>
|
||||
|
||||
<string name="clickimage">Please click the image</string>
|
||||
<string name="gps">GPS IS DISABLED...</string>
|
||||
<string name="gpsebale">Click ok to enable GPS.</string>
|
||||
<string name="takeimage"> Please Take Image Before Save</string>
|
||||
<string name="notsuppoted">This device is not supported.</string>
|
||||
<string name="uploaddata">Uploading Data</string>
|
||||
<string name="geotagdata">Uploading Geotag Data...</string>
|
||||
<string name="failure">failure</string>
|
||||
<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="title_activity_Non_Work">Non Working Reason</string>
|
||||
<string name="closed">Close</string>
|
||||
|
||||
@@ -161,6 +197,15 @@
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||
<string name="title_activity_settings">SettingsActivity</string>
|
||||
|
||||
<string name="ok">OK</string>
|
||||
<string name="check_save_message">Are you sure you want to save</string>
|
||||
<string name="save_message">Data has been saved</string>
|
||||
<string name="update_message">Data has been updated</string>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user