Merge branch 'master' into GG_MappingPlanogram_DialogDisplay
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/icon"
|
||||
android:icon="@drawable/gsklogo"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
@@ -34,7 +34,7 @@
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:label="@string/main_menu_activity_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
@@ -60,7 +60,7 @@
|
||||
<activity
|
||||
android:name=".dailyentry.StoreimageActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:label="@string/title_activity_store_image"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
|
||||
@@ -280,7 +280,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
try {
|
||||
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1') As Brand", null);
|
||||
dbcursor = db.rawQuery("SELECT * FROM(SELECT DISTINCT BR.BRAND_ID, SCM.SUB_CATEGORY||'-'||BR.BRAND AS BRAND FROM MAPPING_STOCK MS INNER JOIN SKU_MASTER SM ON MS.SKU_ID = SM.SKU_ID INNER JOIN BRAND_MASTER BR ON SM.BRAND_ID=BR.BRAND_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BR.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID WHERE MS.KEYACCOUNT_ID ='" + key_account_id + "' AND STORETYPE_ID ='" + store_type_id + "' AND CLASS_ID = '" + class_id + "' AND BR.COMPANY_ID ='1' ORDER BY SCM.SUB_CATEGORY_SEQUENCE, BR.BRAND_SEQUENCE) As Brand", null);
|
||||
if (dbcursor != null) {
|
||||
|
||||
dbcursor.moveToFirst();
|
||||
@@ -1675,6 +1675,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN " +
|
||||
"where VISIT_DATE ='" + date + "' AND STORE_ID='" + store_id + "'", null);
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
@@ -2152,6 +2153,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setKEY_ID(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_ID)));
|
||||
|
||||
sb.setCOMMON_ID(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_Common_ID)));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow(CommonString.KEY_BRAND_ID)));
|
||||
|
||||
@@ -2201,7 +2205,17 @@ 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);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("" + e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ArrayList<BrandMasterGetterSetter> getBrandMasterData(String store_id) {
|
||||
Cursor cursordata = null;
|
||||
@@ -2209,7 +2223,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM BRAND_MASTER ", null);
|
||||
cursordata = db.rawQuery("SELECT BR.BRAND_ID, BR.BRAND FROM BRAND_MASTER BR INNER JOIN SUB_CATEGORY_MASTER SB ON BR.SUB_CATEGORY_ID = SB.SUB_CATEGORY_ID INNER JOIN CATEGORY_MASTER CA ON SB.CATEGORY_ID =CA.CATEGORY_ID WHERE COMPANY_ID =1", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
@@ -2220,12 +2234,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
sb.setBRAND(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
|
||||
/*sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
|
||||
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
|
||||
sb.setCOMPANY_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("COMPANY_ID")));
|
||||
|
||||
sb.setBRAND_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_SEQUENCE")));
|
||||
sb.setBRAND_SEQUENCE(cursordata.getString(cursordata.getColumnIndexOrThrow("BRAND_SEQUENCE")));*/
|
||||
|
||||
Data.add(sb);
|
||||
cursordata.moveToNext();
|
||||
@@ -2282,13 +2298,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
}
|
||||
|
||||
public void InsertAdditionalData(AddittionalGetterSetter data, ArrayList<AdditionalDialogGetterSetter> dialog) {
|
||||
|
||||
public void InsertAdditionalData(AddittionalGetterSetter data,ArrayList<AdditionalDialogGetterSetter> dialog,String categoryId) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
ContentValues values1 = new ContentValues();
|
||||
try {
|
||||
|
||||
|
||||
values.put("Store_Id", data.getStore_id());
|
||||
values.put("categoryId", categoryId);
|
||||
values.put("brand_name", data.getBrand());
|
||||
values.put("brand_id", data.getBrand_id());
|
||||
values.put("image_url", data.getImage());
|
||||
@@ -2301,6 +2318,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
for (int i = 0; i < dialog.size(); i++) {
|
||||
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||
values1.put(CommonString.KEY_STORE_ID, dialog.get(i).getStore_id());
|
||||
values1.put("categoryId", categoryId);
|
||||
values1.put(CommonString.KEY_BRAND, dialog.get(i).getBrand());
|
||||
values1.put(CommonString.KEY_BRAND_ID, dialog.get(i).getBrand_id());
|
||||
values1.put(CommonString.KEY_QUANTITY, dialog.get(i).getQuantity());
|
||||
@@ -2310,10 +2328,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_STOCK_DIALOG, null, values1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.getMessage());
|
||||
}
|
||||
@@ -2321,14 +2337,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
public ArrayList<AddittionalGetterSetter> getAdditionalStock(String store_id) {
|
||||
public ArrayList<AddittionalGetterSetter> getAdditionalStock(String store_id,String categoryId) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<AddittionalGetterSetter> productData = new ArrayList<AddittionalGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '" + store_id + "'", null);
|
||||
|
||||
// cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id + "'categoryId = '"+categoryId + "'", null);
|
||||
cursordata = db.rawQuery("Select * from Stock_Additional_visibility " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
@@ -2339,10 +2355,12 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setKey_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("KEY_ID")));
|
||||
|
||||
|
||||
sb.setStore_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("Store_Id")));
|
||||
|
||||
sb.setCategoryId(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("categoryId")));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("brand_id")));
|
||||
|
||||
@@ -2361,7 +2379,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
sb.setBtn_toogle(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("toggle_value")));
|
||||
|
||||
|
||||
productData.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
@@ -2449,6 +2466,95 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean additionalVisibilitydata(String store_id, String category_id) {
|
||||
Log.d("AdditionalVisibility ", "AdditionalVisibility data--------------->Start<------------");
|
||||
ArrayList<AddittionalGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("Select * from Stock_Additional_visibility " + "where categoryId='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
if (dbcursor.moveToFirst()) {
|
||||
do {
|
||||
AddittionalGetterSetter sb = new AddittionalGetterSetter();
|
||||
|
||||
sb.setBrand_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("brand_id")));
|
||||
list.add(sb);
|
||||
} while (dbcursor.moveToNext());
|
||||
}
|
||||
dbcursor.close();
|
||||
|
||||
if (list.size() > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "when fetching Records!!!!" + e.toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public ArrayList<AddittionalGetterSetter> getAdditionalStockUpload(String store_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<AddittionalGetterSetter> productData = new ArrayList<AddittionalGetterSetter>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM Stock_Additional_visibility WHERE Store_Id = '"+store_id +"'", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
AddittionalGetterSetter sb = new AddittionalGetterSetter();
|
||||
|
||||
|
||||
sb.setKey_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("KEY_ID")));
|
||||
|
||||
sb.setStore_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("Store_Id")));
|
||||
|
||||
sb.setCategoryId(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("categoryId")));
|
||||
|
||||
sb.setBrand_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("brand_id")));
|
||||
|
||||
sb.setBrand(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("brand_name")));
|
||||
|
||||
|
||||
sb.setImage(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("image_url")));
|
||||
|
||||
sb.setSku_id(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("sku_id")));
|
||||
|
||||
sb.setSku(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("sku_name")));
|
||||
sb.setBtn_toogle(cursordata.getString(cursordata
|
||||
.getColumnIndexOrThrow("toggle_value")));
|
||||
|
||||
productData.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return productData;
|
||||
|
||||
}
|
||||
|
||||
// get T2P Compliance data
|
||||
public ArrayList<T2PGetterSetter> getT2pComplianceData(String store_id, String category_id) {
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
@@ -67,6 +69,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
@@ -130,6 +133,9 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
storeid = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
storename = preferences.getString(CommonString.KEY_STORE_NAME, null);
|
||||
@@ -384,6 +390,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
/* checkPlayServices();
|
||||
|
||||
// Resuming the periodic location updates
|
||||
@@ -993,4 +1000,32 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package cpm.com.gskmtorange.GeoTag;
|
||||
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;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
@@ -23,6 +25,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.MainActivity;
|
||||
|
||||
@@ -68,6 +71,9 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
|
||||
@@ -133,9 +139,9 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// TODO Auto-generated method stub
|
||||
Intent intent = new Intent(GeoTagStoreList.this, MainActivity.class);
|
||||
/* Intent intent = new Intent(GeoTagStoreList.this, MainActivity.class);
|
||||
|
||||
startActivity(intent);
|
||||
startActivity(intent);*/
|
||||
GeoTagStoreList.this.finish();
|
||||
}
|
||||
|
||||
@@ -291,13 +297,37 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,26 @@ public class AdditionalDialogGetterSetter {
|
||||
image3, BEFORE_QTY, camera1, camera2, camera3, AFTER_QTY, store_id, stock_count, question_id, question, answer, type,
|
||||
KEY_ID, unique_id,image_url, sku_id,quantity, process_id, sku_name, stock_flag;
|
||||
|
||||
public String getCOMMON_ID() {
|
||||
return COMMON_ID;
|
||||
}
|
||||
|
||||
public void setCOMMON_ID(String COMMON_ID) {
|
||||
this.COMMON_ID = COMMON_ID;
|
||||
}
|
||||
|
||||
String COMMON_ID;
|
||||
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
String categoryId;
|
||||
|
||||
public String getStock_flag() {
|
||||
return stock_flag;
|
||||
}
|
||||
|
||||
@@ -76,5 +76,14 @@ public class AddittionalGetterSetter {
|
||||
|
||||
String btn_toogle;
|
||||
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
String categoryId;
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +115,19 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
setContentView(R.layout.activity_login);
|
||||
|
||||
TextView tv_version = (TextView) findViewById(R.id.tv_version_code);
|
||||
|
||||
try {
|
||||
app_ver =String.valueOf(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
|
||||
|
||||
// login_version.setText("Parinaam Version " + app_ver);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
tv_version.setText("Version/Versiyon - " + app_ver);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
editor = preferences.edit();
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
@@ -33,6 +35,7 @@ import java.io.FileOutputStream;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
@@ -68,7 +71,11 @@ public class MainActivity extends AppCompatActivity
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
imageView = (ImageView) findViewById(R.id.img_main);
|
||||
|
||||
@@ -122,6 +129,13 @@ public class MainActivity extends AppCompatActivity
|
||||
navigationView.setNavigationItemSelectedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
@@ -195,6 +209,7 @@ public class MainActivity extends AppCompatActivity
|
||||
Snackbar.make(webView, R.string.no_data_for_upload, Snackbar.LENGTH_SHORT)
|
||||
.setAction("Action", null).show();
|
||||
|
||||
|
||||
} else {
|
||||
//if (isStoreCheckedIn()&& isValid()) {
|
||||
|
||||
@@ -249,12 +264,12 @@ public class MainActivity extends AppCompatActivity
|
||||
} else if (id == R.id.nav_exit) {
|
||||
|
||||
|
||||
Intent startDownload = new Intent(this,AdditionalVisibility.class);
|
||||
/* Intent startDownload = new Intent(this,AdditionalVisibility.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
|
||||
*/
|
||||
finish();
|
||||
|
||||
} else if (id == R.id.nav_services) {
|
||||
|
||||
@@ -267,7 +282,7 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
//startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
||||
|
||||
} else if (id == R.id.nav_export) {
|
||||
} /*else if (id == R.id.nav_export) {
|
||||
|
||||
AlertDialog.Builder builder1 = new AlertDialog.Builder(MainActivity.this);
|
||||
builder1.setMessage("Are you sure you want to take the backup of your data")
|
||||
@@ -276,12 +291,12 @@ public class MainActivity extends AppCompatActivity
|
||||
@SuppressWarnings("resource")
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
try {
|
||||
/*File file = new File(Environment
|
||||
*//*File file = new File(Environment
|
||||
.getExternalStorageDirectory(),
|
||||
"capital_backup");
|
||||
if (!file.isDirectory()) {
|
||||
file.mkdir();
|
||||
}*/
|
||||
}*//*
|
||||
|
||||
File sd = Environment.getExternalStorageDirectory();
|
||||
File data = Environment.getDataDirectory();
|
||||
@@ -324,7 +339,7 @@ public class MainActivity extends AppCompatActivity
|
||||
});
|
||||
AlertDialog alert1 = builder1.create();
|
||||
alert1.show();
|
||||
}
|
||||
}*/
|
||||
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
drawer.closeDrawer(GravityCompat.START);
|
||||
@@ -408,4 +423,31 @@ public class MainActivity extends AppCompatActivity
|
||||
return flag;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ public class CommonString {
|
||||
+ KEY_BRAND_ID + " VARCHAR," + KEY_BRAND + " VARCHAR,"
|
||||
+ KEY_DISPLAY_ID +" VARCHAR,"
|
||||
+ KEY_SKU_ID + " VARCHAR," + KEY_QUANTITY + " VARCHAR," + KEY_Common_ID + " VARCHAR,"
|
||||
+ KEY_CATEGORY_ID + " VARCHAR,"
|
||||
+ "categoryId" + " VARCHAR,"
|
||||
+ KEY_SKUNAME + " VARCHAR,"
|
||||
+ KEY_PROCESS_ID + " VARCHAR)";
|
||||
|
||||
@@ -340,7 +340,7 @@ public class CommonString {
|
||||
+ "toggle_value"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "IMAGE2"
|
||||
+ "categoryId"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
@@ -20,6 +22,7 @@ import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
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.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -46,6 +49,7 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
@@ -87,18 +91,18 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
ArrayList<SkuGetterSetter> empty_list = new ArrayList<>();
|
||||
String _pathforcheck, _path, str, msg;
|
||||
private SharedPreferences preferences;
|
||||
String store_id, date, intime, img_str, togglevalue = "1";
|
||||
String store_id, date, intime, img_str, togglevalue = "1",CATEGORY_ID;
|
||||
ImageView img_cam, img_clicked;
|
||||
Button btn_add, btn_close;
|
||||
EditText Edt_txt;
|
||||
MyAdaptorStock adapterData;
|
||||
ListView listviewlay;
|
||||
String errormsg;
|
||||
String errormsg,categoryName,categoryId;
|
||||
MyAdaptorAdditionalStock adapteradditional;
|
||||
AddittionalGetterSetter adGt;
|
||||
LinearLayout brandlayout, diaplylayout, cameralayout;
|
||||
//RelativeLayout skulayout;
|
||||
|
||||
CardView cardvew;
|
||||
////String brand_id,SKU_ID;
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
@@ -113,8 +117,12 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
store_id = "2";
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
//store_id = "2";
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||
|
||||
@@ -122,6 +130,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
db.open();
|
||||
spinner_brand_list = (Spinner) findViewById(R.id.spinner_Brand1);
|
||||
spinner_sku_list = (Spinner) findViewById(R.id.spinner_SkuMaster);
|
||||
cardvew = (CardView) findViewById(R.id.cardviewid);
|
||||
|
||||
|
||||
btntoggle = (ToggleButton) findViewById(R.id.btntoggle);
|
||||
btnimage = (ImageView) findViewById(R.id.btn_image);
|
||||
@@ -195,21 +205,62 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
}
|
||||
});
|
||||
|
||||
listdata = db.getAdditionalStock(store_id);
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
|
||||
for (int k = 0; k < listdata.size(); k++) {
|
||||
String KeyID = listdata.get(k).getKey_id();
|
||||
|
||||
uploadlist = db.getDialogStock(KeyID);
|
||||
String tooglevalue= listdata.get(k).getBtn_toogle();
|
||||
|
||||
if(tooglevalue.equalsIgnoreCase("0"))
|
||||
{
|
||||
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
btntoggle.setChecked(false);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* String KeyID = listdata.get(k).getKey_id();
|
||||
|
||||
uploadlist = db.getDialogStock(KeyID);*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (listdata.size() > 0) {
|
||||
|
||||
for (int i = 0; i < listdata.size(); i++) {
|
||||
if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* if (listdata.size() > 0) {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
}
|
||||
}*/
|
||||
|
||||
btnaddlayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -223,6 +274,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
adGt.setSku_id(sku_list_id);
|
||||
adGt.setStore_id(store_id);
|
||||
adGt.setBtn_toogle(togglevalue);
|
||||
adGt.setCategoryId(categoryId);
|
||||
|
||||
|
||||
if (validateData(adGt, defdata)) {
|
||||
|
||||
@@ -239,7 +292,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
db.InsertAdditionalData(adGt, defdata);
|
||||
db.InsertAdditionalData(adGt, defdata,categoryId);
|
||||
|
||||
spinner_brand_list.setSelection(0);
|
||||
|
||||
@@ -253,21 +306,42 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
defdata.clear();
|
||||
|
||||
btntoggle.setChecked(true);
|
||||
// btntoggle.setChecked(true);
|
||||
|
||||
btnimage.setBackgroundResource(R.mipmap.camera);
|
||||
togglevalue = "1";
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
// togglevalue = "1";
|
||||
|
||||
listdata = db.getAdditionalStock(store_id);
|
||||
|
||||
listdata = db.getAdditionalStock(store_id,categoryId);
|
||||
|
||||
if (listdata.size() > 0) {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
|
||||
for(int i=0;i<listdata.size();i++)
|
||||
{
|
||||
if(listdata.get(i).getBtn_toogle().equalsIgnoreCase("0"))
|
||||
{
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
@@ -307,9 +381,17 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
|
||||
} else {
|
||||
togglevalue = "0";
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
db.deleteStockEntryall(store_id,categoryId);
|
||||
|
||||
togglevalue = "0";
|
||||
defdata.clear();
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
@@ -1037,16 +1119,36 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
.setPositiveButton("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);
|
||||
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) {
|
||||
|
||||
for (int i = 0; i < listdata.size(); i++) {
|
||||
if (listdata.get(i).getBtn_toogle().equalsIgnoreCase("0")) {
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
cardvew.setVisibility(View.INVISIBLE);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
adapteradditional = new MyAdaptorAdditionalStock(AdditionalVisibility.this, listdata);
|
||||
listviewlay.setAdapter(adapteradditional);
|
||||
listviewlay.invalidateViews();
|
||||
btnaddlayout.setVisibility(View.VISIBLE);
|
||||
cardvew.setVisibility(View.VISIBLE);
|
||||
listviewlay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1149,5 +1251,38 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
return flag;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,14 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -32,6 +35,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
@@ -90,6 +94,9 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
_UserId = preferences.getString(CommonString.KEY_USERNAME, "");
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, "");
|
||||
@@ -108,7 +115,7 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
reason_adapter = new ArrayAdapter<CharSequence>(this,
|
||||
android.R.layout.simple_spinner_item);
|
||||
|
||||
reason_adapter.add("Select Reason");
|
||||
reason_adapter.add(getResources().getString(R.string.select_reason));
|
||||
|
||||
for (int i = 0; i < reasondata.size(); i++) {
|
||||
reason_adapter.add(reasondata.get(i).getREASON().get(0));
|
||||
@@ -463,4 +470,37 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
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;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
@@ -33,6 +35,7 @@ import android.widget.Toast;
|
||||
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.GeoTag.GeoTagActivity;
|
||||
@@ -72,6 +75,9 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
db = new GSKOrangeDB(StoreListActivity.this);
|
||||
@@ -90,8 +96,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
startActivity(in);
|
||||
|
||||
finish();
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -102,6 +106,8 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
// TODO Auto-generated method stub
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
coverage=db.getCoverageData(date);
|
||||
|
||||
@@ -285,6 +291,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
editor.putString(CommonString.KEY_KEYACCOUNT_ID, current.getKEYACCOUNT_ID());
|
||||
editor.putString(CommonString.KEY_STORETYPE_ID, current.getSTORETYPE_ID());
|
||||
editor.putString(CommonString.KEY_UPLOAD_STATUS, current.getUPLOAD_STATUS());
|
||||
|
||||
editor.commit();
|
||||
|
||||
// showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
|
||||
@@ -456,6 +463,34 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
return result_flag;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void UpdateStore(String storeid) {
|
||||
|
||||
db.open();
|
||||
|
||||
@@ -2,11 +2,14 @@ package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.location.Location;
|
||||
@@ -34,6 +37,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -82,6 +86,8 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
|
||||
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);
|
||||
@@ -341,6 +347,12 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
protected void onStart() {
|
||||
mGoogleApiClient.connect();
|
||||
super.onStart();
|
||||
@@ -351,4 +363,31 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@@ -49,6 +51,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.LoginActivity;
|
||||
@@ -98,6 +101,9 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
//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);
|
||||
@@ -168,9 +174,146 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
}
|
||||
|
||||
|
||||
public class T2PAdapter extends RecyclerView.Adapter<T2PAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<T2PGetterSetter> list;
|
||||
|
||||
public T2PAdapter(ArrayList<T2PGetterSetter> t2PList) {
|
||||
list = t2PList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.t2p_item_layout, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, final int position) {
|
||||
|
||||
final T2PGetterSetter mItem = list.get(position);
|
||||
holder.tv_brand.setText(mItem.getBrand());
|
||||
holder.tv_display.setText(mItem.getDisplay().trim());
|
||||
|
||||
//holder.tv_display.setTypeface(FontManager.getTypeface(getApplicationContext(),FontManager.FONTAWESOME));
|
||||
|
||||
/* Typeface iconFont = FontManager.getTypeface(getApplicationContext(), FontManager.FONTAWESOME);
|
||||
FontManager.markAsIconContainer(findViewById(R.id.icons_container), iconFont);
|
||||
*/
|
||||
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
showGapsDialog(mItem);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
holder.toggle_btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
mItem.setPresent(((ToggleButton) v).getText().toString().equalsIgnoreCase(getResources().getString(R.string.yes)));
|
||||
|
||||
t2PAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
holder.btn_sku.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showSkuDialog(mItem.getSkulist());
|
||||
}
|
||||
});
|
||||
|
||||
if (!img.equalsIgnoreCase("")) {
|
||||
if (position == child_position) {
|
||||
mItem.setImage(img);
|
||||
img = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(camera_allow.equals("1")){
|
||||
|
||||
holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
_pathforcheck = "T2P_Image_" + store_id + "_" + mItem.getBrand_id() + mItem.getDisplay_id() + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = position;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity();
|
||||
}
|
||||
});
|
||||
|
||||
if (mItem.getImage().equals("")) {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_green);
|
||||
}
|
||||
}
|
||||
else {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
|
||||
holder.toggle_btn.setChecked(mItem.isPresent());
|
||||
|
||||
if (mItem.getGapsChecklist().size() > 0) {
|
||||
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.green));
|
||||
} else {
|
||||
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
|
||||
if (mItem.getSkulist().size() > 0) {
|
||||
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.green));
|
||||
} else {
|
||||
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
public final LinearLayout parentLayout;
|
||||
public final TextView tv_brand, tv_display;
|
||||
public final ImageView img_cam, img_remark;
|
||||
public final Button btn_gaps, btn_sku, btn_ref_img;
|
||||
public final ToggleButton toggle_btn;
|
||||
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||
tv_display = (TextView) mView.findViewById(R.id.tv_display);
|
||||
img_cam = (ImageView) mView.findViewById(R.id.img_cam);
|
||||
img_remark = (ImageView) mView.findViewById(R.id.img_remark);
|
||||
btn_gaps = (Button) mView.findViewById(R.id.btn_gaps);
|
||||
btn_sku = (Button) mView.findViewById(R.id.btn_sku);
|
||||
btn_ref_img = (Button) mView.findViewById(R.id.btn_ref_image);
|
||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
toggle_btn = (ToggleButton) mView.findViewById(R.id.toggle_btn);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void showGapsDialog(final T2PGetterSetter t2p) {
|
||||
|
||||
final ArrayList<GapsChecklistGetterSetter> gapsChecklist;
|
||||
@@ -267,7 +410,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
spinner_brand.setSelection(0);
|
||||
|
||||
SkuGetterSetter select = new SkuGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(getString(R.string.select));
|
||||
sku_list.clear();
|
||||
sku_list.add(select);
|
||||
CustomSkuAdapter skuadapter = new CustomSkuAdapter(T2PComplianceActivity.this, R.layout.custom_spinner_item, sku_list);
|
||||
@@ -299,7 +442,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
SkuGetterSetter select = new SkuGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(getString(R.string.select));
|
||||
sku_list.add(select);
|
||||
CustomSkuAdapter skuadapter = new CustomSkuAdapter(T2PComplianceActivity.this, R.layout.custom_spinner_item, sku_list);
|
||||
spinner_sku.setAdapter(skuadapter);
|
||||
@@ -324,7 +467,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
SkuGetterSetter select = new SkuGetterSetter();
|
||||
select.setSKU("Select");
|
||||
select.setSKU(getString(R.string.select));
|
||||
sku_list.add(0, select);
|
||||
// Create custom adapter object ( see below CustomSkuAdapter.java )
|
||||
CustomSkuAdapter skuadapter = new CustomSkuAdapter(T2PComplianceActivity.this, R.layout.custom_spinner_item, sku_list);
|
||||
@@ -516,140 +659,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
alert.show();
|
||||
}
|
||||
|
||||
public class T2PAdapter extends RecyclerView.Adapter<T2PAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<T2PGetterSetter> list;
|
||||
|
||||
public T2PAdapter(ArrayList<T2PGetterSetter> t2PList) {
|
||||
list = t2PList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.t2p_item_layout, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, final int position) {
|
||||
|
||||
final T2PGetterSetter mItem = list.get(position);
|
||||
holder.tv_brand.setText(mItem.getBrand());
|
||||
holder.tv_display.setText(mItem.getDisplay().trim());
|
||||
|
||||
//holder.tv_display.setTypeface(FontManager.getTypeface(getApplicationContext(),FontManager.FONTAWESOME));
|
||||
|
||||
/* Typeface iconFont = FontManager.getTypeface(getApplicationContext(), FontManager.FONTAWESOME);
|
||||
FontManager.markAsIconContainer(findViewById(R.id.icons_container), iconFont);
|
||||
*/
|
||||
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
showGapsDialog(mItem);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
holder.toggle_btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
mItem.setPresent(((ToggleButton) v).getText().toString().equalsIgnoreCase("Yes"));
|
||||
|
||||
t2PAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
holder.btn_sku.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showSkuDialog(mItem.getSkulist());
|
||||
}
|
||||
});
|
||||
|
||||
if (!img.equalsIgnoreCase("")) {
|
||||
if (position == child_position) {
|
||||
mItem.setImage(img);
|
||||
img = "";
|
||||
}
|
||||
}
|
||||
|
||||
if(camera_allow.equals("1")){
|
||||
|
||||
holder.img_cam.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
_pathforcheck = "T2P_Image_" + store_id + "_" + mItem.getBrand_id() + mItem.getDisplay_id() + visit_date.replace("/", "") + "_" + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = position;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity();
|
||||
}
|
||||
});
|
||||
|
||||
if (mItem.getImage().equals("")) {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_green);
|
||||
}
|
||||
}
|
||||
else {
|
||||
holder.img_cam.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
|
||||
holder.toggle_btn.setChecked(mItem.isPresent());
|
||||
|
||||
if (mItem.getGapsChecklist().size() > 0) {
|
||||
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.green));
|
||||
} else {
|
||||
holder.btn_gaps.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
|
||||
if (mItem.getSkulist().size() > 0) {
|
||||
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.green));
|
||||
} else {
|
||||
holder.btn_sku.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
public final LinearLayout parentLayout;
|
||||
public final TextView tv_brand, tv_display;
|
||||
public final ImageView img_cam, img_remark;
|
||||
public final Button btn_gaps, btn_sku, btn_ref_img;
|
||||
public final ToggleButton toggle_btn;
|
||||
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_brand = (TextView) mView.findViewById(R.id.tv_brand);
|
||||
tv_display = (TextView) mView.findViewById(R.id.tv_display);
|
||||
img_cam = (ImageView) mView.findViewById(R.id.img_cam);
|
||||
img_remark = (ImageView) mView.findViewById(R.id.img_remark);
|
||||
btn_gaps = (Button) mView.findViewById(R.id.btn_gaps);
|
||||
btn_sku = (Button) mView.findViewById(R.id.btn_sku);
|
||||
btn_ref_img = (Button) mView.findViewById(R.id.btn_ref_image);
|
||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
toggle_btn = (ToggleButton) mView.findViewById(R.id.toggle_btn);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GapsAdapter extends RecyclerView.Adapter<GapsAdapter.ViewHolder> {
|
||||
|
||||
@@ -762,7 +771,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText("Select");
|
||||
label.setText(getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
@@ -824,7 +833,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText("Select");
|
||||
label.setText(getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
@@ -884,4 +893,31 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
@@ -20,6 +22,7 @@ import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
import org.ksoap2.transport.HttpTransportSE;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
|
||||
import java.io.File;
|
||||
@@ -31,7 +34,7 @@ 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;
|
||||
@@ -87,28 +90,15 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db = new GSKOrangeDB(this);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, "");
|
||||
new UploadTask(DownloadActivity.this).execute();
|
||||
}
|
||||
|
||||
public void showAlert(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(DownloadActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(str).setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
/* Intent i = new Intent(activity, StorelistActivity.class);
|
||||
activity.startActivity(i);
|
||||
activity.finish();*/
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
class Data {
|
||||
int value;
|
||||
@@ -144,7 +134,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
data = new Data();
|
||||
|
||||
data.value = 10;
|
||||
data.name = "JCP Data Downloading";
|
||||
data.name = "JCP "+getResources().getString(R.string.download_data);
|
||||
publishProgress(data);
|
||||
|
||||
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
|
||||
@@ -185,7 +175,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
data.value = 10;
|
||||
data.name = "JCP Data Downloading";
|
||||
data.name = "JCP "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -221,7 +211,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "SKU_MASTER Data Download";
|
||||
data.name = "SKU_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -257,7 +247,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
data.value = 30;
|
||||
data.name = "BRAND_MASTER Data Download";
|
||||
data.name = "BRAND_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -292,7 +282,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "SUB_CATEGORY_MASTER";
|
||||
}
|
||||
data.value = 40;
|
||||
data.name = "SUB_CATEGORY_MASTER Data Download";
|
||||
data.name = "SUB_CATEGORY_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -327,7 +317,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "CATEGORY_MASTER";
|
||||
}
|
||||
data.value = 50;
|
||||
data.name = "CATEGORY_MASTER Data Download";
|
||||
data.name = "CATEGORY_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -362,7 +352,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "DISPLAY_MASTER";
|
||||
}
|
||||
data.value = 60;
|
||||
data.name = "DISPLAY_MASTER Data Download";
|
||||
data.name = "DISPLAY_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -397,7 +387,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "MAPPING_STOCK";
|
||||
}
|
||||
data.value = 80;
|
||||
data.name = "MAPPING_STOCK Data Download";
|
||||
data.name = "MAPPING_STOCK "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -432,7 +422,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
//return "MAPPING_T2P";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_T2P Data Download";
|
||||
data.name = "MAPPING_T2P "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -466,7 +456,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "DISPLAY_CHECKLIST_MASTER";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "DISPLAY_CHECKLIST_MASTER Data Download";
|
||||
data.name = "DISPLAY_CHECKLIST_MASTER "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -500,7 +490,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
//return "MAPPING_DISPLAY_CHECKLIST";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_DISPLAY_CHECKLIST Data Download";
|
||||
data.name = "MAPPING_DISPLAY_CHECKLIST "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -535,7 +525,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
return "NON_WORKING_REASON";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "NON_WORKING_REASON Data Download";
|
||||
data.name = "NON_WORKING_REASON "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -570,7 +560,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
//return "MAPPING_PROMOTION";
|
||||
}*/
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_PROMOTION Data Download";
|
||||
data.name = "MAPPING_PROMOTION "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -608,7 +598,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
//return "MAPPING_ADDITIONAL_PROMOTION";
|
||||
}*/
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_ADDITIONAL_PROMOTION Data Download";
|
||||
data.name = "MAPPING_ADDITIONAL_PROMOTION "+getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
@@ -787,20 +777,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
showAlert(CommonString.MESSAGE_SOCKETEXCEPTION);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
/* final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_EXCEPTION, "download", e);*/
|
||||
|
||||
/* e.getMessage();
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
e.getCause();*/
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showAlert(CommonString.MESSAGE_EXCEPTION);
|
||||
}
|
||||
});
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -823,4 +801,57 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void showAlert(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(DownloadActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(str).setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
/* Intent i = new Intent(activity, StorelistActivity.class);
|
||||
activity.startActivity(i);
|
||||
activity.finish();*/
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ 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;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
@@ -23,6 +25,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;
|
||||
@@ -51,6 +54,9 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
db.open();
|
||||
|
||||
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);
|
||||
@@ -82,14 +88,56 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
categoryList = db.getCategoryListData(keyAccount_id, storeType_id, class_id);
|
||||
|
||||
adapter = new CategoryListAdapter(CategoryListActivity.this, categoryList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
||||
if(categoryList.size()>0){
|
||||
|
||||
for(int i=0;i<categoryList.size();i++){
|
||||
|
||||
boolean flag_filled = false;
|
||||
String category_id = categoryList.get(i).getCategory_id();
|
||||
if (db.checkMsl_AvailabilityData(store_id, category_id)
|
||||
&& db.checkStockAndFacingData(store_id, category_id)
|
||||
&& db.checkPromoComplianceData(store_id, category_id)
|
||||
&& db.isFilledT2P(store_id, category_id)
|
||||
&& db.additionalVisibilitydata(store_id, category_id)) {
|
||||
|
||||
flag_filled =true;
|
||||
|
||||
}
|
||||
|
||||
if(flag_filled){
|
||||
if (category_id.equals("1")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.nutritionals_tick);
|
||||
}
|
||||
else if (category_id.equals("2")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.oralcare_tick);
|
||||
}else if (category_id.equals("3")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.wellness_tick);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (category_id.equals("1")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.nutritionals);
|
||||
}
|
||||
else if (category_id.equals("2")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.oral_care);
|
||||
}else if (category_id.equals("3")){
|
||||
categoryList.get(i).setCategory_img(R.mipmap.wellness);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
adapter = new CategoryListAdapter(CategoryListActivity.this, categoryList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,39 +189,8 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
final CategoryGetterSetter categoryData = list.get(position);
|
||||
|
||||
holder.categoryName.setText(categoryData.getCategory());
|
||||
//holder.categoryIcon.setImageResource(R.drawable.category);
|
||||
|
||||
if (categoryData.getCategory().equalsIgnoreCase("Oral Health")) {
|
||||
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||
|
||||
holder.categoryIcon.setImageResource(R.mipmap.oralcare_tick);
|
||||
} else {
|
||||
holder.categoryIcon.setImageResource(R.mipmap.oral_care);
|
||||
}
|
||||
} else if (categoryData.getCategory().equalsIgnoreCase("Wellness")) {
|
||||
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||
|
||||
holder.categoryIcon.setImageResource(R.mipmap.wellness_tick);
|
||||
} else {
|
||||
|
||||
holder.categoryIcon.setImageResource(R.mipmap.wellness);
|
||||
}
|
||||
} else if (categoryData.getCategory().equalsIgnoreCase("Nutritionals")) {
|
||||
|
||||
if (db.checkMsl_AvailabilityData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkStockAndFacingData(store_id, categoryData.getCategory_id())
|
||||
&& db.checkPromoComplianceData(store_id, categoryData.getCategory_id())) {
|
||||
|
||||
holder.categoryIcon.setImageResource(R.mipmap.nutritionals_tick);
|
||||
} else {
|
||||
holder.categoryIcon.setImageResource(R.mipmap.nutritionals);
|
||||
}
|
||||
}
|
||||
|
||||
holder.categoryIcon.setImageResource(categoryData.getCategory_img());
|
||||
|
||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -204,4 +221,33 @@ public class CategoryListActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -35,16 +37,46 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
||||
CategoryWisePerformaceAdapter adapter;
|
||||
|
||||
GSKOrangeDB db;
|
||||
private SharedPreferences preferences;
|
||||
GSKOrangeDB db;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||
|
||||
@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);
|
||||
@@ -52,9 +84,7 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
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);
|
||||
@@ -73,24 +103,88 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@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 {
|
||||
categoryWisePerformanceList = db.getCategoryWisePerformance(store_id, categoryId);
|
||||
|
||||
@@ -100,6 +194,7 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class CategoryWisePerformaceAdapter extends RecyclerView.Adapter<CategoryWisePerformaceAdapter.MyViewHolder> {
|
||||
@@ -179,4 +274,31 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -22,10 +23,12 @@ 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;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DailyDataMenuGetterSetter;
|
||||
|
||||
@@ -56,6 +59,9 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
|
||||
//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);
|
||||
@@ -92,6 +98,8 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
try {
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
@@ -124,7 +132,12 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
//data.setCategory_name("Additional Visibility");
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_additional_visibility));
|
||||
data.setCategory_img(R.mipmap.additional_visibility);
|
||||
if (db.additionalVisibilitydata(store_id, categoryId)) {
|
||||
data.setCategory_img(R.mipmap.additional_visibility_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.additional_visibility);
|
||||
}
|
||||
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
@@ -235,6 +248,17 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
}
|
||||
|
||||
else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.title_activity_Additional_visibility)))) {
|
||||
Intent intent = new Intent(DailyDataMenuActivity.this, AdditionalVisibility.class);
|
||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -257,5 +281,33 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
@@ -34,6 +35,7 @@ import android.widget.ToggleButton;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -73,6 +75,9 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
|
||||
//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);
|
||||
@@ -476,4 +481,39 @@ public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
ToggleButton toggle_available;
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
@@ -22,6 +25,7 @@ import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -72,6 +76,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
//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);
|
||||
@@ -469,5 +476,37 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
@@ -56,6 +57,7 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -101,6 +103,9 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
||||
|
||||
//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);
|
||||
@@ -1101,4 +1106,39 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package cpm.com.gskmtorange.upload;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.AsyncTask;
|
||||
@@ -26,6 +28,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
@@ -79,6 +82,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
app_version = preferences.getString(CommonString.KEY_VERSION, null);
|
||||
@@ -528,7 +534,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
String additional_visibility_dialog_xml = "";
|
||||
onXML = "";
|
||||
String onXMLdIALOG = "";
|
||||
additionalVisibilityList = db.getAdditionalStock(coverageList.get(i).getStoreId());
|
||||
additionalVisibilityList = db.getAdditionalStockUpload(coverageList.get(i).getStoreId());
|
||||
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
||||
@@ -537,8 +543,10 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
additionalVisibilitySkuList = db.getDialogStock(KeyID);
|
||||
|
||||
for (int k = 0; k < additionalVisibilitySkuList.size(); k++) {
|
||||
if(additionalVisibilitySkuList.size()>0)
|
||||
{
|
||||
|
||||
for (int k = 0; k < additionalVisibilitySkuList.size(); k++) {
|
||||
|
||||
onXMLdIALOG = "[VISIBILITY_DAILOG]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
@@ -546,7 +554,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ userId
|
||||
+ "[/USER_ID]"
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getKEY_ID()
|
||||
+ additionalVisibilitySkuList.get(k).getCOMMON_ID()
|
||||
+ "[/KEY_ID]"
|
||||
/* + "[DIALOG_BRAND_ID]"
|
||||
+ additionalVisibilitySkuList.get(k).getBrand_id()
|
||||
@@ -561,7 +569,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
additional_visibility_dialog_xml = additional_visibility_dialog_xml + onXMLdIALOG;
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
onXML = "[ADDITIONAL_VISIBILITY_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
@@ -571,6 +579,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[KEY_ID]"
|
||||
+ additionalVisibilityList.get(J).getKey_id()
|
||||
+ "[/KEY_ID]"
|
||||
+ "[CATEGORY_ID]"
|
||||
+ additionalVisibilityList.get(J).getCategoryId()
|
||||
+ "[/CATEGORY_ID]"
|
||||
+ "[ADDITIONAL_DISPLAY]"
|
||||
+ additionalVisibilityList.get(J).getBtn_toogle()
|
||||
+ "[/ADDITIONAL_DISPLAY]"
|
||||
@@ -654,6 +665,8 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
gaps_child = "[GAPS]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[CHECK_LIST_ID]"
|
||||
+ gapsList.get(l).getChecklist_id()
|
||||
+ "[/CHECK_LIST_ID]"
|
||||
@@ -663,6 +676,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[PRESENT]"
|
||||
+ present
|
||||
+ "[/PRESENT]"
|
||||
+ "[COMMON_ID]"
|
||||
+ Integer.parseInt(t2PGetterSetters.get(i1).getKey_id())
|
||||
+ "[/COMMON_ID]"
|
||||
+ "[/GAPS]";
|
||||
gaps_xml = gaps_xml + gaps_child;
|
||||
}
|
||||
@@ -673,6 +689,8 @@ public class UploadActivity extends AppCompatActivity {
|
||||
for (int k = 0; k < skuList.size(); k++) {
|
||||
|
||||
sku_child = "[SKU]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[SKU_ID]"
|
||||
+ skuList.get(k).getSKU_ID()
|
||||
+ "[/SKU_ID]"
|
||||
@@ -682,6 +700,9 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[STOCK]"
|
||||
+ skuList.get(k).getSTOCK()
|
||||
+ "[/STOCK]"
|
||||
+ "[COMMON_ID]"
|
||||
+ Integer.parseInt(t2PGetterSetters.get(i1).getKey_id())
|
||||
+ "[/COMMON_ID]"
|
||||
+ "[/SKU]";
|
||||
sku_xml = sku_xml + sku_child;
|
||||
}
|
||||
@@ -808,6 +829,61 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
//// ashish visibility image start
|
||||
|
||||
if (additionalVisibilityList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage() != null && !additionalVisibilityList.get(i1).getImage().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalVisibilityList.get(i1).getImage()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage(), "AdditionalVisibilityImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalVisibilityImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// ashish close image
|
||||
|
||||
|
||||
|
||||
for(int m=0;m<t2PGetterSetters.size();m++){
|
||||
|
||||
if (t2PGetterSetters.get(m).getImage() != null && !t2PGetterSetters.get(m).getImage().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + t2PGetterSetters.get(m).getImage()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(t2PGetterSetters.get(m).getImage(), "T2PImages");
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "T2PImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("T2P Images Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// SET COVERAGE STATUS
|
||||
@@ -877,4 +953,40 @@ public class UploadActivity 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 ;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="false" android:drawable="@color/grey_background" />
|
||||
<item android:state_checked="true" android:drawable="@color/green" />
|
||||
<item android:state_checked="false" android:drawable="@drawable/toggle_grey" />
|
||||
<item android:state_checked="true" android:drawable="@drawable/toggle_green" />
|
||||
</selector>
|
||||
@@ -1,80 +1,3 @@
|
||||
<!--<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="cpm.com.gskmtorange.LoginActivity">
|
||||
|
||||
<!– Login progress –>
|
||||
<ProgressBar
|
||||
android:id="@+id/login_progress"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/login_form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/email_login_form"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/userid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_userid"
|
||||
android:inputType="textEmailAddress"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/prompt_password"
|
||||
android:imeActionId="@+id/login"
|
||||
android:imeActionLabel="@string/action_sign_in_short"
|
||||
android:imeOptions="actionUnspecified"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/user_login_button"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/action_sign_in"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>-->
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
@@ -119,7 +42,7 @@
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="45dp"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
@@ -207,11 +130,11 @@
|
||||
<ImageView
|
||||
|
||||
android:id="@+id/gsklogo"
|
||||
android:layout_width="167dp"
|
||||
android:layout_height="113dp"
|
||||
android:layout_width="115dp"
|
||||
android:layout_height="100dp"
|
||||
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/gsk_logo"></ImageView>
|
||||
android:background="@drawable/gsklogo"></ImageView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -226,7 +149,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="Version"
|
||||
android:text="Version/Versiyon"
|
||||
android:textSize="@dimen/text_size_normal" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="204dp"
|
||||
android:layout_width="153dp"
|
||||
android:layout_height="133dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/gsk_logo" />
|
||||
android:background="@drawable/gsklogo" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -24,5 +24,4 @@
|
||||
<include layout="@layout/contentstoreimage" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Daily Data Menu"
|
||||
android:text="@string/daily_activity_menu"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black"
|
||||
android:visibility="gone"/>
|
||||
|
||||
@@ -49,11 +49,12 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_width="153dp"
|
||||
android:layout_height="133dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@drawable/gsk_logo"
|
||||
android:src="@drawable/gsklogo"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<WebView
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_promoComplianceName"
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
android:id="@+id/btntoggle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:textOn="Yes"
|
||||
android:textOff="No"
|
||||
android:layout_weight=".5" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -219,7 +220,7 @@
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
|
||||
android:id="@+id/cardviewid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Click Store Front Image"
|
||||
android:text="@string/store_image"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/white"
|
||||
@@ -79,7 +79,7 @@
|
||||
android:id="@+id/img_cam_selfie"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/camera_icon_done"
|
||||
android:background="@mipmap/camera_orange"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="Downloading Data"
|
||||
android:text="@string/download_data"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:paddingBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Store Visited"
|
||||
android:text="@string/store_visited"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp" />
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
android:id="@+id/yes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Yes"
|
||||
android:text="@string/yes"
|
||||
android:textColor="#000000"
|
||||
android:background="@color/colorPrimary"/>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
android:id="@+id/no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No"
|
||||
android:text="@string/no"
|
||||
android:textColor="#000000"
|
||||
android:background="@color/colorPrimary"/>
|
||||
</RadioGroup>
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
android:id="@+id/btn_is_present"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textOn="Yes"
|
||||
android:textOff="No"
|
||||
android:textOn="@string/yes"
|
||||
android:textOff="@string/no"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<ToggleButton
|
||||
android:id="@+id/toggle_available"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:textOff="@string/no"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@drawable/gsk_logo" />
|
||||
android:src="@drawable/gsklogo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nav_user_name"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="3sp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="Reason"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
android:id="@+id/toggle_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textOn="Yes"
|
||||
android:textOff="No"
|
||||
android:textOn="@string/yes"
|
||||
android:textOff="@string/no"
|
||||
android:background="@drawable/toggle_selector_background"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
@@ -127,9 +127,10 @@
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/image"
|
||||
android:layout_weight="1"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/cam_active"
|
||||
android:padding="@dimen/custom_margin"/>
|
||||
android:background="@mipmap/camera_orange"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -137,7 +138,8 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_remark"
|
||||
|
||||
@@ -147,34 +147,34 @@
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- <android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
<!-- <android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="95"
|
||||
android:visibility="gone"
|
||||
>
|
||||
>
|
||||
<LinearLayout
|
||||
android:id="@+id/list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="95"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>-->
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>-->
|
||||
</LinearLayout>
|
||||
|
||||
@@ -4,28 +4,24 @@
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/nav_route_plan"
|
||||
android:icon="@drawable/ic_menu_gallery"
|
||||
android:icon="@mipmap/entry_grey"
|
||||
android:title="@string/menu_daily_route_plan" />
|
||||
<item
|
||||
android:id="@+id/nav_download"
|
||||
android:icon="@drawable/ic_menu_slideshow"
|
||||
android:icon="@mipmap/download_grey"
|
||||
android:title="@string/menu_daily_download" />
|
||||
<item
|
||||
android:id="@+id/nav_upload"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
android:icon="@mipmap/upload_grey"
|
||||
android:title="@string/menu_upload_data" />
|
||||
<item
|
||||
android:id="@+id/nav_geotag"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
android:icon="@mipmap/geotag_grey"
|
||||
android:title="@string/menu_geotag" />
|
||||
<item
|
||||
android:id="@+id/nav_export"
|
||||
android:icon="@drawable/ic_menu_share"
|
||||
android:title="@string/menu_export" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_exit"
|
||||
android:icon="@drawable/ic_menu_send"
|
||||
android:icon="@mipmap/exit_grey"
|
||||
android:title="@string/menu_exit" />
|
||||
</group>
|
||||
|
||||
@@ -33,11 +29,11 @@
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/nav_setting"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
android:icon="@mipmap/settings_grey"
|
||||
android:title="@string/menu_setting" />
|
||||
<item
|
||||
android:id="@+id/nav_services"
|
||||
android:icon="@drawable/ic_menu_send"
|
||||
android:icon="@mipmap/services_grey"
|
||||
android:title="@string/menu_services" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="prompt_email">E-posta</string>
|
||||
<string name="prompt_password">Şifre (isteğe bağlı)</string>
|
||||
<string name="action_sign_in">Giriş yapın veya kayıt olun</string>
|
||||
<string name="action_sign_in_short">oturum aç</string>
|
||||
<string name="error_invalid_email">Bu e-posta adresi geçersiz</string>
|
||||
<string name="error_invalid_password">Bu şifre çok kısa</string>
|
||||
@@ -26,6 +24,7 @@
|
||||
<string name="title_geo_tag_activity_upload_data">Store Uploaded</string>
|
||||
<string name="title_geo_tag_activity_geo_data">Store Geo Data Uploaded</string>
|
||||
<string name="title_geo_tag_activity_geo_already_done">Store Already Geotagged</string>
|
||||
<string name="main_menu_activity_name">GSK Turuncu Mağaza</string>
|
||||
|
||||
<string name="save">Sakla</string>
|
||||
|
||||
@@ -38,7 +37,7 @@
|
||||
<string name="present">Teşhir var mı?</string>
|
||||
<string name="add">Ekle</string>
|
||||
|
||||
<string name="select">Seç</string>
|
||||
<string name="select">Seçiniz</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">Kalıcı Teşhir</string>
|
||||
|
||||
@@ -46,6 +45,17 @@
|
||||
<string name="no">Hayır</string>
|
||||
|
||||
<string name="title_activity_upload">Veri Paylaş</string>
|
||||
<string name="download_data">Veri Indir</string>
|
||||
<string name="store_visited">Mağaza ziyaret edildi mi?</string>
|
||||
<string name="store_image">Mağaza girişinin fotoğrafını çekiniz</string>
|
||||
|
||||
<string name="title_activity_store_image">Mağaza Girişi Fotoğrafı</string>
|
||||
<string name="title_activity_Non_Work">Çalışmama Sebebi</string>
|
||||
<string name="reason">Sebep</string>
|
||||
<string name="select_reason">Bir sebep seçiniz</string>
|
||||
<string name="daily_activity_menu">Günlük Veri Menüsü</string>
|
||||
|
||||
<string name="closed">kapalı</string>
|
||||
|
||||
<!--Gagan Start Code -->
|
||||
<string name="title_activity_category_list">Kategoriler</string>
|
||||
@@ -63,12 +73,12 @@
|
||||
<string name="daily_data_menu_additional_promotions">Promosyon</string>
|
||||
|
||||
<string name="msl_availability_sku">Ürün Adı</string>
|
||||
<string name="msl_availability_mbq">X</string>
|
||||
<string name="msl_availability_mbq">MBQ</string>
|
||||
<string name="msl_availability_availability">Bulunurluk</string>
|
||||
|
||||
<string name="stock_facing_reference_image">Örnek Fotoğraf</string>
|
||||
<string name="stock_facing_sku_name">Ürün Adı</string>
|
||||
<string name="stock_facing_stock">X</string>
|
||||
<string name="stock_facing_stock">Stock</string>
|
||||
<string name="stock_facing_faceup">Önyüz</string>
|
||||
<string name="stock_facing_sos_target">Raf Payı Hedefi</string>
|
||||
<string name="stock_facing_sos">Raf Payi</string>
|
||||
@@ -101,4 +111,12 @@
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||
<!--Gagan end new code 2-->
|
||||
</resources>
|
||||
|
||||
<string name="stock">Stock</string>
|
||||
<string name="AdditionalDisplay">Ek Teşhir</string>
|
||||
<string name="Display">Teşhir Türü</string>
|
||||
<string name="Photo">Fotoğraf</string>
|
||||
<string name="title_activity_Additional_visibility">Ek Teşhir</string>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<resources>
|
||||
<string name="app_name">GSKMTOrange</string>
|
||||
<string name="app_name">GSK MT Orange</string>
|
||||
<string name="main_menu_activity_name">GSK Orange Stores</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
@@ -9,9 +10,9 @@
|
||||
|
||||
<!-- Strings related to login -->
|
||||
<string name="prompt_email">E Mail</string>
|
||||
<string name="prompt_userid">User Id</string>
|
||||
<string name="prompt_password">Password</string>
|
||||
<string name="action_sign_in">Login</string>
|
||||
<string name="prompt_userid">Username/Kullanıcı Adı</string>
|
||||
<string name="prompt_password">Password/Şifre</string>
|
||||
<string name="action_sign_in">Login/Giriş Yap</string>
|
||||
<string name="action_sign_in_short">Sign in</string>
|
||||
<string name="error_invalid_email">This email address is invalid</string>
|
||||
<string name="error_invalid_password">This password is too short</string>
|
||||
@@ -140,7 +141,7 @@
|
||||
<string name="Display">Display</string>
|
||||
<string name="Photo">Photo</string>
|
||||
<string name="title_activity_Additional_visibility">Additional Visibility</string>
|
||||
<string name="title_activity_Non_Work">Non-Work Reason</string>
|
||||
<string name="title_activity_Non_Work">Non Working Reason</string>
|
||||
<string name="closed">Close</string>
|
||||
|
||||
<string name="click_image">Please click image</string>
|
||||
@@ -148,6 +149,15 @@
|
||||
<string name="fill_gaps_data">Please fill GAP data</string>
|
||||
<string name="data_will_be_lost">Want to proceed usaved data will be deleted</string>
|
||||
|
||||
<string name="download_data">Downloading Data</string>
|
||||
<string name="store_visited">Store Visited</string>
|
||||
<string name="store_image">Click Store Front Image</string>
|
||||
|
||||
<string name="title_activity_store_image">Store Front Image</string>
|
||||
<string name="reason">Reason</string>
|
||||
<string name="select_reason">Select Reason</string>
|
||||
<string name="daily_activity_menu">Daily Data Menu</string>
|
||||
|
||||
<!--Gagan start new code 2-->
|
||||
<string name="stock_facing_planogram_dialog_title">Planogram</string>
|
||||
|
||||
|
||||