Merge pull request #14 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/CategoryDownload
new download branch
This commit is contained in:
@@ -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,67 +28,68 @@
|
||||
<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=".geotag.GeoTagStoreList"
|
||||
android:name=".GeoTag.GeoTagStoreList"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
android:name=".gsk_dailyentry.CategoryListActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
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:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<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>
|
||||
@@ -12,7 +12,13 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
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.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
@@ -26,8 +32,6 @@ import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
@@ -64,10 +68,15 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(TableBean.getMappingStock());
|
||||
db.execSQL(TableBean.getMappingT2p());
|
||||
|
||||
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
|
||||
@@ -130,6 +139,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;
|
||||
@@ -246,6 +431,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);
|
||||
|
||||
@@ -305,6 +508,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);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cpm.com.gskmtorange.geotag;
|
||||
package cpm.com.gskmtorange.GeoTag;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.location.Location;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cpm.com.gskmtorange.geotag;
|
||||
package cpm.com.gskmtorange.GeoTag;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
@@ -23,7 +23,7 @@ import android.widget.Toast;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.gettersetter.StoreBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
|
||||
@@ -641,6 +641,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||
|
||||
return intime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
@@ -24,15 +24,16 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
import cpm.com.gskmtorange.geotag.GeoTagStoreList;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
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;
|
||||
@@ -171,6 +172,11 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
} 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) {
|
||||
@@ -261,6 +267,5 @@ public class MainActivity extends AppCompatActivity
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ import android.widget.Toast;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.gettersetter.StoreBean;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
@@ -32,7 +33,7 @@ import cpm.com.gskmtorange.constant.CommonString;
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
|
||||
@@ -40,7 +41,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
ListView list;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String date,visit_status;
|
||||
String date, visit_status;
|
||||
GSKOrangeDB db;
|
||||
|
||||
|
||||
@@ -63,13 +64,13 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
db.open();
|
||||
|
||||
|
||||
list = (ListView)findViewById(R .id.list_id);
|
||||
list = (ListView) findViewById(R.id.list_id);
|
||||
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
|
||||
if (storelist.size()>0) {
|
||||
if (storelist.size() > 0) {
|
||||
list.setAdapter(new MyAdaptor());
|
||||
}
|
||||
|
||||
@@ -80,16 +81,13 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
int position, long id) {
|
||||
|
||||
|
||||
Toast.makeText(getApplicationContext(),"Click",Toast.LENGTH_LONG).show();
|
||||
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Click", Toast.LENGTH_LONG).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private class MyAdaptor extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
@@ -142,9 +140,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
holder.storeaddress.setText(storelist.get(position).getCITY());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
holder.checkout.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
@@ -175,8 +170,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@@ -200,7 +193,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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,10 +32,14 @@ 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;
|
||||
@@ -60,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) {
|
||||
@@ -393,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);
|
||||
@@ -411,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(
|
||||
|
||||
+40
@@ -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<>();
|
||||
|
||||
}
|
||||
+43
@@ -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;
|
||||
}
|
||||
}
|
||||
+39
@@ -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);
|
||||
}
|
||||
}
|
||||
+66
@@ -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);
|
||||
}
|
||||
}
|
||||
+57
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -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,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,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>
|
||||
@@ -20,4 +20,19 @@
|
||||
<string name="menu_setting">Ayarlar</string>
|
||||
<string name="menu_services">Hizmetler</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>
|
||||
@@ -11,5 +11,6 @@
|
||||
|
||||
<dimen name="text_size_normal">20sp</dimen>
|
||||
<dimen name="text_size_small">16sp</dimen>
|
||||
<dimen name="text_size_xsmall">12sp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -21,6 +21,19 @@
|
||||
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>
|
||||
|
||||
@@ -38,6 +51,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>
|
||||
|
||||
Reference in New Issue
Block a user