Merge branch 'master' of https://github.com/CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GSKORANGEV1 into Category_G
@@ -39,4 +39,5 @@ dependencies {
|
||||
compile 'com.google.android.gms:play-services-location:9.0.2'
|
||||
compile 'com.google.android.gms:play-services-maps:9.0.2'
|
||||
compile 'com.android.support:cardview-v7:24.2.1'
|
||||
compile 'com.google.android.gms:play-services-appindexing:9.0.2'
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:name=".SplashScreenActivity"
|
||||
android:label="@string/app_name"
|
||||
@@ -29,61 +28,87 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".LoginActivity"
|
||||
android:label="@string/title_activity_login"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity android:name=".autoupdate.AutoUpdateActivity" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".autoupdate.AutoUpdateActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".SelectLanguageActivity"
|
||||
android:label="@string/title_activity_select_language"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity android:name=".download.DownloadActivity" />
|
||||
|
||||
<activity android:name=".download.DownloadActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.CategoryListActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
|
||||
android:name=".GeoTag.GeoTagStoreList"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_category_list"-->
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.CategoryWisePerformanceActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_category_wise_performance" -->
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.DailyDataMenuActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_daily_main_menu"-->
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_daily_main_menu" -->
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.MSL_AvailabilityActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!--android:label="@string/title_activity_msl__availability"-->
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<!-- android:label="@string/title_activity_msl__availability" -->
|
||||
<activity
|
||||
android:name=".dailyentry.StoreListActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.StoreimageActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name=".GeoTag.GeoTagActivity"
|
||||
android:label="@string/title_activity_store_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.android.maps.v2.API_KEY"
|
||||
android:value="AIzaSyD02po19go2JMhXJeAnKDiZSiNloPsWqzI" />
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.Stock_FacingActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.T2PComplianceActivity"
|
||||
android:label="@string/title_activity_t2_pcompliance"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -11,20 +11,32 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
@@ -62,10 +74,20 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(TableBean.getMappingStock());
|
||||
db.execSQL(TableBean.getMappingT2p());
|
||||
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_STORE_GEOTAGGING);
|
||||
db.execSQL(CommonString.CREATE_TABLE_COVERAGE_DATA);
|
||||
|
||||
|
||||
db.execSQL(TableBean.getDisplayChecklistMaster());
|
||||
db.execSQL(TableBean.getMappingDisplayChecklist());
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY);
|
||||
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_HEADER);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_CHILD);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,6 +150,182 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<T2PGetterSetter> getT2PDefaultData(String store_id){
|
||||
|
||||
ArrayList<T2PGetterSetter> t2PList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("Select BM.BRAND As BRAND, BM.BRAND_ID As BRAND_ID, DM.DISPLAY As DISPLAY, DM.DISPLAY_ID As DISPLAY_ID from BRAND_MASTER BM INNER JOIN MAPPING_T2P T ON BM.BRAND_ID = T.BRAND_ID INNER JOIN DISPLAY_MASTER DM ON T.DISPLAY_ID= DM.DISPLAY_ID WHERE T.STORE_ID = '"+ store_id +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
T2PGetterSetter t2p = new T2PGetterSetter();
|
||||
|
||||
t2p.setBrand_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
t2p.setBrand(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
t2p.setDisplay_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY_ID")));
|
||||
|
||||
t2p.setDisplay(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY")));
|
||||
|
||||
t2p.setImage("");
|
||||
|
||||
t2p.setRemark("");
|
||||
|
||||
t2p.isPresent();
|
||||
|
||||
t2PList.add(t2p);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return t2PList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return t2PList;
|
||||
}
|
||||
|
||||
return t2PList;
|
||||
}
|
||||
|
||||
//get Gaps data
|
||||
public ArrayList<GapsChecklistGetterSetter> getGapsDefaultData(String display_id){
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> checkList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("Select DC.CHECKLIST_ID As CHECKLIST_ID, DC.CHECKLIST As CHECKLIST, C.DISPLAY_ID As DISPLAY_ID from MAPPING_DISPLAY_CHECKLIST C INNER JOIN DISPLAY_CHECKLIST_MASTER DC ON C.CHECKLIST_ID= DC.CHECKLIST_ID WHERE C.DISPLAY_ID = '"+ display_id +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
GapsChecklistGetterSetter check = new GapsChecklistGetterSetter();
|
||||
|
||||
check.setChecklist_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKLIST_ID")));
|
||||
|
||||
check.setChecklist(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKLIST")));
|
||||
|
||||
check.setDisplay_id(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("DISPLAY_ID")));
|
||||
|
||||
check.isPresent();
|
||||
|
||||
checkList.add(check);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return checkList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return checkList;
|
||||
}
|
||||
|
||||
return checkList;
|
||||
}
|
||||
|
||||
//get Brand data for T2P
|
||||
public ArrayList<BrandMasterGetterSetter> getBrandT2PData(String store_type_id, String class_id, String key_account_id ){
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brandList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("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 +"'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
BrandMasterGetterSetter brand = new BrandMasterGetterSetter();
|
||||
|
||||
brand.setBRAND(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND")));
|
||||
|
||||
brand.setBRAND_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
|
||||
brandList.add(brand);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return brandList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return brandList;
|
||||
}
|
||||
|
||||
return brandList;
|
||||
}
|
||||
|
||||
//get Sku data for T2P
|
||||
public ArrayList<SkuGetterSetter> getSkuT2PData(String store_type_id, String class_id, String key_account_id , String brand_id){
|
||||
|
||||
ArrayList<SkuGetterSetter> skuList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT DISTINCT SM.SKU, SM.SKU_ID, BR.BRAND_ID 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 SM.BRAND_ID='"+ brand_id + "'",null);
|
||||
if(dbcursor != null){
|
||||
dbcursor.moveToFirst();
|
||||
while(!dbcursor.isAfterLast()){
|
||||
|
||||
SkuGetterSetter sku = new SkuGetterSetter();
|
||||
|
||||
sku.setSKU(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("SKU")));
|
||||
|
||||
sku.setBRAND_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("BRAND_ID")));
|
||||
|
||||
sku.setSKU_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("SKU_ID")));
|
||||
|
||||
skuList.add(sku);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
return skuList;
|
||||
}
|
||||
}
|
||||
catch (Exception e){
|
||||
|
||||
Log.d("Exception get T2P", e.toString());
|
||||
return skuList;
|
||||
}
|
||||
|
||||
return skuList;
|
||||
}
|
||||
|
||||
public ArrayList<StoreBean> getStoreData(String date) {
|
||||
ArrayList<StoreBean> list = new ArrayList<StoreBean>();
|
||||
Cursor dbcursor = null;
|
||||
@@ -244,6 +442,24 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
//insert MAPPING_DISPLAY_CHECKLIST
|
||||
public void InsertMappingDisplayChecklist(MappingDisplayChecklistGetterSetter data) {
|
||||
db.delete("MAPPING_DISPLAY_CHECKLIST", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getCHECKLIST_ID().size(); i++) {
|
||||
|
||||
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
|
||||
values.put("CHECKLIST_ID", data.getCHECKLIST_ID().get(i));
|
||||
|
||||
db.insert("MAPPING_DISPLAY_CHECKLIST", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in MAPPING_STOCK " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertSubCategoryMaster(SubCategoryMasterGetterSetter data) {
|
||||
db.delete("SUB_CATEGORY_MASTER", null, null);
|
||||
|
||||
@@ -303,6 +519,24 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
//insert DISPLAY_CHECKLIST_MASTER
|
||||
public void InsertDisplayChecklistMaster(DisplayChecklistMasterGetterSetter data) {
|
||||
db.delete("DISPLAY_CHECKLIST_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getCHECKLIST_ID().size(); i++) {
|
||||
|
||||
values.put("CHECKLIST_ID", data.getCHECKLIST_ID().get(i));
|
||||
values.put("CHECKLIST", data.getCHECKLIST().get(i));
|
||||
|
||||
db.insert("DISPLAY_CHECKLIST_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in DISPLAY_CHECKLIST_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertDisplayMaster(DisplayMasterGetterSetter data) {
|
||||
db.delete("DISPLAY_MASTER", null, null);
|
||||
|
||||
@@ -340,6 +574,206 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
|
||||
|
||||
public void InsertSTOREgeotag(String storeid, double lat, double longitude, String path,String status) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put("STORE_ID", storeid);
|
||||
values.put("LATITUDE", Double.toString(lat));
|
||||
values.put("LONGITUDE", Double.toString(longitude));
|
||||
values.put("FRONT_IMAGE", path);
|
||||
values.put("GEO_TAG", status);
|
||||
values.put("STATUS", status);
|
||||
|
||||
db.insert(CommonString.TABLE_STORE_GEOTAGGING, null, values);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void updateStatus(String id, String status, double lat, double longtitude) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put("GEO_TAG", status);
|
||||
|
||||
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void updateCheckoutStatus(String id, String status) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put("CHECKOUT_STATUS", status);
|
||||
|
||||
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ArrayList<GeotaggingBeans> getinsertGeotaggingData(String status) {
|
||||
|
||||
|
||||
ArrayList<GeotaggingBeans> geodata = new ArrayList<GeotaggingBeans>();
|
||||
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_STORE_GEOTAGGING + " WHERE GEO_TAG = '" + status + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
int numrows = dbcursor.getCount();
|
||||
|
||||
dbcursor.moveToFirst();
|
||||
for (int i = 1; i <= numrows; ++i) {
|
||||
|
||||
GeotaggingBeans data = new GeotaggingBeans();
|
||||
|
||||
data.setStoreid(dbcursor.getString(dbcursor.getColumnIndexOrThrow("STORE_ID")));
|
||||
data.setLatitude(Double.parseDouble(dbcursor.getString(dbcursor.getColumnIndexOrThrow("LATITUDE"))));
|
||||
data.setLongitude(Double.parseDouble(dbcursor.getString(dbcursor.getColumnIndexOrThrow("LONGITUDE"))));
|
||||
data.setUrl1(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FRONT_IMAGE")));
|
||||
|
||||
geodata.add(data);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
|
||||
dbcursor.close();
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
finally {
|
||||
if (dbcursor != null && !dbcursor.isClosed()) {
|
||||
dbcursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return geodata;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void updateGeoTagData(String storeid,String status) {
|
||||
|
||||
try {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
values.put("GEO_TAG", status);
|
||||
|
||||
int l = db.update(CommonString.TABLE_STORE_GEOTAGGING, values,
|
||||
CommonString.KEY_STORE_ID + "=?", new String[] { storeid });
|
||||
System.out.println("update : " + l);
|
||||
} catch (Exception e) {
|
||||
Log.d("Database Data ", e.toString());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void updateDataStatus(String id,String status) {
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put("GEO_TAG", status);
|
||||
|
||||
db.update(CommonString.KEY_JOURNEY_PLAN, values,
|
||||
CommonString.KEY_STORE_ID + "='" + id + "'", null);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void deleteGeoTagData(String storeid) {
|
||||
|
||||
try {
|
||||
db.delete(CommonString.TABLE_STORE_GEOTAGGING, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<CoverageBean> getCoverageData(String visitdate) {
|
||||
|
||||
ArrayList<CoverageBean> list = new ArrayList<CoverageBean>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * from " + CommonString.TABLE_COVERAGE_DATA + " where "
|
||||
+ CommonString.KEY_VISIT_DATE + "='" + visitdate + "'",
|
||||
null);
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
CoverageBean sb = new CoverageBean();
|
||||
|
||||
sb.setStoreId(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_STORE_ID)));
|
||||
sb.setUserId((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_USER_ID))));
|
||||
sb.setInTime(((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_IN_TIME)))));
|
||||
sb.setOutTime(((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_OUT_TIME)))));
|
||||
sb.setVisitDate((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_VISIT_DATE))))));
|
||||
sb.setLatitude(((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_LATITUDE)))));
|
||||
sb.setLongitude(((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_LONGITUDE)))));
|
||||
sb.setStatus((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_COVERAGE_STATUS))))));
|
||||
sb.setImage((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_IMAGE))))));
|
||||
sb.setReason((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_REASON))))));
|
||||
sb.setReasonid((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_REASON_ID))))));
|
||||
sb.setMID(Integer.parseInt(((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_ID))))));
|
||||
if(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_COVERAGE_REMARK))==null){
|
||||
sb.setRemark("");
|
||||
}
|
||||
else{
|
||||
sb.setRemark((((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow(CommonString.KEY_COVERAGE_REMARK))))));
|
||||
}
|
||||
|
||||
list.add(sb);
|
||||
|
||||
|
||||
//Category List
|
||||
public ArrayList<CategoryGetterSetter> getCategoryListData(String keyAccountId, String storeTypeId, String classId) {
|
||||
ArrayList<CategoryGetterSetter> list = new ArrayList<>();
|
||||
@@ -778,17 +1212,52 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setFacing(dbcursor.getString(dbcursor.getColumnIndexOrThrow("FACEUP_VALUE")));
|
||||
|
||||
list.add(cd);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get Stock_Facing Sku After Save Data!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public long InsertCoverageData(CoverageBean data) {
|
||||
|
||||
//db.delete(CommonString1.TABLE_COVERAGE_DATA, "STORE_ID" + "='" + data.getStoreId() + "'", null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
values.put(CommonString.KEY_STORE_ID, data.getStoreId());
|
||||
values.put(CommonString.KEY_USER_ID, data.getUserId());
|
||||
values.put(CommonString.KEY_IN_TIME, data.getInTime());
|
||||
values.put(CommonString.KEY_OUT_TIME, data.getOutTime());
|
||||
values.put(CommonString.KEY_VISIT_DATE, data.getVisitDate());
|
||||
values.put(CommonString.KEY_LATITUDE, data.getLatitude());
|
||||
values.put(CommonString.KEY_LONGITUDE, data.getLongitude());
|
||||
values.put(CommonString.KEY_REASON_ID, data.getReasonid());
|
||||
values.put(CommonString.KEY_REASON, data.getReason());
|
||||
values.put(CommonString.KEY_COVERAGE_STATUS, data.getStatus());
|
||||
values.put(CommonString.KEY_IMAGE, data.getImage());
|
||||
values.put(CommonString.KEY_COVERAGE_REMARK, data.getRemark());
|
||||
values.put(CommonString.KEY_REASON_ID, data.getReasonid());
|
||||
values.put(CommonString.KEY_REASON, data.getReason());
|
||||
values.put(CommonString.KEY_GEO_TAG, data.getGEO_TAG());
|
||||
|
||||
return db.insert(CommonString.TABLE_COVERAGE_DATA, null, values);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.toString());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean checkStockAndFacingData(String store_id, String category_id) {
|
||||
Log.d("Stock_Facing ", "Stock data--------------->Start<------------");
|
||||
@@ -860,4 +1329,5 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
Log.d("Exception ", " in Insert MSL_Availability " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,34 +1,387 @@
|
||||
package cpm.com.gskmtorange.GeoTag;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.MainActivity;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 27-12-2016.
|
||||
*/
|
||||
|
||||
public class GeoTagStoreList extends AppCompatActivity {
|
||||
public class GeoTagStoreList extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
|
||||
ListView lv;
|
||||
private SharedPreferences preferences;
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
String date,visit_status;
|
||||
GSKOrangeDB db;
|
||||
// ListView list;
|
||||
ValueAdapter adapter;
|
||||
RecyclerView recyclerView;
|
||||
private SharedPreferences.Editor editor = null;
|
||||
LinearLayout parent_linear,nodata_linear;
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.storelistlayout);
|
||||
lv = (ListView) findViewById(R.id.list);
|
||||
nodata_linear = (LinearLayout) findViewById(R.id.no_data_lay);
|
||||
parent_linear = (LinearLayout) findViewById(R.id.parent_linear);
|
||||
//list = (ListView) findViewById(R.id.list_id);
|
||||
|
||||
recyclerView=(RecyclerView) findViewById(R.id.drawer_layout_recycle);
|
||||
|
||||
// nodata_linear = (LinearLayout) findViewById(R.id.no_data_lay);
|
||||
//parent_linear = (LinearLayout) findViewById(R.id.parent_linear);
|
||||
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
|
||||
db = new GSKOrangeDB(GeoTagStoreList.this);
|
||||
db.open();
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
if (storelist.size()>0) {
|
||||
|
||||
adapter=new ValueAdapter(getApplicationContext(),storelist);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
private class MyAdaptor extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
|
||||
return storelist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
GeoTagStoreList.ViewHolder holder = null;
|
||||
if (convertView == null) {
|
||||
holder = new GeoTagStoreList.ViewHolder();
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.geotagstorelist, null);
|
||||
|
||||
holder.storename = (TextView) convertView.findViewById(R.id.geolistviewxml_storename);
|
||||
|
||||
holder.imgtick = (ImageView) convertView
|
||||
.findViewById(R.id.imageView1);
|
||||
|
||||
convertView.setTag(holder);
|
||||
|
||||
} else {
|
||||
holder = (GeoTagStoreList.ViewHolder) convertView.getTag();
|
||||
}
|
||||
holder.storename.setText(storelist.get(position).getSTORE_NAME());
|
||||
//holder.storeaddress.setText(storelist.get(position).getCITY());
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*private class ViewHolder {
|
||||
TextView storename, storeaddress;
|
||||
ImageView imgtick;
|
||||
Button checkout;
|
||||
|
||||
RelativeLayout l1;
|
||||
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id==android.R.id.home){
|
||||
|
||||
|
||||
finish();
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// TODO Auto-generated method stub
|
||||
Intent intent = new Intent(GeoTagStoreList.this, MainActivity.class);
|
||||
|
||||
startActivity(intent);
|
||||
GeoTagStoreList.this.finish();
|
||||
}
|
||||
|
||||
|
||||
/*protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||
// TODO Auto-generated method stub
|
||||
// super.onListItemClick(l, v, position, id);
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
StoreBean sb = storelist.get(position);
|
||||
|
||||
// When clicked, show a toast with the TextView text
|
||||
if (storelist.get(position).getGEO_TAG().equalsIgnoreCase("U")) {
|
||||
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_upload_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
} else if (storelist.get(position).getGEO_TAG().equalsIgnoreCase("D")){
|
||||
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
else if (storelist.get(position).getGEO_TAG().equalsIgnoreCase("Y")) {
|
||||
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
|
||||
} else if (storelist.get(position).getGEO_TAG().equalsIgnoreCase("P")) {
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
} else {
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, sb.getSTORE_ID());
|
||||
editor.putString(CommonString.KEY_STORE_NAME, sb.getSTORE_NAME());
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, sb.getVISIT_DATE());
|
||||
editor.commit();
|
||||
|
||||
Intent intent = new Intent(GeoTagStoreList.this, GeoTagActivity.class);
|
||||
startActivity(intent);
|
||||
GeoTagStoreList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void GeoTagStoreList() {
|
||||
|
||||
this.finish();
|
||||
|
||||
}*/
|
||||
|
||||
public class ValueAdapter extends RecyclerView.Adapter<ValueAdapter.MyViewHolder>{
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<StoreBean> data= Collections.emptyList();
|
||||
|
||||
public ValueAdapter(Context context, List<StoreBean> data){
|
||||
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.data=data;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
|
||||
View view=inflator.inflate(R.layout.geotagstorelist,parent,false);
|
||||
|
||||
MyViewHolder holder=new MyViewHolder(view);
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ValueAdapter.MyViewHolder viewHolder, final int position) {
|
||||
|
||||
final StoreBean current=data.get(position);
|
||||
|
||||
//viewHolder.txt.setText(current.txt);
|
||||
|
||||
viewHolder.txt.setText(current.getSTORE_NAME());
|
||||
|
||||
if(current.getGEO_TAG().equalsIgnoreCase("Y"))
|
||||
{
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.geopin);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("D")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_d);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("U")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_u);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("P")){
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
viewHolder.relativelayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if(current.getGEO_TAG().equalsIgnoreCase("Y"))
|
||||
{
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("D")){
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("U")){
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_upload_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("P")){
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||
editor.commit();
|
||||
|
||||
Intent in =new Intent(GeoTagStoreList.this,GeoTagActivity.class);
|
||||
startActivity(in);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
TextView txt;
|
||||
ImageView icon;
|
||||
RelativeLayout relativelayout;
|
||||
ImageView imageview;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
txt=(TextView) itemView.findViewById(R.id.geolistviewxml_storename);
|
||||
relativelayout=(RelativeLayout) itemView.findViewById(R.id.relativelayout);
|
||||
imageview=(ImageView) itemView.findViewById(R.id.imageView1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<StoreBean> getdata() {
|
||||
List<StoreBean> data = new ArrayList<>();
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
StoreBean storelistdata=new StoreBean();
|
||||
|
||||
|
||||
for(int i=0;i<storelist.size();i++)
|
||||
{
|
||||
|
||||
storelistdata.setSTORE_NAME(storelist.get(0).getSTORE_NAME());
|
||||
|
||||
data.add(storelistdata);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@@ -37,4 +390,8 @@ public class GeoTagStoreList extends AppCompatActivity {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,13 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.os.Environment;
|
||||
@@ -52,6 +55,7 @@ import java.net.MalformedURLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import cpm.com.gskmtorange.autoupdate.AutoUpdateActivity;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -154,10 +158,16 @@ public class LoginActivity extends AppCompatActivity {
|
||||
mLoginFormView = findViewById(R.id.login_form);
|
||||
mProgressView = findViewById(R.id.login_progress);
|
||||
|
||||
|
||||
|
||||
// Create a Folder for Images
|
||||
|
||||
|
||||
File file = new File(Environment.getExternalStorageDirectory(), "GSK_MT_ORANGE_IMAGES");
|
||||
if (!file.isDirectory()) {
|
||||
file.mkdir();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* private void populateAutoComplete() {
|
||||
@@ -586,6 +596,8 @@ public class LoginActivity extends AppCompatActivity {
|
||||
}
|
||||
else{
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
Intent intent = new Intent(getBaseContext(),
|
||||
MainActivity.class);
|
||||
startActivity(intent);
|
||||
@@ -641,8 +653,34 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
return intime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
String lang ;
|
||||
|
||||
if(language.equals("English")){
|
||||
lang = "EN";
|
||||
}
|
||||
else if(language.equals("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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.support.design.widget.NavigationView;
|
||||
@@ -17,7 +16,6 @@ import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
@@ -25,6 +23,7 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -32,7 +31,9 @@ import java.nio.channels.FileChannel;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
@@ -157,12 +158,25 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
} else if (id == R.id.nav_upload) {
|
||||
|
||||
} else if (id == R.id.nav_geotag) {
|
||||
}
|
||||
else if (id == R.id.nav_geotag) {
|
||||
|
||||
|
||||
|
||||
Intent startDownload = new Intent(this,GeoTagStoreList.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
} else if (id == R.id.nav_exit) {
|
||||
|
||||
} else if (id == R.id.nav_services) {
|
||||
|
||||
Intent startDownload = new Intent(this,T2PComplianceActivity.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
} else if (id == R.id.nav_setting) {
|
||||
startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
||||
} else if (id == R.id.nav_export) {
|
||||
@@ -253,6 +267,5 @@ public class MainActivity extends AppCompatActivity
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,16 +16,56 @@ public class CommonString {
|
||||
public static final String KEY_PASSWORD = "password";
|
||||
public static final String KEY_DATE = "date";
|
||||
public static final String KEY_STOREVISITED_STATUS = "STOREVISITED_STATUS";
|
||||
|
||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/GSK_MT_Images/";
|
||||
|
||||
public static final String KEY_PATH = "path";
|
||||
public static final String KEY_VERSION = "APP_VERSION";
|
||||
|
||||
|
||||
public static final String KEY_LANGUAGE = "LANGUAGE";
|
||||
public static final String KEY_NOTICE_BOARD_LINK = "NOTICE_BOARD_LINK";
|
||||
public static final String KEY_LOGIN_DATA = "LOGIN_DATA";
|
||||
public static final String KEY_CULTURE_ID = "CULTURE_ID";
|
||||
public static final String KEY_STORE_ID = "STORE_ID";
|
||||
public static final String KEY_STORE_NAME = "STORE_NAME";
|
||||
public static final String KEY_VISIT_DATE = "VISIT_DATE";
|
||||
public static final String KEY_CAMERA_ALLOW = "CAMERA_ALLOW";
|
||||
public static final String KEY_CHECKOUT_STATUS = "CHECKOUT_STATUS";
|
||||
public static final String KEY_CLASS_ID = "CLASS_ID";
|
||||
public static final String KEY_EMP_ID = "EMP_ID";
|
||||
public static final String KEY_GEO_TAG = "GEO_TAG";
|
||||
public static final String KEY_KEYACCOUNT_ID = "KEYACCOUNT_ID";
|
||||
public static final String KEY_STORETYPE_ID = "STORETYPE_ID";
|
||||
public static final String KEY_UPLOAD_STATUS = "UPLOAD_STATUS";
|
||||
public static final String KEY_STORE_IN_TIME = "STORE_IN_TIME";
|
||||
public static final String KEY_USER_ID = "USER_ID";
|
||||
public static final String KEY_IN_TIME = "IN_TIME";
|
||||
public static final String KEY_OUT_TIME = "OUT_TIME";
|
||||
public static final String KEY_LATITUDE = "LATITUDE";
|
||||
public static final String KEY_LONGITUDE = "LONGITUDE";
|
||||
public static final String KEY_COVERAGE_STATUS = "Coverage";
|
||||
public static final String KEY_REASON_ID = "REASON_ID";
|
||||
public static final String KEY_REASON = "REASON";
|
||||
public static final String KEY_COVERAGE_REMARK = "REMARK";
|
||||
public static final String KEY_IMAGE = "IMAGE";
|
||||
public static final String KEY_ID = "Id";
|
||||
public static final String KEY_MERCHANDISER_ID = "MERCHANDISER_ID";
|
||||
|
||||
|
||||
|
||||
public static final String KEY_JOURNEY_PLAN = "JOURNEY_PLAN";
|
||||
|
||||
public static final String KEY_P = "P";
|
||||
public static final String KEY_D = "D";
|
||||
public static final String KEY_U = "U";
|
||||
public static final String KEY_C = "C";
|
||||
public static final String KEY_L = "Leave";
|
||||
public static final String KEY_N = "NOT_VISITED";
|
||||
public static final String KEY_INVALID = "INVALID";
|
||||
public static final String STORE_STATUS_LEAVE = "L";
|
||||
public static final String KEY_VALID = "Valid";
|
||||
public static final String DATA_DELETE_ALERT_MESSAGE="Saved data will be lost - Do you want to continue?";
|
||||
public static final String KEY_CHECK_IN = "I";
|
||||
// webservice constants
|
||||
|
||||
public static final String KEY_SUCCESS = "Success";
|
||||
@@ -44,15 +84,77 @@ public class CommonString {
|
||||
public static final String METHOD_NAME_UNIVERSAL_DOWNLOAD = "Download_Universal";
|
||||
public static final String SOAP_ACTION_UNIVERSAL = "http://tempuri.org/"
|
||||
+ METHOD_NAME_UNIVERSAL_DOWNLOAD;
|
||||
public static final String METHOD_UPLOAD_STOCK_XML_DATA = "DrUploadXml";
|
||||
public static final String SOAP_ACTION_UPLOAD_ASSET_XMLDATA = "http://tempuri.org/"
|
||||
+ METHOD_UPLOAD_STOCK_XML_DATA;
|
||||
public static final String METHOD_UPLOAD_ASSET = "Upload_Stock_Availiablity_V1";
|
||||
public static final String METHOD_Get_DR_POSM_IMAGES = "GetImageNew";
|
||||
public static final String SOAP_ACTION_Get_DR_POSM_IMAGES = "http://tempuri.org/"
|
||||
+ METHOD_Get_DR_POSM_IMAGES;
|
||||
public static final String METHOD_Get_DR_STORE_IMAGES_GEO = "Upload_StoreGeoTag_IMAGES";
|
||||
public static final String SOAP_ACTION_DR_STORE_IMAGES_GEO = "http://tempuri.org/"
|
||||
+ METHOD_Get_DR_STORE_IMAGES_GEO;
|
||||
|
||||
//Alert Messages
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static final String MESSAGE_FAILURE = "Server Error.Please Access After Some Time";
|
||||
public static final String MESSAGE_FALSE = "Invalid User";
|
||||
public static final String MESSAGE_CHANGED = "Invalid UserId Or Password / Password Has Been Changed.";
|
||||
|
||||
public static final String MESSAGE_EXCEPTION = "Problem Occured : Report The Problem To Parinaam ";
|
||||
public static final String MESSAGE_SOCKETEXCEPTION = "Network Communication Failure. Check Your Network Connection";
|
||||
public static final String TABLE_STORE_GEOTAGGING = "STORE_GEOTAGGING";
|
||||
public static final String TABLE_COVERAGE_DATA = "COVERAGE_DATA";
|
||||
|
||||
|
||||
|
||||
public static final String CREATE_TABLE_COVERAGE_DATA = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_COVERAGE_DATA + " (" + KEY_ID
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ," + KEY_STORE_ID
|
||||
+ " VARCHAR,USER_ID VARCHAR, " + KEY_IN_TIME + " VARCHAR,"
|
||||
+ KEY_OUT_TIME + " VARCHAR," + KEY_VISIT_DATE + " VARCHAR,"
|
||||
+ KEY_LATITUDE + " VARCHAR," + KEY_LONGITUDE + " VARCHAR,"+ KEY_MERCHANDISER_ID + " VARCHAR,"
|
||||
+ KEY_COVERAGE_STATUS + " VARCHAR,"+ KEY_IMAGE + " VARCHAR,"
|
||||
+ KEY_GEO_TAG + " VARCHAR,"
|
||||
+ KEY_REASON_ID + " VARCHAR," + KEY_COVERAGE_REMARK
|
||||
+ " VARCHAR," + KEY_REASON + " VARCHAR)";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static final String CREATE_TABLE_STORE_GEOTAGGING = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_STORE_GEOTAGGING
|
||||
+ " ("
|
||||
+ "KEY_ID"
|
||||
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
|
||||
+ "STORE_ID"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "LATITUDE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "LONGITUDE"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "GEO_TAG"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "STATUS"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "FRONT_IMAGE" + " VARCHAR)";
|
||||
|
||||
|
||||
|
||||
//File Path
|
||||
public static final String FILE_PATH = Environment.getExternalStorageDirectory() + "/GSK_MT_ORANGE_IMAGES/";
|
||||
|
||||
@@ -1,30 +1,42 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagActivity;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
@@ -33,17 +45,20 @@ import cpm.com.gskmtorange.constant.CommonString;
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
ArrayList<CoverageBean> coverage;
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
|
||||
|
||||
ListView list;
|
||||
//ListView list;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String date,visit_status;
|
||||
String date, visit_status;
|
||||
GSKOrangeDB db;
|
||||
|
||||
StoreListActivity.ValueAdapter adapter;
|
||||
RecyclerView recyclerView;
|
||||
private SharedPreferences.Editor editor = null;
|
||||
LinearLayout linearlay;
|
||||
String store_id;
|
||||
private Dialog dialog;
|
||||
boolean result_flag = false, leaveflag = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -64,136 +79,35 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
db.open();
|
||||
|
||||
|
||||
list = (ListView)findViewById(R .id.list_id);
|
||||
linearlay = (LinearLayout) findViewById(R.id.linearlayout);
|
||||
recyclerView = (RecyclerView) findViewById(R.id.drawer_layout_recycle);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void onResume() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onResume();
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
coverage=db.getCoverageData(date);
|
||||
|
||||
if (storelist.size() > 0) {
|
||||
//list.setAdapter(new MyAdaptor());
|
||||
adapter = new StoreListActivity.ValueAdapter(getApplicationContext(), storelist);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
if (storelist.size()>0) {
|
||||
list.setAdapter(new MyAdaptor());
|
||||
}
|
||||
} else {
|
||||
|
||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view,
|
||||
int position, long id) {
|
||||
|
||||
|
||||
Toast.makeText(getApplicationContext(),"Click",Toast.LENGTH_LONG).show();
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private class MyAdaptor extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
|
||||
return storelist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder holder = null;
|
||||
if (convertView == null) {
|
||||
holder = new ViewHolder();
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.storeviewlist, null);
|
||||
|
||||
holder.storename = (TextView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storename);
|
||||
holder.storeaddress = (TextView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storeaddress);
|
||||
|
||||
holder.imgtick = (ImageView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storeico);
|
||||
|
||||
holder.checkout = (Button) convertView
|
||||
.findViewById(R.id.chkout);
|
||||
|
||||
holder.l1 = (RelativeLayout) convertView
|
||||
.findViewById(R.id.storenamelistview_layout);
|
||||
|
||||
convertView.setTag(holder);
|
||||
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
holder.storename.setText(storelist.get(position).getSTORE_NAME());
|
||||
holder.storeaddress.setText(storelist.get(position).getCITY());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
holder.checkout.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(
|
||||
StoreListActivity.this);
|
||||
builder.setMessage("Are you sure you want to checkout")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return convertView;
|
||||
recyclerView.setVisibility(View.INVISIBLE);
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private class ViewHolder {
|
||||
TextView storename, storeaddress;
|
||||
ImageView imgtick;
|
||||
Button checkout;
|
||||
|
||||
RelativeLayout l1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
@@ -201,7 +115,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id==android.R.id.home){
|
||||
if (id == android.R.id.home) {
|
||||
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
@@ -214,4 +128,286 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
public class ValueAdapter extends RecyclerView.Adapter<StoreListActivity.ValueAdapter.MyViewHolder> {
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<StoreBean> data = Collections.emptyList();
|
||||
|
||||
public ValueAdapter(Context context, List<StoreBean> data) {
|
||||
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.data = data;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StoreListActivity.ValueAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
|
||||
View view = inflator.inflate(R.layout.storeviewlist, parent, false);
|
||||
|
||||
StoreListActivity.ValueAdapter.MyViewHolder holder = new StoreListActivity.ValueAdapter.MyViewHolder(view);
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final StoreListActivity.ValueAdapter.MyViewHolder viewHolder, final int position) {
|
||||
|
||||
final StoreBean current = data.get(position);
|
||||
|
||||
|
||||
String storeid = current.getSTORE_ID();
|
||||
//viewHolder.txt.setText(current.txt);
|
||||
|
||||
viewHolder.txt.setText(current.getSTORE_NAME());
|
||||
viewHolder.address.setText(current.getADDRESS());
|
||||
|
||||
if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_VALID)) {
|
||||
viewHolder.chkbtn.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_u);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_d);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_C)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_c);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_P)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick_p);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tickl);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
|
||||
|
||||
|
||||
if (coverage.size() > 0) {
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < coverage.size(); i++) {
|
||||
|
||||
|
||||
if (coverage.get(i).getInTime() != null) {
|
||||
|
||||
if (coverage.get(i).getOutTime() == null) {
|
||||
|
||||
if (storeid.equals(coverage.get(i).getStoreId())) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.checkin);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
viewHolder.relativelayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
store_id = current.getSTORE_ID();
|
||||
|
||||
|
||||
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_D)) {
|
||||
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_data_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_C)) {
|
||||
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_already_checkout, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_P)) {
|
||||
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_again_uploaded, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_L)) {
|
||||
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
} else {
|
||||
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
|
||||
editor.putString(CommonString.KEY_CHECKOUT_STATUS, current.getCHECKOUT_STATUS());
|
||||
editor.putString(CommonString.KEY_CLASS_ID, current.getCLASS_ID());
|
||||
editor.putString(CommonString.KEY_EMP_ID, current.getEMP_ID());
|
||||
editor.putString(CommonString.KEY_GEO_TAG, current.getGEO_TAG());
|
||||
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());
|
||||
|
||||
if (!setcheckedmenthod(store_id)) {
|
||||
boolean enteryflag = true;
|
||||
if (coverage.size() > 0) {
|
||||
int i;
|
||||
for (i = 0; i < coverage.size(); i++) {
|
||||
|
||||
if (coverage.get(i).getInTime() != null) {
|
||||
|
||||
if (coverage.get(i).getOutTime() == null) {
|
||||
if (!store_id.equals(coverage.get(i).getStoreId())) {
|
||||
Snackbar.make(v, R.string.title_store_list_checkout_current, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
||||
enteryflag = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enteryflag) {
|
||||
showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
|
||||
}
|
||||
} else {
|
||||
Snackbar.make(v, R.string.title_store_list_checkout_Already_filled, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
TextView txt, address;
|
||||
ImageView icon;
|
||||
RelativeLayout relativelayout;
|
||||
ImageView imageview;
|
||||
Button chkbtn;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
txt = (TextView) itemView.findViewById(R.id.storelistviewxml_storename);
|
||||
address = (TextView) itemView.findViewById(R.id.storelistviewxml_storeaddress);
|
||||
|
||||
relativelayout = (RelativeLayout) itemView.findViewById(R.id.storenamelistview_layout);
|
||||
imageview = (ImageView) itemView.findViewById(R.id.imageView2);
|
||||
|
||||
chkbtn = (Button) itemView.findViewById(R.id.chkout);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void showMyDialog(final String storeCd, final String storeName, final String status, final String visitDate, final String checkout_status) {
|
||||
dialog = new Dialog(this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.dialogbox);
|
||||
|
||||
RadioGroup radioGroup = (RadioGroup) dialog.findViewById(R.id.radiogrpvisit);
|
||||
|
||||
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onCheckedChanged(RadioGroup group, int checkedId) {
|
||||
// find which radio button is selected
|
||||
if (checkedId == R.id.yes) {
|
||||
|
||||
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
|
||||
startActivity(in);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
dialog.cancel();
|
||||
|
||||
} else if (checkedId == R.id.no) {
|
||||
|
||||
dialog.cancel();
|
||||
|
||||
if (checkout_status.equals(CommonString.KEY_INVALID) || checkout_status.equals(CommonString.KEY_VALID)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
|
||||
builder.setMessage(CommonString.DATA_DELETE_ALERT_MESSAGE)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("Yes",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog,
|
||||
int id) {
|
||||
|
||||
|
||||
|
||||
/*Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
startActivity(in);*/
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog,
|
||||
int id) {
|
||||
|
||||
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
|
||||
alert.show();
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
|
||||
/* Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
|
||||
startActivity(in);*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
|
||||
public boolean setcheckedmenthod(String store_cd) {
|
||||
|
||||
|
||||
for (int i = 0; i < coverage.size(); i++) {
|
||||
if (store_cd.equals(coverage.get(i).getStoreId())) {
|
||||
if (coverage.get(i).getOutTime() != null) {
|
||||
result_flag = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
result_flag = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return result_flag;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,381 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.location.Location;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.location.LocationServices;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 31-05-2016.
|
||||
*/
|
||||
public class StoreimageActivity extends AppCompatActivity implements View.OnClickListener,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
|
||||
|
||||
|
||||
ImageView img_cam,img_clicked;
|
||||
Button btn_save;
|
||||
|
||||
String _pathforcheck,_path,str;
|
||||
|
||||
String store_id,visit_date,username,intime,date;
|
||||
private SharedPreferences preferences;
|
||||
AlertDialog alert;
|
||||
String img_str;
|
||||
private GSKOrangeDB database;
|
||||
|
||||
String lat,lon;
|
||||
GoogleApiClient mGoogleApiClient;
|
||||
ArrayList<CoverageBean> coverage_list;
|
||||
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_storeimage);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
img_cam = (ImageView) findViewById(R.id.img_selfie);
|
||||
img_clicked = (ImageView) findViewById(R.id.img_cam_selfie);
|
||||
|
||||
btn_save = (Button) findViewById(R.id.btn_save_selfie);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
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);
|
||||
|
||||
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||
|
||||
str = CommonString.FILE_PATH;
|
||||
|
||||
database = new GSKOrangeDB(this);
|
||||
database.open();
|
||||
|
||||
|
||||
coverage_list = database.getCoverageData(date);
|
||||
|
||||
img_cam.setOnClickListener(this);
|
||||
img_clicked.setOnClickListener(this);
|
||||
btn_save.setOnClickListener(this);
|
||||
|
||||
// Create an instance of GoogleAPIClient.
|
||||
if (mGoogleApiClient == null) {
|
||||
mGoogleApiClient = new GoogleApiClient.Builder(this)
|
||||
.addConnectionCallbacks(this)
|
||||
.addOnConnectionFailedListener(this)
|
||||
.addApi(LocationServices.API)
|
||||
.build();
|
||||
}
|
||||
|
||||
if ( Build.VERSION.SDK_INT >= 23 &&
|
||||
ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
|
||||
ContextCompat.checkSelfPermission(getApplicationContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id==android.R.id.home){
|
||||
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
/*Intent i = new Intent(this, DailyEntryScreen.class);
|
||||
startActivity(i);*/
|
||||
|
||||
finish();
|
||||
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
int id = v.getId();
|
||||
|
||||
switch (id){
|
||||
|
||||
case R.id.img_cam_selfie:
|
||||
|
||||
_pathforcheck = store_id + "Store"
|
||||
+ "Image" + visit_date.replace("/","") + getCurrentTime().replace(":","")+".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
|
||||
intime = getCurrentTime();
|
||||
|
||||
startCameraActivity();
|
||||
|
||||
break;
|
||||
|
||||
case R.id.btn_save_selfie:
|
||||
|
||||
if (img_str !=null) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(
|
||||
StoreimageActivity.this);
|
||||
builder.setMessage("Do you want to save the data ")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog,
|
||||
int id) {
|
||||
|
||||
alert.getButton(
|
||||
AlertDialog.BUTTON_POSITIVE)
|
||||
.setEnabled(false);
|
||||
|
||||
String status ="INVALID";
|
||||
|
||||
|
||||
CoverageBean cdata = new CoverageBean();
|
||||
cdata.setStoreId(store_id);
|
||||
cdata.setVisitDate(visit_date);
|
||||
cdata.setUserId(username);
|
||||
cdata.setInTime(intime);
|
||||
cdata.setReason("");
|
||||
cdata.setReasonid("0");
|
||||
cdata.setLatitude(lat);
|
||||
cdata.setLongitude(lon);
|
||||
cdata.setImage(img_str);
|
||||
cdata.setRemark("");
|
||||
cdata.setStatus(CommonString.KEY_CHECK_IN);
|
||||
|
||||
database.InsertCoverageData(cdata);
|
||||
|
||||
database.updateCheckoutStatus(store_id, status);
|
||||
|
||||
/* SharedPreferences.Editor editor = preferences.edit();
|
||||
|
||||
editor.putString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
editor.putString(CommonString.KEY_STORE_IN_TIME, "");
|
||||
|
||||
editor.commit();*/
|
||||
|
||||
|
||||
/* Intent in=new Intent(StoreimageActivity.this,StoreEntry.class);
|
||||
startActivity(in);
|
||||
|
||||
|
||||
|
||||
finish();*/
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog,
|
||||
int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
else {
|
||||
Toast.makeText(getApplicationContext(),
|
||||
"Please click the image", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void startCameraActivity() {
|
||||
|
||||
try {
|
||||
/*Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
Intent intent = new Intent(
|
||||
MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
|
||||
startActivityForResult(intent, 0);*/
|
||||
|
||||
Log.i("MakeMachine", "startCameraActivity()");
|
||||
File file = new File(_path);
|
||||
Uri outputFileUri = Uri.fromFile(file);
|
||||
|
||||
String defaultCameraPackage="";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n=0;n<list.size();n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Gallery")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 0);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
|
||||
Log.i("MakeMachine", "resultCode: " + resultCode);
|
||||
switch (resultCode) {
|
||||
case 0:
|
||||
Log.i("MakeMachine", "User cancelled");
|
||||
break;
|
||||
|
||||
case -1:
|
||||
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
|
||||
|
||||
Bitmap bmp = BitmapFactory.decodeFile(str + _pathforcheck);
|
||||
|
||||
img_cam.setImageBitmap(bmp);
|
||||
|
||||
img_clicked.setVisibility(View.GONE);
|
||||
img_cam.setVisibility(View.VISIBLE);
|
||||
|
||||
img_str = _pathforcheck;
|
||||
_pathforcheck = "";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
|
||||
public String getCurrentTime() {
|
||||
|
||||
Calendar m_cal = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss:mmm");
|
||||
String cdate = formatter.format(m_cal.getTime());
|
||||
|
||||
/* String intime = m_cal.get(Calendar.HOUR_OF_DAY) + ":"
|
||||
+ m_cal.get(Calendar.MINUTE) + ":" + m_cal.get(Calendar.SECOND);*/
|
||||
|
||||
return cdate;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnected(Bundle bundle) {
|
||||
|
||||
Location mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
|
||||
if (mLastLocation != null) {
|
||||
lat = String.valueOf(mLastLocation.getLatitude());
|
||||
lon = String.valueOf(mLastLocation.getLongitude());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionSuspended(int i) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionFailed(ConnectionResult connectionResult) {
|
||||
|
||||
}
|
||||
|
||||
protected void onStart() {
|
||||
mGoogleApiClient.connect();
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
protected void onStop() {
|
||||
mGoogleApiClient.disconnect();
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
|
||||
public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
GSKOrangeDB db;
|
||||
ArrayList<T2PGetterSetter> t2PGetterSetters;
|
||||
T2PAdapter t2PAdapter;
|
||||
RecyclerView rec_t2p;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_t2_pcompliance);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
db = new GSKOrangeDB(T2PComplianceActivity.this);
|
||||
db.open();
|
||||
|
||||
rec_t2p = (RecyclerView) findViewById(R.id.rec_t2p);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
t2PGetterSetters = db.getT2PDefaultData("1");
|
||||
|
||||
if(t2PGetterSetters.size()>0){
|
||||
rec_t2p.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
t2PAdapter = new T2PAdapter(t2PGetterSetters);
|
||||
rec_t2p.setAdapter(t2PAdapter);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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, int position) {
|
||||
|
||||
final T2PGetterSetter mItem = list.get(position);
|
||||
holder.tv_brand.setText(mItem.getBrand());
|
||||
holder.tv_display.setText(mItem.getDisplay().trim());
|
||||
|
||||
holder.btn_gaps.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
ArrayList<GapsChecklistGetterSetter> gapsChecklist = showGapsDialog(mItem.getDisplay_id());
|
||||
if(gapsChecklist.size()>0){
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
holder.btn_sku.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showSkuDialog();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@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 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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<GapsChecklistGetterSetter> showGapsDialog(String display_id){
|
||||
ArrayList<GapsChecklistGetterSetter> gapsChecklist = db.getGapsDefaultData(display_id);
|
||||
|
||||
Dialog dialog = new Dialog(T2PComplianceActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.gaps_dialog_layout);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
RecyclerView rec_gap_checklist = (RecyclerView) dialog.findViewById(R.id.rec_gap_checklist);
|
||||
rec_gap_checklist.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
GapsAdapter gapAdapter = new GapsAdapter(gapsChecklist);
|
||||
rec_gap_checklist.setAdapter(gapAdapter);
|
||||
|
||||
//dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
return gapsChecklist;
|
||||
}
|
||||
|
||||
public void showSkuDialog(){
|
||||
|
||||
ArrayList<BrandMasterGetterSetter> brandList = db.getBrandT2PData("1", "1", "1");
|
||||
// ArrayList<SkuMasterGetterSetter> skuMasterGetterSetterArrayList = db.getSkuT2PData("1", "1", "1",)
|
||||
|
||||
Dialog dialog = new Dialog(T2PComplianceActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.t2p_sku_dialog_layout);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
//dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
public class GapsAdapter extends RecyclerView.Adapter<GapsAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<GapsChecklistGetterSetter> list;
|
||||
|
||||
public GapsAdapter(ArrayList<GapsChecklistGetterSetter> gapsPList) {
|
||||
list = gapsPList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.gap_checklist_item, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ViewHolder holder, int position) {
|
||||
|
||||
final GapsChecklistGetterSetter mItem = list.get(position);
|
||||
holder.tv_checklist.setText(mItem.getChecklist());
|
||||
|
||||
holder.tb_present.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@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_checklist;
|
||||
public final ToggleButton tb_present;
|
||||
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_checklist = (TextView) mView.findViewById(R.id.tv_checklist);
|
||||
tb_present = (ToggleButton) mView.findViewById(R.id.btn_is_present);
|
||||
parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,16 +27,19 @@ import java.net.MalformedURLException;
|
||||
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.LoginActivity;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
@@ -61,6 +64,10 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
DisplayMasterGetterSetter displayMasterGetterSetter;
|
||||
MappingStockGetterSetter mappingStockGetterSetter;
|
||||
MAPPINGT2PGetterSetter mappingt2PGetterSetter;
|
||||
DisplayChecklistMasterGetterSetter checklistMasterGetterSetter;
|
||||
MappingDisplayChecklistGetterSetter mappingChecklistGetterSetter;
|
||||
NonWorkingReasonGetterSetter nonWorkingReasonGetterSetter;
|
||||
MappingPromotionGetterSetter mappingPromotionGetterSetter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -394,13 +401,149 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
TableBean.setMappingT2p(t2ptable);
|
||||
}
|
||||
} else {
|
||||
return "MAPPING_T2P";
|
||||
//return "MAPPING_T2P";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_T2P Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// DISPLAY_CHECKLIST_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "DISPLAY_CHECKLIST_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
checklistMasterGetterSetter = XMLHandlers.mappingDisplayChecklistMasterXMLHandler(xpp, eventType);
|
||||
if (checklistMasterGetterSetter.getCHECKLIST_ID().size() > 0) {
|
||||
String checklist_master_table = checklistMasterGetterSetter.getTable_DISPLAY_CHECKLIST_MASTER();
|
||||
if (checklist_master_table != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setDisplayChecklistMaster(checklist_master_table);
|
||||
}
|
||||
} else {
|
||||
return "DISPLAY_CHECKLIST_MASTER";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "DISPLAY_CHECKLIST_MASTER Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_DISPLAY_CHECKLIST
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_DISPLAY_CHECKLIST");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingChecklistGetterSetter = XMLHandlers.mappingMappingDisplayChecklistXMLHandler(xpp, eventType);
|
||||
if (mappingChecklistGetterSetter.getCHECKLIST_ID().size() > 0) {
|
||||
String mapping_display_checklisttable = mappingChecklistGetterSetter.getTable_MAPPING_DISPLAY_CHECKLIST();
|
||||
if (mapping_display_checklisttable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingDisplayChecklist(mapping_display_checklisttable);
|
||||
}
|
||||
} else {
|
||||
//return "MAPPING_DISPLAY_CHECKLIST";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_DISPLAY_CHECKLIST Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
// NON_WORKING_REASON
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "NON_WORKING_REASON");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
nonWorkingReasonGetterSetter = XMLHandlers.nonWorkingReasonXMLHandler(xpp, eventType);
|
||||
if (nonWorkingReasonGetterSetter.getREASON_ID().size() > 0) {
|
||||
String reasontable = nonWorkingReasonGetterSetter.getTable_NON_WORKING_REASON();
|
||||
if (reasontable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setNonWorkingReason(reasontable);
|
||||
}
|
||||
} else {
|
||||
return "NON_WORKING_REASON";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "NON_WORKING_REASON Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_PROMOTION
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_PROMOTION");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingPromotionGetterSetter = XMLHandlers.mappingPromotionXMLHandler(xpp, eventType);
|
||||
if (mappingPromotionGetterSetter.getSTORE_ID().size() > 0) {
|
||||
String mapping_promotion_table = mappingPromotionGetterSetter.getTable_MAPPING_PROMOTION();
|
||||
if (mapping_promotion_table != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingPromotion(mapping_promotion_table);
|
||||
}
|
||||
} else {
|
||||
//return "MAPPING_PROMOTION";
|
||||
}
|
||||
data.value = 100;
|
||||
data.name = "MAPPING_PROMOTION Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
db.open();
|
||||
db.InsertJCP(jcpgettersetter);
|
||||
@@ -412,7 +555,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
db.InsertMAPPING_T2P(mappingt2PGetterSetter);
|
||||
db.InsertMappingStock(mappingStockGetterSetter);
|
||||
|
||||
db.InsertDisplayChecklistMaster(checklistMasterGetterSetter);
|
||||
db.InsertMappingDisplayChecklist(mappingChecklistGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
package cpm.com.gskmtorange.gettersetter;
|
||||
|
||||
public class CoverageBean
|
||||
{
|
||||
protected int MID;
|
||||
protected String process_id;
|
||||
|
||||
public String getGEO_TAG() {
|
||||
return GEO_TAG;
|
||||
}
|
||||
|
||||
public void setGEO_TAG(String GEO_TAG) {
|
||||
this.GEO_TAG = GEO_TAG;
|
||||
}
|
||||
|
||||
protected String GEO_TAG;
|
||||
public String getProcess_id() {
|
||||
return process_id;
|
||||
}
|
||||
|
||||
public void setProcess_id(String process_id) {
|
||||
this.process_id = process_id;
|
||||
}
|
||||
|
||||
protected String storeId;
|
||||
protected String storename;
|
||||
|
||||
public String getStorename() {
|
||||
return storename;
|
||||
}
|
||||
|
||||
public void setStorename(String storename) {
|
||||
this.storename = storename;
|
||||
}
|
||||
|
||||
protected String Remark;
|
||||
|
||||
public String getRemark() {
|
||||
return Remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
protected String userId;
|
||||
protected String app_version;
|
||||
protected String image_allow;
|
||||
|
||||
public String getImage_allow() {
|
||||
return image_allow;
|
||||
}
|
||||
|
||||
public void setImage_allow(String image_allow) {
|
||||
this.image_allow = image_allow;
|
||||
}
|
||||
|
||||
public String getApp_version() {
|
||||
return app_version;
|
||||
}
|
||||
|
||||
public void setApp_version(String app_version) {
|
||||
this.app_version = app_version;
|
||||
}
|
||||
|
||||
protected String inTime;
|
||||
|
||||
protected String outTime;
|
||||
|
||||
protected String visitDate;
|
||||
|
||||
protected String keycontactId;
|
||||
|
||||
protected String isdDeploy;
|
||||
|
||||
protected String uploadStatus;
|
||||
|
||||
private String latitude;
|
||||
|
||||
private String longitude;
|
||||
|
||||
private String reasonid="";
|
||||
|
||||
private String sub_reasonId="";
|
||||
|
||||
public String getSub_reasonId() {
|
||||
return sub_reasonId;
|
||||
}
|
||||
|
||||
public void setSub_reasonId(String sub_reasonId) {
|
||||
this.sub_reasonId = sub_reasonId;
|
||||
}
|
||||
|
||||
private String reason="";
|
||||
|
||||
private String status="N";
|
||||
|
||||
private String image="";
|
||||
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getMID() {
|
||||
return MID;
|
||||
}
|
||||
|
||||
public void setMID(int mID) {
|
||||
MID = mID;
|
||||
}
|
||||
|
||||
public String getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(String storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getInTime() {
|
||||
return inTime;
|
||||
}
|
||||
|
||||
public void setInTime(String inTime) {
|
||||
this.inTime = inTime;
|
||||
}
|
||||
|
||||
public String getOutTime() {
|
||||
return outTime;
|
||||
}
|
||||
|
||||
public void setOutTime(String outTime) {
|
||||
this.outTime = outTime;
|
||||
}
|
||||
|
||||
public String getVisitDate() {
|
||||
return visitDate;
|
||||
}
|
||||
|
||||
public void setVisitDate(String visitDate) {
|
||||
this.visitDate = visitDate;
|
||||
}
|
||||
|
||||
public String getKeycontactId() {
|
||||
return keycontactId;
|
||||
}
|
||||
|
||||
public void setKeycontactId(String keycontactId) {
|
||||
this.keycontactId = keycontactId;
|
||||
}
|
||||
|
||||
public String getIsdDeploy() {
|
||||
return isdDeploy;
|
||||
}
|
||||
|
||||
public void setIsdDeploy(String isdDeploy) {
|
||||
this.isdDeploy = isdDeploy;
|
||||
}
|
||||
|
||||
public String getUploadStatus() {
|
||||
return uploadStatus;
|
||||
}
|
||||
|
||||
public void setUploadStatus(String uploadStatus) {
|
||||
this.uploadStatus = uploadStatus;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getReasonid() {
|
||||
return reasonid;
|
||||
}
|
||||
|
||||
public void setReasonid(String reasonid) {
|
||||
this.reasonid = reasonid;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package cpm.com.gskmtorange.gettersetter;
|
||||
|
||||
public class GeotaggingBeans {
|
||||
|
||||
|
||||
|
||||
public String storeid;
|
||||
public String url1;
|
||||
public String url2;
|
||||
public String status;
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String url3;
|
||||
public double Latitude ;
|
||||
public double Longitude;
|
||||
|
||||
public String getStoreid() {
|
||||
return storeid;
|
||||
}
|
||||
public void setStoreid(String storeid) {
|
||||
this.storeid = storeid;
|
||||
}
|
||||
public double getLatitude() {
|
||||
return Latitude;
|
||||
}
|
||||
public void setLatitude(double d) {
|
||||
Latitude = d;
|
||||
}
|
||||
public double getLongitude() {
|
||||
return Longitude;
|
||||
}
|
||||
public void setLongitude(double d) {
|
||||
Longitude = d;
|
||||
}
|
||||
|
||||
|
||||
public void setUrl1(String url1)
|
||||
{
|
||||
|
||||
this.url1=url1;
|
||||
}
|
||||
|
||||
public String getUrl1()
|
||||
{
|
||||
|
||||
return url1;
|
||||
}
|
||||
|
||||
public void setUrl2(String url2)
|
||||
{
|
||||
|
||||
this.url2=url2;
|
||||
}
|
||||
|
||||
public String getUrl2()
|
||||
{
|
||||
|
||||
return url2;
|
||||
}
|
||||
|
||||
public void setUrl3(String url3)
|
||||
{
|
||||
|
||||
this.url3=url3;
|
||||
}
|
||||
|
||||
public String getUrl3()
|
||||
{
|
||||
|
||||
return url3;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package cpm.com.gskmtorange.messgae;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class AlertMessage {
|
||||
|
||||
public static final String MESSAGE_ERROR = "Network Error , ";
|
||||
|
||||
public static final String MESSAGE_DATA_NOT = "Data Not Uploaded , ";
|
||||
|
||||
private Exception exception;
|
||||
String value;
|
||||
private String data, condition,exceptionString;
|
||||
private Activity activity;
|
||||
private String error;
|
||||
|
||||
|
||||
|
||||
public AlertMessage(Activity activity, String data, String condition,
|
||||
Exception exception) {
|
||||
this.activity = activity;
|
||||
this.data = data;
|
||||
this.condition = condition;
|
||||
this.exception = exception;
|
||||
}
|
||||
|
||||
public AlertMessage(Activity activity, String data, String condition,
|
||||
String exception, String a) {
|
||||
this.activity = activity;
|
||||
this.data = data;
|
||||
this.condition = condition;
|
||||
this.exceptionString = exception;
|
||||
this.error = a;
|
||||
}
|
||||
|
||||
|
||||
public void showMessage() {
|
||||
|
||||
if (condition.equals("success")) {
|
||||
|
||||
ShowAlert1(data);
|
||||
}
|
||||
else if(condition.equals("failure"))
|
||||
{
|
||||
ShowAlertSocket(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void ShowAlert1(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
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, GeoTagStoreList.class);
|
||||
activity.startActivity(i);
|
||||
|
||||
activity.finish();
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void ShowAlertSocket(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
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, GeoTagStoreList.class);
|
||||
activity.startActivity(i);
|
||||
|
||||
activity.finish();
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class DisplayChecklistMasterGetterSetter {
|
||||
|
||||
String table_DISPLAY_CHECKLIST_MASTER;
|
||||
|
||||
public String getTable_DISPLAY_CHECKLIST_MASTER() {
|
||||
return table_DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public void setTable_DISPLAY_CHECKLIST_MASTER(String table_DISPLAY_CHECKLIST_MASTER) {
|
||||
this.table_DISPLAY_CHECKLIST_MASTER = table_DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST_ID() {
|
||||
return CHECKLIST_ID;
|
||||
}
|
||||
|
||||
public void setCHECKLIST_ID(String CHECKLIST_ID) {
|
||||
this.CHECKLIST_ID.add(CHECKLIST_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST() {
|
||||
return CHECKLIST;
|
||||
}
|
||||
|
||||
public void setCHECKLIST(String CHECKLIST) {
|
||||
this.CHECKLIST.add(CHECKLIST);
|
||||
}
|
||||
|
||||
ArrayList<String> CHECKLIST_ID = new ArrayList<>();
|
||||
ArrayList<String> CHECKLIST = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 04-01-2017.
|
||||
*/
|
||||
|
||||
public class GapsChecklistGetterSetter {
|
||||
|
||||
String checklist, checklist_id, display_id;
|
||||
boolean present;
|
||||
|
||||
public String getChecklist() {
|
||||
return checklist;
|
||||
}
|
||||
|
||||
public void setChecklist(String checklist) {
|
||||
this.checklist = checklist;
|
||||
}
|
||||
|
||||
public String getChecklist_id() {
|
||||
return checklist_id;
|
||||
}
|
||||
|
||||
public void setChecklist_id(String checklist_id) {
|
||||
this.checklist_id = checklist_id;
|
||||
}
|
||||
|
||||
public boolean isPresent() {
|
||||
return present;
|
||||
}
|
||||
|
||||
public void setPresent(boolean present) {
|
||||
this.present = present;
|
||||
}
|
||||
|
||||
public String getDisplay_id() {
|
||||
return display_id;
|
||||
}
|
||||
|
||||
public void setDisplay_id(String display_id) {
|
||||
this.display_id = display_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class MappingDisplayChecklistGetterSetter {
|
||||
|
||||
String table_MAPPING_DISPLAY_CHECKLIST;
|
||||
|
||||
ArrayList<String> DISPLAY_ID = new ArrayList<>();
|
||||
ArrayList<String> CHECKLIST_ID = new ArrayList<>();
|
||||
|
||||
public String getTable_MAPPING_DISPLAY_CHECKLIST() {
|
||||
return table_MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public void setTable_MAPPING_DISPLAY_CHECKLIST(String table_MAPPING_DISPLAY_CHECKLIST) {
|
||||
this.table_MAPPING_DISPLAY_CHECKLIST = table_MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public ArrayList<String> getDISPLAY_ID() {
|
||||
return DISPLAY_ID;
|
||||
}
|
||||
|
||||
public void setDISPLAY_ID(String DISPLAY_ID) {
|
||||
this.DISPLAY_ID.add(DISPLAY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCHECKLIST_ID() {
|
||||
return CHECKLIST_ID;
|
||||
}
|
||||
|
||||
public void setCHECKLIST_ID(String CHECKLIST_ID) {
|
||||
this.CHECKLIST_ID.add(CHECKLIST_ID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class MappingPromotionGetterSetter {
|
||||
|
||||
String table_MAPPING_PROMOTION;
|
||||
|
||||
ArrayList<String> STORE_ID = new ArrayList<>();
|
||||
ArrayList<String> SKU_ID = new ArrayList<>();
|
||||
ArrayList<String> SKU = new ArrayList<>();
|
||||
ArrayList<String> PROMO_ID = new ArrayList<>();
|
||||
ArrayList<String> PROMO = new ArrayList<>();
|
||||
|
||||
public String getTable_MAPPING_PROMOTION() {
|
||||
return table_MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public void setTable_MAPPING_PROMOTION(String table_MAPPING_PROMOTION) {
|
||||
this.table_MAPPING_PROMOTION = table_MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public ArrayList<String> getSTORE_ID() {
|
||||
return STORE_ID;
|
||||
}
|
||||
|
||||
public void setSTORE_ID(String STORE_ID) {
|
||||
this.STORE_ID.add(STORE_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKU_ID() {
|
||||
return SKU_ID;
|
||||
}
|
||||
|
||||
public void setSKU_ID(String SKU_ID) {
|
||||
this.SKU_ID.add(SKU_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKU() {
|
||||
return SKU;
|
||||
}
|
||||
|
||||
public void setSKU(String SKU) {
|
||||
this.SKU.add(SKU);
|
||||
}
|
||||
|
||||
public ArrayList<String> getPROMO_ID() {
|
||||
return PROMO_ID;
|
||||
}
|
||||
|
||||
public void setPROMO_ID(String PROMO_ID) {
|
||||
this.PROMO_ID.add(PROMO_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getPROMO() {
|
||||
return PROMO;
|
||||
}
|
||||
|
||||
public void setPROMO(String PROMO) {
|
||||
this.PROMO.add(PROMO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 03-01-2017.
|
||||
*/
|
||||
|
||||
public class NonWorkingReasonGetterSetter {
|
||||
|
||||
String table_NON_WORKING_REASON;
|
||||
|
||||
ArrayList<String> REASON_ID = new ArrayList<>();
|
||||
ArrayList<String> REASON = new ArrayList<>();
|
||||
ArrayList<String> ENTRY_ALLOW = new ArrayList<>();
|
||||
ArrayList<String> IMAGE_ALLOW = new ArrayList<>();
|
||||
|
||||
public String getTable_NON_WORKING_REASON() {
|
||||
return table_NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public void setTable_NON_WORKING_REASON(String table_NON_WORKING_REASON) {
|
||||
this.table_NON_WORKING_REASON = table_NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public ArrayList<String> getREASON_ID() {
|
||||
return REASON_ID;
|
||||
}
|
||||
|
||||
public void setREASON_ID(String REASON_ID) {
|
||||
this.REASON_ID.add(REASON_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getREASON() {
|
||||
return REASON;
|
||||
}
|
||||
|
||||
public void setREASON(String REASON) {
|
||||
this.REASON.add(REASON);
|
||||
}
|
||||
|
||||
public ArrayList<String> getENTRY_ALLOW() {
|
||||
return ENTRY_ALLOW;
|
||||
}
|
||||
|
||||
public void setENTRY_ALLOW(String ENTRY_ALLOW) {
|
||||
this.ENTRY_ALLOW.add(ENTRY_ALLOW);
|
||||
}
|
||||
|
||||
public ArrayList<String> getIMAGE_ALLOW() {
|
||||
return IMAGE_ALLOW;
|
||||
}
|
||||
|
||||
public void setIMAGE_ALLOW(String IMAGE_ALLOW) {
|
||||
this.IMAGE_ALLOW.add(IMAGE_ALLOW);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 02-01-2017.
|
||||
*/
|
||||
|
||||
public class T2PGetterSetter {
|
||||
|
||||
String brand_id, display_id, brand, display, image, remark;
|
||||
boolean isPresent;
|
||||
|
||||
public String getBrand_id() {
|
||||
return brand_id;
|
||||
}
|
||||
|
||||
public void setBrand_id(String brand_id) {
|
||||
this.brand_id = brand_id;
|
||||
}
|
||||
|
||||
public String getDisplay_id() {
|
||||
return display_id;
|
||||
}
|
||||
|
||||
public void setDisplay_id(String display_id) {
|
||||
this.display_id = display_id;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public boolean isPresent() {
|
||||
return isPresent;
|
||||
}
|
||||
|
||||
public void setPresent(boolean present) {
|
||||
isPresent = present;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,10 @@ public class TableBean {
|
||||
public static String DISPLAY_MASTER;
|
||||
public static String MAPPING_STOCK;
|
||||
public static String MAPPING_T2P;
|
||||
public static String DISPLAY_CHECKLIST_MASTER;
|
||||
public static String MAPPING_DISPLAY_CHECKLIST;
|
||||
public static String NON_WORKING_REASON;
|
||||
public static String MAPPING_PROMOTION;
|
||||
|
||||
public static String getJourneyPlan() {
|
||||
return JOURNEY_PLAN;
|
||||
@@ -78,4 +82,36 @@ public class TableBean {
|
||||
public static void setMappingT2p(String mappingT2p) {
|
||||
MAPPING_T2P = mappingT2p;
|
||||
}
|
||||
|
||||
public static String getDisplayChecklistMaster() {
|
||||
return DISPLAY_CHECKLIST_MASTER;
|
||||
}
|
||||
|
||||
public static void setDisplayChecklistMaster(String displayChecklistMaster) {
|
||||
DISPLAY_CHECKLIST_MASTER = displayChecklistMaster;
|
||||
}
|
||||
|
||||
public static String getMappingDisplayChecklist() {
|
||||
return MAPPING_DISPLAY_CHECKLIST;
|
||||
}
|
||||
|
||||
public static void setMappingDisplayChecklist(String mappingDisplayChecklist) {
|
||||
MAPPING_DISPLAY_CHECKLIST = mappingDisplayChecklist;
|
||||
}
|
||||
|
||||
public static String getNonWorkingReason() {
|
||||
return NON_WORKING_REASON;
|
||||
}
|
||||
|
||||
public static void setNonWorkingReason(String nonWorkingReason) {
|
||||
NON_WORKING_REASON = nonWorkingReason;
|
||||
}
|
||||
|
||||
public static String getMappingPromotion() {
|
||||
return MAPPING_PROMOTION;
|
||||
}
|
||||
|
||||
public static void setMappingPromotion(String mappingPromotion) {
|
||||
MAPPING_PROMOTION = mappingPromotion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package cpm.com.gskmtorange.xmlHandlers;
|
||||
|
||||
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
|
||||
public class FailureXMLHandler extends DefaultHandler{
|
||||
|
||||
private String elementValue;
|
||||
private FailureGetterSetter failureGetterSetter = null;
|
||||
|
||||
|
||||
public FailureGetterSetter getFailureGetterSetter()
|
||||
{
|
||||
return failureGetterSetter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startDocument() throws SAXException {
|
||||
// TODO Auto-generated method stub
|
||||
super.startDocument();
|
||||
|
||||
failureGetterSetter = new FailureGetterSetter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void characters(char[] ch, int start, int length)
|
||||
throws SAXException {
|
||||
// TODO Auto-generated method stub
|
||||
super.characters(ch, start, length);
|
||||
|
||||
elementValue = new String(ch, start, length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName)
|
||||
throws SAXException {
|
||||
// TODO Auto-generated method stub
|
||||
super.endElement(uri, localName, qName);
|
||||
|
||||
if(qName.equals("STATUS"))
|
||||
{
|
||||
failureGetterSetter.setStatus(elementValue);
|
||||
}
|
||||
else if(qName.equals("ERRORMSG"))
|
||||
{
|
||||
failureGetterSetter.setErrorMsg(elementValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,16 @@ import java.io.IOException;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayChecklistMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DisplayMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.LoginGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPINGT2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
|
||||
@@ -405,7 +409,7 @@ public class XMLHandlers {
|
||||
return stock;
|
||||
}
|
||||
|
||||
// MAPPING_STOCK XML HANDLER
|
||||
// MAPPING_T2P XML HANDLER
|
||||
public static MAPPINGT2PGetterSetter mappingT2pXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MAPPINGT2PGetterSetter t2p = new MAPPINGT2PGetterSetter();
|
||||
@@ -437,4 +441,140 @@ public class XMLHandlers {
|
||||
}
|
||||
return t2p;
|
||||
}
|
||||
|
||||
// DISPLAY_CHECKLIST_MASTER XML HANDLER
|
||||
public static DisplayChecklistMasterGetterSetter mappingDisplayChecklistMasterXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
DisplayChecklistMasterGetterSetter checklist = new DisplayChecklistMasterGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
checklist.setTable_DISPLAY_CHECKLIST_MASTER(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST_ID")) {
|
||||
checklist.setCHECKLIST_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST")) {
|
||||
checklist.setCHECKLIST(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return checklist;
|
||||
}
|
||||
|
||||
// MAPPING_DISPLAY_CHECKLIST XML HANDLER
|
||||
public static MappingDisplayChecklistGetterSetter mappingMappingDisplayChecklistXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MappingDisplayChecklistGetterSetter checklist = new MappingDisplayChecklistGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
checklist.setTable_MAPPING_DISPLAY_CHECKLIST(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CHECKLIST_ID")) {
|
||||
checklist.setCHECKLIST_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("DISPLAY_ID")) {
|
||||
checklist.setDISPLAY_ID(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return checklist;
|
||||
}
|
||||
|
||||
// NON_WORKING_REASON XML HANDLER
|
||||
public static NonWorkingReasonGetterSetter nonWorkingReasonXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
NonWorkingReasonGetterSetter reason = new NonWorkingReasonGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
reason.setTable_NON_WORKING_REASON(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("REASON_ID")) {
|
||||
reason.setREASON_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("REASON")) {
|
||||
reason.setREASON(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("ENTRY_ALLOW")) {
|
||||
reason.setENTRY_ALLOW(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("IMAGE_ALLOW")) {
|
||||
reason.setIMAGE_ALLOW(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
||||
// MAPPING_PROMOTION XML HANDLER
|
||||
public static MappingPromotionGetterSetter mappingPromotionXMLHandler(XmlPullParser xpp,
|
||||
int eventType) {
|
||||
MappingPromotionGetterSetter t2p = new MappingPromotionGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
t2p.setTable_MAPPING_PROMOTION(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("STORE_ID")) {
|
||||
t2p.setSTORE_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKU_ID")) {
|
||||
t2p.setSKU_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKU")) {
|
||||
t2p.setSKU(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PROMO_ID")) {
|
||||
t2p.setPROMO_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("PROMO")) {
|
||||
t2p.setPROMO(xpp.nextText());
|
||||
}
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
return t2p;
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.StoreimageActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/contentstoreimage" />
|
||||
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.T2PComplianceActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_t2_pcompliance" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/content_t2_pcompliance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/custom_margin"
|
||||
android:paddingLeft="@dimen/custom_margin"
|
||||
android:paddingRight="@dimen/custom_margin"
|
||||
android:paddingTop="@dimen/custom_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.T2PComplianceActivity"
|
||||
tools:showIn="@layout/activity_t2_pcompliance"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec_t2p"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.StoreimageActivity"
|
||||
tools:showIn="@layout/activity_storeimage"
|
||||
android:weightSum="10"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Click Store Front Image"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- <RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginTop="10dp"
|
||||
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgloreal"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/loreal"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>-->
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/rel_selfie"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_selfie"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_cam_selfie"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/camera_icon_done"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save_selfie"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="@string/save"
|
||||
android:textSize="@dimen/store_entry_text_size"
|
||||
android:layout_centerInParent="true"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar1"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/percentage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_below="@+id/progressBar1"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/progressBar1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:padding="10sp" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Store Visited"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="25sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radiogrpvisit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/yes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Yes"
|
||||
android:textColor="#000000"
|
||||
android:background="@color/colorPrimary"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
|
||||
android:background="@color/white" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="No"
|
||||
android:textColor="#000000"
|
||||
android:background="@color/colorPrimary"/>
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/custom_margin"
|
||||
android:layout_marginRight="@dimen/custom_margin"
|
||||
android:layout_marginTop="@dimen/custom_margin"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="2"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_checklist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Checklist"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/custom_margin"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/btn_is_present"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<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/colorPrimary"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/gaps"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:paddingBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec_gap_checklist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/grey_background">
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/save"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="35"
|
||||
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="15dp">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:id="@+id/relativelayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginBottom="1sp"
|
||||
|
||||
android:padding="10sp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/geolistviewxml_storeico"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="6sp"
|
||||
android:paddingTop="5sp"
|
||||
android:src="@mipmap/store" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/geolistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/geolistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/geolistviewxml_storeico"
|
||||
android:text="GSK MT ORANGE STORE"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/geolistviewxml_storeico"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@mipmap/geopin"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</RelativeLayout>
|
||||
@@ -62,17 +62,54 @@
|
||||
|
||||
>
|
||||
|
||||
<ListView
|
||||
<!-- <ListView
|
||||
android:id="@+id/list_id"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
|
||||
android:dividerHeight="2dp"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true" />
|
||||
android:smoothScrollbar="true" />-->
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/drawer_layout_recycle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearlayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="100"
|
||||
android:visibility="gone"
|
||||
|
||||
>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/sad_cloud"
|
||||
>
|
||||
|
||||
</View>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,143 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="10"
|
||||
android:id="@+id/parent_linear"
|
||||
android:background="#fff">
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/geotag_title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="Store List"
|
||||
android:textColor="#e2e2e2"
|
||||
android:textStyle="bold"
|
||||
android:textSize="30sp" />
|
||||
</LinearLayout>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="100">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="9"
|
||||
android:paddingTop="5dp"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/storename"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_weight="10"
|
||||
android:background="#ff9933"
|
||||
android:padding="5sp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/store_ID"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="20dp"
|
||||
android:text="Stores"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/storelist"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
|
||||
android:layout_weight="100"
|
||||
|
||||
>
|
||||
</ListView>
|
||||
|
||||
<!-- <ListView
|
||||
android:id="@+id/list_id"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
android:choiceMode="singleChoice"
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/no_data_lay"
|
||||
android:dividerHeight="2dp"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true" />-->
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/drawer_layout_recycle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="8"
|
||||
android:background="@color/grey_background"
|
||||
android:visibility="gone"
|
||||
android:padding="5dp"
|
||||
>
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="No data available"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"/>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/sad_cloud"
|
||||
android:layout_centerInParent="true"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
card_view:cardBackgroundColor="@color/white"
|
||||
card_view:cardCornerRadius="5dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Please download data"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"/>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,58 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/storenamelistview_layout"
|
||||
android:layout_width="fill_parent"
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/list_selector"
|
||||
android:padding="10sp">
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_weight="35"
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/storelistviewxml_storeico"
|
||||
android:layout_width="wrap_content"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="15dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/storenamelistview_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="6sp"
|
||||
android:background="@drawable/store"
|
||||
android:paddingTop="5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/storelistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/storelistviewxml_storeico"
|
||||
android:text="Balaji Tele Communication"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:padding="10sp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storeaddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/storelistviewxml_storename"
|
||||
android:layout_below="@+id/storelistviewxml_storename"
|
||||
android:text="C 126, Okhla II, "
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="normal" />
|
||||
<ImageView
|
||||
android:id="@+id/storelistviewxml_storeico"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="6sp"
|
||||
android:background="@mipmap/store"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingTop="25sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:focusable="false"
|
||||
android:visibility="invisible" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/storelistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/storelistviewxml_storeico"
|
||||
android:text="GSK MT ORANGE STORE"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storeaddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/storelistviewxml_storename"
|
||||
android:layout_below="@+id/storelistviewxml_storename"
|
||||
android:text="C 126, Okhla II, "
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:focusable="false"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_alignBottom="@+id/storelistviewxml_storeico"
|
||||
android:layout_alignParentRight="true"
|
||||
|
||||
android:background="@mipmap/tick_c"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
card_view:cardBackgroundColor="@android:color/white"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/parent_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/display"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_display"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/display" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/present"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/toggle_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/brand"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="@dimen/custom_margin"
|
||||
android:text="@string/image"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_cam"
|
||||
android:layout_width="50dp"
|
||||
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"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_remark"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="@string/image"
|
||||
android:layout_weight="1"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/edit_deactive"
|
||||
android:padding="@dimen/custom_margin"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="3"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_gaps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/gaps"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sku"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/sku"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_ref_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:text="@string/ref_image"
|
||||
android:textColor="@color/white"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_centerInParent="true"
|
||||
android:textSize="@dimen/text_size_xsmall"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<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/colorPrimary"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:text="@string/sku"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:paddingBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/brand"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_brand"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/sku"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_sku"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
android:background="@color/grey_background"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/stock"
|
||||
android:paddingLeft="5dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_stock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@string/add"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -21,4 +21,8 @@
|
||||
<string name="menu_setting">ضبط</string>
|
||||
<string name="menu_services">خدمات</string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
@@ -20,4 +20,25 @@
|
||||
<string name="menu_setting">Ayarlar</string>
|
||||
<string name="menu_services">Hizmetler</string>
|
||||
|
||||
|
||||
//changes after
|
||||
<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="save">Sakla</string>
|
||||
|
||||
<string name="brand">Marka</string>
|
||||
<string name="display">Teşhir Türü</string>
|
||||
<string name="image">Fotoğraf</string>
|
||||
<string name="gaps">Sorunlar</string>
|
||||
<string name="sku">Ürünler</string>
|
||||
<string name="ref_image">ref. Fotoğraf</string>
|
||||
<string name="present">Teşhir var mı?</string>
|
||||
<string name="add">Ekle</string>
|
||||
|
||||
<string name="select">Seç</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">Kalıcı Teşhir</string>
|
||||
|
||||
</resources>
|
||||
@@ -9,4 +9,8 @@
|
||||
<color name="grey_background">#EEEEEE</color>
|
||||
|
||||
<color name="blue">#2196F3</color>
|
||||
|
||||
<color name="colorOrange">#FFE0B2</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -12,4 +12,8 @@
|
||||
<dimen name="text_size_normal">20sp</dimen>
|
||||
<dimen name="text_size_small">16sp</dimen>
|
||||
|
||||
<dimen name="store_entry_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="text_size_xsmall">12sp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -21,11 +21,26 @@
|
||||
completions."
|
||||
</string>
|
||||
|
||||
<string name="save">Save</string>
|
||||
|
||||
<string name="brand">Brand</string>
|
||||
<string name="display">Display</string>
|
||||
<string name="image">Image</string>
|
||||
<string name="gaps">Gaps</string>
|
||||
<string name="sku">Sku</string>
|
||||
<string name="ref_image">Ref. Image</string>
|
||||
<string name="present">Present</string>
|
||||
<string name="stock">Stock</string>
|
||||
<string name="select">Select</string>
|
||||
<string name="add">Add</string>
|
||||
|
||||
<string name="select_language">Please select language</string>
|
||||
<string name="title_activity_select_language">SelectLanguageActivity</string>
|
||||
|
||||
<string name="title_activity_store_list_geotag">Store List</string>
|
||||
|
||||
<string name="title_activity_store_geotag">Geo Tag</string>
|
||||
|
||||
|
||||
<string name="menu_daily_route_plan">Daily Route Plan</string>
|
||||
<string name="menu_daily_download">Daily Data Download</string>
|
||||
@@ -38,6 +53,8 @@
|
||||
<string name="menu_services">Services</string>
|
||||
|
||||
<string name="title_activity_category_list">Category List</string>
|
||||
<string name="title_activity_t2_pcompliance">T2P Compliance</string>
|
||||
|
||||
<string name="title_activity_category_wise_performance">Categorywise Performance</string>
|
||||
<string name="title_activity_daily_main_menu">Daily Data Menu</string>
|
||||
<string name="title_activity_msl__availability">Must Stock Availability</string>
|
||||
@@ -62,4 +79,24 @@
|
||||
<string name="stock_facing_sos_target">SOS Target</string>
|
||||
|
||||
|
||||
<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="title_store_list_activity_store_already_done">Store Already Uploaded</string>
|
||||
<string name="title_store_list_activity_store_data_uploaded">Store Data Uploaded</string>
|
||||
<string name="title_store_list_activity_store_already_checkout">Store Already Checkout</string>
|
||||
<string name="title_store_list_activity_store_again_uploaded">Please Store data again Uploaded</string>
|
||||
<string name="title_store_list_activity_store_closed">Store Closed</string>
|
||||
|
||||
|
||||
<string name="save">SAVE</string>
|
||||
|
||||
<string name="title_store_list_checkout_current">Please checkout from current store</string>
|
||||
<string name="title_store_list_checkout_Already_filled">Data already filled</string>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -17,4 +17,7 @@
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
<style name="AppTheme.NoActionBar.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||