Merge branches 'CategoryDownload' and 'master' of https://github.com/CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GSKORANGEV1 into CategoryDownload
@@ -3,8 +3,9 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="C:\Program Files\Android\Android Studio2\gradle\gradle-2.14.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "24.0.1"
|
||||
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:name=".SplashScreenActivity"
|
||||
android:label="@string/app_name"
|
||||
@@ -28,10 +29,12 @@
|
||||
<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"
|
||||
@@ -41,7 +44,46 @@
|
||||
android:name=".SelectLanguageActivity"
|
||||
android:label="@string/title_activity_select_language"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity android:name=".download.DownloadActivity"></activity>
|
||||
</application>
|
||||
|
||||
<activity android:name=".download.DownloadActivity" />
|
||||
|
||||
<activity
|
||||
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"-->
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.CategoryWisePerformanceActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<!-- 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"-->
|
||||
|
||||
<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"-->
|
||||
<activity
|
||||
android:name=".dailyentry.StoreListActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.Stock_FacingActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,333 @@
|
||||
package cpm.com.gskmtorange.Database;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
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.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE";
|
||||
public static final int DATABASE_VERSION = 13;
|
||||
private SQLiteDatabase db;
|
||||
TableBean tableBean;
|
||||
|
||||
public GSKOrangeDB(Context context) {
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
}
|
||||
|
||||
public void open() {
|
||||
try {
|
||||
db = this.getWritableDatabase();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
|
||||
db.execSQL(TableBean.getJourneyPlan());
|
||||
db.execSQL(TableBean.getBrandMaster());
|
||||
db.execSQL(TableBean.getSkuMaster());
|
||||
db.execSQL(TableBean.getCategoryMaster());
|
||||
db.execSQL(TableBean.getSubCategoryMaster());
|
||||
db.execSQL(TableBean.getDisplayMaster());
|
||||
|
||||
db.execSQL(TableBean.getMappingStock());
|
||||
db.execSQL(TableBean.getMappingT2p());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
db.execSQL("DROP TABLE IF EXISTS " + TableBean.getJourneyPlan());
|
||||
}
|
||||
|
||||
public void deleteTableWithStoreID(String storeid, String process_id) {
|
||||
}
|
||||
|
||||
public void deleteAllTables() {
|
||||
|
||||
}
|
||||
|
||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||
db.delete("JOURNEY_PLAN", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
|
||||
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||
|
||||
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||
values.put("EMP_ID", data.getEMP_ID().get(i));
|
||||
|
||||
values.put("STORE_NAME", data.getSTORE_NAME().get(i));
|
||||
|
||||
values.put("CITY", data.getCITY().get(i));
|
||||
|
||||
values.put("VISIT_DATE", data.getVISIT_DATE().get(i));
|
||||
|
||||
values.put("ADDRESS", data.getADDRESS().get(i));
|
||||
|
||||
values.put("UPLOAD_STATUS", data.getUPLOAD_STATUS().get(i));
|
||||
|
||||
values.put("STORETYPE", data.getSTORETYPE().get(i));
|
||||
|
||||
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||
|
||||
|
||||
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||
|
||||
values.put("CHECKOUT_STATUS", data.getCHECKOUT_STATUS().get(i));
|
||||
|
||||
values.put("CLASSIFICATION", data.getCLASSIFICATION().get(i));
|
||||
|
||||
values.put("KEYACCOUNT", data.getKEYACCOUNT().get(i));
|
||||
values.put("CLASS_ID", data.getCLASS_ID().get(i));
|
||||
|
||||
values.put("CAMERA_ALLOW", data.getCAMERA_ALLOW().get(i));
|
||||
values.put("GEO_TAG", data.getGEO_TAG().get(i));
|
||||
|
||||
|
||||
db.insert("JOURNEY_PLAN", null, values);
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception in JCP", ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<StoreBean> getStoreData(String date) {
|
||||
|
||||
|
||||
ArrayList<StoreBean> list = new ArrayList<StoreBean>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN where VISIT_DATE ='" + date + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
StoreBean sb = new StoreBean();
|
||||
|
||||
sb.setSTORE_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORE_ID")));
|
||||
|
||||
sb.setEMP_ID((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("EMP_ID"))));
|
||||
|
||||
sb.setKEYACCOUNT(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("KEYACCOUNT")));
|
||||
|
||||
sb.setSTORE_NAME(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORE_NAME")));
|
||||
|
||||
sb.setADDRESS((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("ADDRESS"))));
|
||||
sb.setCITY(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CITY")));
|
||||
|
||||
sb.setSTORETYPE(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORETYPE")));
|
||||
|
||||
sb.setCLASSIFICATION(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CLASSIFICATION")));
|
||||
|
||||
sb.setKEYACCOUNT_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("KEYACCOUNT_ID")));
|
||||
|
||||
sb.setSTORETYPE_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORETYPE_ID")));
|
||||
|
||||
sb.setCLASS_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CLASS_ID")));
|
||||
|
||||
sb.setVISIT_DATE(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("VISIT_DATE")));
|
||||
|
||||
sb.setCAMERA_ALLOW(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CAMERA_ALLOW")));
|
||||
|
||||
sb.setUPLOAD_STATUS(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("UPLOAD_STATUS")));
|
||||
sb.setCHECKOUT_STATUS(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKOUT_STATUS")));
|
||||
|
||||
sb.setGEO_TAG(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("GEO_TAG")));
|
||||
|
||||
|
||||
list.add(sb);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception get JCP!", e.toString());
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
//Gagan Goel
|
||||
public void InsertCategory(CategoryMasterGetterSetter data) {
|
||||
db.delete("CATEGORY_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getCATEGORY_ID().size(); i++) {
|
||||
|
||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("CATEGORY", data.getCATEGORY().get(i));
|
||||
values.put("CATEGORY_SEQUENCE", data.getCATEGORY_SEQUENCE().get(i));
|
||||
|
||||
db.insert("CATEGORY_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in CATEGORY_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertMappingStock(MappingStockGetterSetter data) {
|
||||
db.delete("MAPPING_STOCK", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getKEYACCOUNT_ID().size(); i++) {
|
||||
|
||||
values.put("KEYACCOUNT_ID", data.getKEYACCOUNT_ID().get(i));
|
||||
values.put("STORETYPE_ID", data.getSTORETYPE_ID().get(i));
|
||||
values.put("CLASS_ID", data.getCLASS_ID().get(i));
|
||||
values.put("SKU_ID", data.getSKU_ID().get(i));
|
||||
values.put("MUST_HAVE", data.getMUST_HAVE().get(i));
|
||||
values.put("MBQ", data.getMBQ().get(i));
|
||||
|
||||
db.insert("MAPPING_STOCK", 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);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getSUB_CATEGORY_ID().size(); i++) {
|
||||
|
||||
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||
values.put("SUB_CATEGORY", data.getSUB_CATEGORY().get(i));
|
||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("SUB_CATEGORY_SEQUENCE", data.getSUB_CATEGORY_SEQUENCE().get(i));
|
||||
|
||||
db.insert("SUB_CATEGORY_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in MAPPING_STOCK " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertBrandMaster(BrandMasterGetterSetter data) {
|
||||
db.delete("BRAND_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getBRAND_ID().size(); i++) {
|
||||
|
||||
values.put("BRAND_ID", data.getBRAND_ID().get(i));
|
||||
values.put("BRAND", data.getBRAND().get(i));
|
||||
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||
values.put("COMPANY_ID", data.getCOMPANY_ID().get(i));
|
||||
values.put("BRAND_SEQUENCE", data.getBRAND_SEQUENCE().get(i));
|
||||
|
||||
db.insert("BRAND_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in BRAND_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertSkuMaster(SkuMasterGetterSetter data) {
|
||||
db.delete("SKU_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getSKU_ID().size(); i++) {
|
||||
|
||||
values.put("SKU_ID", data.getSKU_ID().get(i));
|
||||
values.put("SKU", data.getSKU().get(i));
|
||||
values.put("BRAND_ID", data.getBRAND_ID().get(i));
|
||||
values.put("MRP", data.getMRP().get(i));
|
||||
values.put("SKU_SEQUENCE", data.getSKU_SEQUENCE().get(i));
|
||||
|
||||
db.insert("SKU_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in SKU_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertDisplayMaster(DisplayMasterGetterSetter data) {
|
||||
db.delete("DISPLAY_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getDISPLAY_ID().size(); i++) {
|
||||
|
||||
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
|
||||
values.put("DISPLAY", data.getDISPLAY().get(i));
|
||||
values.put("IMAGE_URL", data.getIMAGE_URL().get(i));
|
||||
|
||||
db.insert("DISPLAY_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in DISPLAY_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertMAPPING_T2P(MAPPINGT2PGetterSetter data) {
|
||||
db.delete("MAPPING_T2P", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getSTORE_ID().size(); i++) {
|
||||
|
||||
values.put("STORE_ID", data.getSTORE_ID().get(i));
|
||||
values.put("BRAND_ID", data.getBRAND_ID().get(i));
|
||||
values.put("DISPLAY_ID", data.getDISPLAY_ID().get(i));
|
||||
|
||||
db.insert("MAPPING_T2P", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in MAPPING_T2P " + ex.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package cpm.com.gskmtorange.GeoTag;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.location.LocationListener;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.OnMapReadyCallback;
|
||||
import com.google.android.gms.maps.SupportMapFragment;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 27-12-2016.
|
||||
*/
|
||||
|
||||
public class GeoTagActivity extends AppCompatActivity {
|
||||
//implements OnMapReadyCallback,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener{
|
||||
|
||||
private GoogleMap mMap;
|
||||
double latitude =0.0;
|
||||
double longitude =0.0;
|
||||
LocationManager locationManager;
|
||||
private Location mLastLocation;
|
||||
private LocationManager locmanager = null;
|
||||
FloatingActionButton fab,fabcarmabtn;
|
||||
SupportMapFragment mapFragment;
|
||||
SharedPreferences preferences;
|
||||
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_geo_tag);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
//username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
|
||||
|
||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
|
||||
fabcarmabtn = (FloatingActionButton) findViewById(R.id.camrabtn);
|
||||
|
||||
|
||||
|
||||
mapFragment = (SupportMapFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.map);
|
||||
//mapFragment.getMapAsync(this);
|
||||
// mapFragment.getMapAsync(this);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package cpm.com.gskmtorange.GeoTag;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 27-12-2016.
|
||||
*/
|
||||
|
||||
public class GeoTagStoreList extends AppCompatActivity {
|
||||
|
||||
|
||||
ListView lv;
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
package cpm.com.gskmtorange.GetterSetter;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreBean {
|
||||
|
||||
String STORE_ID;
|
||||
String EMP_ID;
|
||||
String KEYACCOUNT;
|
||||
String STORE_NAME;
|
||||
String ADDRESS;
|
||||
String CITY;
|
||||
String STORETYPE;
|
||||
String CLASSIFICATION;
|
||||
String KEYACCOUNT_ID;
|
||||
String STORETYPE_ID;
|
||||
String CLASS_ID;
|
||||
String VISIT_DATE;
|
||||
String CAMERA_ALLOW;
|
||||
String UPLOAD_STATUS;
|
||||
|
||||
public String getSTORE_ID() {
|
||||
return STORE_ID;
|
||||
}
|
||||
|
||||
public void setSTORE_ID(String STORE_ID) {
|
||||
this.STORE_ID = STORE_ID;
|
||||
}
|
||||
|
||||
public String getEMP_ID() {
|
||||
return EMP_ID;
|
||||
}
|
||||
|
||||
public void setEMP_ID(String EMP_ID) {
|
||||
this.EMP_ID = EMP_ID;
|
||||
}
|
||||
|
||||
public String getKEYACCOUNT() {
|
||||
return KEYACCOUNT;
|
||||
}
|
||||
|
||||
public void setKEYACCOUNT(String KEYACCOUNT) {
|
||||
this.KEYACCOUNT = KEYACCOUNT;
|
||||
}
|
||||
|
||||
public String getSTORE_NAME() {
|
||||
return STORE_NAME;
|
||||
}
|
||||
|
||||
public void setSTORE_NAME(String STORE_NAME) {
|
||||
this.STORE_NAME = STORE_NAME;
|
||||
}
|
||||
|
||||
public String getADDRESS() {
|
||||
return ADDRESS;
|
||||
}
|
||||
|
||||
public void setADDRESS(String ADDRESS) {
|
||||
this.ADDRESS = ADDRESS;
|
||||
}
|
||||
|
||||
public String getCITY() {
|
||||
return CITY;
|
||||
}
|
||||
|
||||
public void setCITY(String CITY) {
|
||||
this.CITY = CITY;
|
||||
}
|
||||
|
||||
public String getSTORETYPE() {
|
||||
return STORETYPE;
|
||||
}
|
||||
|
||||
public void setSTORETYPE(String STORETYPE) {
|
||||
this.STORETYPE = STORETYPE;
|
||||
}
|
||||
|
||||
public String getCLASSIFICATION() {
|
||||
return CLASSIFICATION;
|
||||
}
|
||||
|
||||
public void setCLASSIFICATION(String CLASSIFICATION) {
|
||||
this.CLASSIFICATION = CLASSIFICATION;
|
||||
}
|
||||
|
||||
public String getKEYACCOUNT_ID() {
|
||||
return KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public void setKEYACCOUNT_ID(String KEYACCOUNT_ID) {
|
||||
this.KEYACCOUNT_ID = KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public String getSTORETYPE_ID() {
|
||||
return STORETYPE_ID;
|
||||
}
|
||||
|
||||
public void setSTORETYPE_ID(String STORETYPE_ID) {
|
||||
this.STORETYPE_ID = STORETYPE_ID;
|
||||
}
|
||||
|
||||
public String getCLASS_ID() {
|
||||
return CLASS_ID;
|
||||
}
|
||||
|
||||
public void setCLASS_ID(String CLASS_ID) {
|
||||
this.CLASS_ID = CLASS_ID;
|
||||
}
|
||||
|
||||
public String getVISIT_DATE() {
|
||||
return VISIT_DATE;
|
||||
}
|
||||
|
||||
public void setVISIT_DATE(String VISIT_DATE) {
|
||||
this.VISIT_DATE = VISIT_DATE;
|
||||
}
|
||||
|
||||
public String getCAMERA_ALLOW() {
|
||||
return CAMERA_ALLOW;
|
||||
}
|
||||
|
||||
public void setCAMERA_ALLOW(String CAMERA_ALLOW) {
|
||||
this.CAMERA_ALLOW = CAMERA_ALLOW;
|
||||
}
|
||||
|
||||
public String getUPLOAD_STATUS() {
|
||||
return UPLOAD_STATUS;
|
||||
}
|
||||
|
||||
public void setUPLOAD_STATUS(String UPLOAD_STATUS) {
|
||||
this.UPLOAD_STATUS = UPLOAD_STATUS;
|
||||
}
|
||||
|
||||
public String getCHECKOUT_STATUS() {
|
||||
return CHECKOUT_STATUS;
|
||||
}
|
||||
|
||||
public void setCHECKOUT_STATUS(String CHECKOUT_STATUS) {
|
||||
this.CHECKOUT_STATUS = CHECKOUT_STATUS;
|
||||
}
|
||||
|
||||
public String getGEO_TAG() {
|
||||
return GEO_TAG;
|
||||
}
|
||||
|
||||
public void setGEO_TAG(String GEO_TAG) {
|
||||
this.GEO_TAG = GEO_TAG;
|
||||
}
|
||||
|
||||
String CHECKOUT_STATUS;
|
||||
String GEO_TAG ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -119,8 +119,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||
// Set up the login form.
|
||||
museridView = (AutoCompleteTextView) findViewById(R.id.userid);
|
||||
//populateAutoComplete();
|
||||
|
||||
mPasswordView = (EditText) findViewById(R.id.password);
|
||||
|
||||
museridView.setText("testmer");
|
||||
mPasswordView.setText("cpm123");
|
||||
|
||||
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
|
||||
|
||||
@@ -5,8 +5,6 @@ import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.support.design.widget.NavigationView;
|
||||
@@ -23,6 +21,8 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity
|
||||
@@ -48,7 +48,7 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
webView = (WebView) findViewById(R.id.webview);
|
||||
|
||||
String url = preferences.getString(CommonString.KEY_NOTICE_BOARD_LINK,"");
|
||||
String url = preferences.getString(CommonString.KEY_NOTICE_BOARD_LINK, "");
|
||||
user_name = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
//user_type = preferences.getString(CommonString.KEY_USER_TYPE, null);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
|
||||
if(!url.equals("")){
|
||||
if (!url.equals("")) {
|
||||
|
||||
webView.loadUrl(url);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
View headerView = LayoutInflater.from(this).inflate(R.layout.nav_header_main, navigationView, false);
|
||||
|
||||
TextView tv_username = (TextView) headerView.findViewById(R.id.nav_user_name);
|
||||
TextView tv_username = (TextView) headerView.findViewById(R.id.nav_user_name);
|
||||
//tv_usertype = (TextView) headerView.findViewById(R.id.nav_user_type);
|
||||
|
||||
tv_username.setText(user_name);
|
||||
@@ -130,6 +130,13 @@ public class MainActivity extends AppCompatActivity
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.nav_route_plan) {
|
||||
|
||||
Intent startDownload = new Intent(this,StoreListActivity.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
|
||||
// Handle the camera action
|
||||
} else if (id == R.id.nav_download) {
|
||||
|
||||
@@ -144,8 +151,8 @@ public class MainActivity extends AppCompatActivity
|
||||
|
||||
} else if (id == R.id.nav_services) {
|
||||
|
||||
}else if (id == R.id.nav_setting) {
|
||||
|
||||
} else if (id == R.id.nav_setting) {
|
||||
startActivity(new Intent(MainActivity.this, CategoryListActivity.class));
|
||||
}
|
||||
|
||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
|
||||
@@ -13,6 +13,9 @@ public class CommonString {
|
||||
public static final String KEY_USERNAME = "username";
|
||||
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 KEY_PATH = "path";
|
||||
public static final String KEY_VERSION = "APP_VERSION";
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
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.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
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 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
|
||||
|
||||
ListView list;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String date,visit_status;
|
||||
GSKOrangeDB db;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.storelist);
|
||||
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(StoreListActivity.this);
|
||||
db.open();
|
||||
|
||||
|
||||
list = (ListView)findViewById(R .id.list_id);
|
||||
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
|
||||
if (storelist.size()>0) {
|
||||
list.setAdapter(new MyAdaptor());
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
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){
|
||||
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,6 +25,10 @@ import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
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;
|
||||
@@ -45,7 +49,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
private TextView percentage, message;
|
||||
Data data;
|
||||
int eventType;
|
||||
|
||||
GSKOrangeDB db;
|
||||
private SharedPreferences preferences = null;
|
||||
String userId, culture_id;
|
||||
|
||||
@@ -63,6 +67,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_download);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, null);
|
||||
@@ -74,8 +80,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
String name;
|
||||
}
|
||||
|
||||
private class UploadTask extends AsyncTask<Void , Data, String>{
|
||||
|
||||
private class UploadTask extends AsyncTask<Void, Data, String> {
|
||||
private Context context;
|
||||
|
||||
UploadTask(Context context) {
|
||||
@@ -95,75 +100,63 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
message = (TextView) dialog.findViewById(R.id.message);
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(Void... voids) {
|
||||
|
||||
try {
|
||||
|
||||
String resultHttp="";
|
||||
String resultHttp = "";
|
||||
data = new Data();
|
||||
|
||||
data.value = 10;
|
||||
data.name = "JCP Data Downloading";
|
||||
publishProgress(data);
|
||||
|
||||
XmlPullParserFactory factory = XmlPullParserFactory
|
||||
.newInstance();
|
||||
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
|
||||
factory.setNamespaceAware(true);
|
||||
XmlPullParser xpp = factory.newPullParser();
|
||||
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
SoapObject request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "JOURNEY_PLAN");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
|
||||
SoapEnvelope.VER11);
|
||||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(
|
||||
CommonString.URL);
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL,
|
||||
envelope);
|
||||
Object result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
|
||||
if (result.toString() != null) {
|
||||
//InputStream stream = new ByteArrayInputStream(result.toString().getBytes("UTF-8"));
|
||||
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
// xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
|
||||
// xpp.setInput(stream,"UTF-8");
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
// xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
|
||||
// xpp.setInput(stream,"UTF-8");
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
|
||||
jcpgettersetter = XMLHandlers.JCPXMLHandler(xpp, eventType);
|
||||
|
||||
if(jcpgettersetter.getSTORE_ID().size()>0){
|
||||
if (jcpgettersetter.getSTORE_ID().size() > 0) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
String jcpTable = jcpgettersetter.getTable_journey_plan();
|
||||
TableBean.setJourneyPlan(jcpTable);
|
||||
|
||||
}else{
|
||||
} else {
|
||||
return "JOURNEY_PLAN";
|
||||
}
|
||||
|
||||
data.value = 10;
|
||||
data.name = "JCP Data Downloading";
|
||||
|
||||
}
|
||||
publishProgress(data);
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
// Store List Master
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "SKU_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -173,36 +166,33 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
skumastergettersetter =XMLHandlers.skuMasterXMLHandler(xpp, eventType);
|
||||
if(skumastergettersetter.getSKU_ID().size()>0){
|
||||
skumastergettersetter = XMLHandlers.skuMasterXMLHandler(xpp, eventType);
|
||||
if (skumastergettersetter.getSKU_ID().size() > 0) {
|
||||
String skutable = skumastergettersetter.getTable_SKU_MASTER();
|
||||
if(skutable!=null){
|
||||
if (skutable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setSkuMaster(skutable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "SKU_MASTER";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "SKU_MASTER Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// BRAND_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// BRAND_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "BRAND_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -212,36 +202,33 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
brandMasterGetterSetter =XMLHandlers.brandMasterXMLHandler(xpp, eventType);
|
||||
if(brandMasterGetterSetter.getBRAND_ID().size()>0){
|
||||
brandMasterGetterSetter = XMLHandlers.brandMasterXMLHandler(xpp, eventType);
|
||||
if (brandMasterGetterSetter.getBRAND_ID().size() > 0) {
|
||||
String brandtable = brandMasterGetterSetter.getTable_BRAND_MASTER();
|
||||
if(brandtable!=null){
|
||||
if (brandtable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setBrandMaster(brandtable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "BRAND_MASTER";
|
||||
}
|
||||
|
||||
data.value = 30;
|
||||
data.name = "BRAND_MASTER Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// SUB_CATEGORY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// SUB_CATEGORY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "SUB_CATEGORY_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -251,36 +238,32 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
subCategoryMasterGetterSetter =XMLHandlers.subCategoryMasterXMLHandler(xpp, eventType);
|
||||
if(subCategoryMasterGetterSetter.getSUB_CATEGORY_ID().size()>0){
|
||||
subCategoryMasterGetterSetter = XMLHandlers.subCategoryMasterXMLHandler(xpp, eventType);
|
||||
if (subCategoryMasterGetterSetter.getSUB_CATEGORY_ID().size() > 0) {
|
||||
String categorytable = subCategoryMasterGetterSetter.getTable_SUB_CATEGORY_MASTER();
|
||||
if(categorytable!=null){
|
||||
if (categorytable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setSubCategoryMaster(categorytable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "SUB_CATEGORY_MASTER";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "SUB_CATEGORY_MASTER Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// CATEGORY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// CATEGORY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "CATEGORY_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -290,36 +273,32 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
categoryMasterGetterSetter =XMLHandlers.categoryMasterXMLHandler(xpp, eventType);
|
||||
if(categoryMasterGetterSetter.getCATEGORY_ID().size()>0){
|
||||
categoryMasterGetterSetter = XMLHandlers.categoryMasterXMLHandler(xpp, eventType);
|
||||
if (categoryMasterGetterSetter.getCATEGORY_ID().size() > 0) {
|
||||
String skutable = categoryMasterGetterSetter.getTable_CATEGORY_MASTER();
|
||||
if(skutable!=null){
|
||||
if (skutable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setCategoryMaster(skutable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "CATEGORY_MASTER";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "CATEGORY_MASTER Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// DISPLAY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// DISPLAY_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "DISPLAY_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -329,36 +308,32 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
displayMasterGetterSetter =XMLHandlers.displayMasterXMLHandler(xpp, eventType);
|
||||
if(displayMasterGetterSetter.getDISPLAY_ID().size()>0){
|
||||
displayMasterGetterSetter = XMLHandlers.displayMasterXMLHandler(xpp, eventType);
|
||||
if (displayMasterGetterSetter.getDISPLAY_ID().size() > 0) {
|
||||
String display_table = displayMasterGetterSetter.getTable_DISPLAY_MASTER();
|
||||
if(display_table!=null){
|
||||
if (display_table != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setDisplayMaster(display_table);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "DISPLAY_MASTER";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "DISPLAY_MASTER Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_STOCK
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// MAPPING_STOCK
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_STOCK");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -368,36 +343,32 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingStockGetterSetter =XMLHandlers.mappingStockXMLHandler(xpp, eventType);
|
||||
if(mappingStockGetterSetter.getSKU_ID().size()>0){
|
||||
mappingStockGetterSetter = XMLHandlers.mappingStockXMLHandler(xpp, eventType);
|
||||
if (mappingStockGetterSetter.getSKU_ID().size() > 0) {
|
||||
String stocktable = mappingStockGetterSetter.getTable_MAPPING_STOCK();
|
||||
if(stocktable!=null){
|
||||
if (stocktable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingStock(stocktable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "MAPPING_STOCK";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "MAPPING_STOCK Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
// MAPPING_T2P
|
||||
request = new SoapObject(CommonString.NAMESPACE,
|
||||
CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
|
||||
// MAPPING_T2P
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "MAPPING_T2P");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
@@ -407,62 +378,65 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
androidHttpTransport.call(
|
||||
CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
result = (Object) envelope.getResponse();
|
||||
|
||||
if(result.toString()!=null){
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
mappingt2PGetterSetter =XMLHandlers.mappingT2pXMLHandler(xpp, eventType);
|
||||
if(mappingt2PGetterSetter.getSTORE_ID().size()>0){
|
||||
mappingt2PGetterSetter = XMLHandlers.mappingT2pXMLHandler(xpp, eventType);
|
||||
if (mappingt2PGetterSetter.getSTORE_ID().size() > 0) {
|
||||
String t2ptable = mappingt2PGetterSetter.getTable_MAPPING_T2P();
|
||||
if(t2ptable!=null){
|
||||
if (t2ptable != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setMappingT2p(t2ptable);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return "MAPPING_T2P";
|
||||
}
|
||||
|
||||
data.value = 20;
|
||||
data.name = "MAPPING_T2P Data Download";
|
||||
}
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
}catch (MalformedURLException e) {
|
||||
|
||||
db.open();
|
||||
db.InsertJCP(jcpgettersetter);
|
||||
db.InsertCategory(categoryMasterGetterSetter);
|
||||
db.InsertSubCategoryMaster(subCategoryMasterGetterSetter);
|
||||
db.InsertBrandMaster(brandMasterGetterSetter);
|
||||
db.InsertSkuMaster(skumastergettersetter);
|
||||
db.InsertDisplayMaster(displayMasterGetterSetter);
|
||||
|
||||
db.InsertMAPPING_T2P(mappingt2PGetterSetter);
|
||||
db.InsertMappingStock(mappingStockGetterSetter);
|
||||
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_EXCEPTION, "download", e);*/
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// TODO Auto-generated method stub
|
||||
showAlert(CommonString.MESSAGE_EXCEPTION);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (IOException e) {
|
||||
/* final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_SOCKETEXCEPTION, "socket", e);*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
showAlert(CommonString.MESSAGE_SOCKETEXCEPTION);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
/* final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_EXCEPTION, "download", e);*/
|
||||
@@ -471,15 +445,12 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
e.printStackTrace();
|
||||
e.getCause();*/
|
||||
runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
showAlert(CommonString.MESSAGE_EXCEPTION);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -490,7 +461,6 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
pb.setProgress(values[0].value);
|
||||
percentage.setText(values[0].value + "%");
|
||||
message.setText(values[0].name);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -498,7 +468,6 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
super.onPostExecute(s);
|
||||
|
||||
dialog.dismiss();
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
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.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryGetterSetter;
|
||||
|
||||
public class CategoryListActivity extends AppCompatActivity {
|
||||
RecyclerView recyclerView;
|
||||
ArrayList<CategoryGetterSetter> categoryList;
|
||||
CategoryListAdapter adapter;
|
||||
TextView txt_categoryName;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_category_list);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
txt_categoryName.setText("Category List");
|
||||
|
||||
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();
|
||||
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
CategoryGetterSetter data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Oral Health");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Nutritionals");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new CategoryGetterSetter();
|
||||
data.setCategory_name("Wellness");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
adapter = new CategoryListAdapter(CategoryListActivity.this, categoryList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
||||
}
|
||||
|
||||
public class CategoryListAdapter extends RecyclerView.Adapter<CategoryListAdapter.MyViewHolder> {
|
||||
private LayoutInflater inflator;
|
||||
List<CategoryGetterSetter> list = Collections.emptyList();
|
||||
Context context;
|
||||
|
||||
public CategoryListAdapter(CategoryListActivity context, List<CategoryGetterSetter> list) {
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.list = list;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CategoryListAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
View view = inflator.inflate(R.layout.category_menu_row, parent, false);
|
||||
MyViewHolder holder = new MyViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MyViewHolder holder, int position) {
|
||||
final CategoryGetterSetter categoryData = list.get(position);
|
||||
|
||||
holder.categoryName.setText(categoryData.getCategory_name());
|
||||
holder.categoryIcon.setImageResource(categoryData.getCategory_img());
|
||||
|
||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(CategoryListActivity.this, CategoryWisePerformanceActivity.class);
|
||||
intent.putExtra("categoryName", categoryData.getCategory_name());
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView categoryName;
|
||||
ImageView categoryIcon;
|
||||
LinearLayout lay_menu;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
categoryName = (TextView) itemView.findViewById(R.id.categoryName);
|
||||
categoryIcon = (ImageView) itemView.findViewById(R.id.categoryIcon);
|
||||
lay_menu = (LinearLayout) itemView.findViewById(R.id.lay_menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
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.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||
|
||||
public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
TextView txt_categoryName;
|
||||
RecyclerView recyclerView;
|
||||
|
||||
String categoryName = "";
|
||||
|
||||
ArrayList<CategoryWisePerformaceGetterSetter> categoryWisePerformanceList;
|
||||
CategoryWisePerformaceAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_category_wise_performance);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
|
||||
txt_categoryName.setText("CategoryWise Performance " + categoryName);
|
||||
|
||||
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();*/
|
||||
Intent intent = new Intent(CategoryWisePerformanceActivity.this, DailyDataMenuActivity.class);
|
||||
intent.putExtra("categoryName", categoryName);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
categoryWisePerformanceList = new ArrayList<>();
|
||||
CategoryWisePerformaceGetterSetter data = new CategoryWisePerformaceGetterSetter();
|
||||
|
||||
data.setPeriod("Period");
|
||||
data.setSos("SOS");
|
||||
data.setT2p("T2P");
|
||||
data.setPromo("Promo");
|
||||
data.setMsl_availability("MSL Availability");
|
||||
data.setOss("OSS");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("LTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("MTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("RTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("LTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("MTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
data = new CategoryWisePerformaceGetterSetter();
|
||||
data.setPeriod("RTM");
|
||||
data.setSos("75");
|
||||
data.setT2p("0");
|
||||
data.setPromo("0");
|
||||
data.setMsl_availability("25");
|
||||
data.setOss("55");
|
||||
categoryWisePerformanceList.add(data);
|
||||
|
||||
adapter = new CategoryWisePerformaceAdapter(CategoryWisePerformanceActivity.this, categoryWisePerformanceList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
}
|
||||
|
||||
public class CategoryWisePerformaceAdapter extends RecyclerView.Adapter<CategoryWisePerformaceAdapter.MyViewHolder> {
|
||||
Context context;
|
||||
private LayoutInflater inflator;
|
||||
List<CategoryWisePerformaceGetterSetter> list = Collections.emptyList();
|
||||
|
||||
public CategoryWisePerformaceAdapter(Context context, List<CategoryWisePerformaceGetterSetter> list) {
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.list = list;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CategoryWisePerformaceAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
View view = inflator.inflate(R.layout.item_category_wise_performance, parent, false);
|
||||
CategoryWisePerformaceAdapter.MyViewHolder holder = new CategoryWisePerformaceAdapter.MyViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(CategoryWisePerformaceAdapter.MyViewHolder holder, int position) {
|
||||
final CategoryWisePerformaceGetterSetter categoryData = list.get(position);
|
||||
|
||||
holder.txt_period.setText(categoryData.getPeriod());
|
||||
holder.txt_sos.setText(categoryData.getSos());
|
||||
holder.txt_t2p.setText(categoryData.getT2p());
|
||||
holder.txt_promo.setText(categoryData.getPromo());
|
||||
holder.txt_msl_availability.setText(categoryData.getMsl_availability());
|
||||
holder.txt_oss.setText(categoryData.getOss());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView txt_period, txt_sos, txt_t2p, txt_promo, txt_msl_availability, txt_oss;
|
||||
LinearLayout lay_menu;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
lay_menu = (LinearLayout) itemView.findViewById(R.id.lay_menu);
|
||||
txt_period = (TextView) itemView.findViewById(R.id.txt_period);
|
||||
txt_sos = (TextView) itemView.findViewById(R.id.txt_sos);
|
||||
txt_t2p = (TextView) itemView.findViewById(R.id.txt_t2p);
|
||||
txt_promo = (TextView) itemView.findViewById(R.id.txt_promo);
|
||||
txt_msl_availability = (TextView) itemView.findViewById(R.id.txt_msl_availability);
|
||||
txt_oss = (TextView) itemView.findViewById(R.id.txt_oss);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
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.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DailyDataMenuGetterSetter;
|
||||
|
||||
public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
RecyclerView recyclerView;
|
||||
ArrayList<DailyDataMenuGetterSetter> categoryList;
|
||||
DailyDataMenuAdapter adapter;
|
||||
TextView txt_categoryName;
|
||||
String categoryName = "";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_daily_data_menu);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
|
||||
txt_categoryName = (TextView) findViewById(R.id.txt_categoryName);
|
||||
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
|
||||
txt_categoryName.setText("Daily Data Menu - " + categoryName);
|
||||
|
||||
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();
|
||||
|
||||
categoryList = new ArrayList<>();
|
||||
|
||||
DailyDataMenuGetterSetter data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("MSL Availability");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Stock & Facing");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("T2P Compliance");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Additional Visibility");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Promo Compliance");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Competition Visibility");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
data = new DailyDataMenuGetterSetter();
|
||||
data.setCategory_name("Competition Promo");
|
||||
data.setCategory_img(R.drawable.category);
|
||||
categoryList.add(data);
|
||||
|
||||
adapter = new DailyDataMenuAdapter(DailyDataMenuActivity.this, categoryList);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
|
||||
}
|
||||
|
||||
public class DailyDataMenuAdapter extends RecyclerView.Adapter<DailyDataMenuAdapter.MyViewHolder> {
|
||||
private LayoutInflater inflator;
|
||||
List<DailyDataMenuGetterSetter> list = Collections.emptyList();
|
||||
Context context;
|
||||
|
||||
public DailyDataMenuAdapter(Context context, List<DailyDataMenuGetterSetter> list) {
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.list = list;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DailyDataMenuAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
View view = inflator.inflate(R.layout.daily_main_menu_row, parent, false);
|
||||
DailyDataMenuAdapter.MyViewHolder holder = new DailyDataMenuAdapter.MyViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(DailyDataMenuAdapter.MyViewHolder holder, int position) {
|
||||
final DailyDataMenuGetterSetter dailyData = list.get(position);
|
||||
|
||||
holder.categoryName.setText(dailyData.getCategory_name());
|
||||
holder.categoryIcon.setImageResource(dailyData.getCategory_img());
|
||||
|
||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (dailyData.getCategory_name().equalsIgnoreCase("MSL Availability")) {
|
||||
Intent intent = new Intent(DailyDataMenuActivity.this, MSL_AvailabilityActivity.class);
|
||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||
startActivity(intent);
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase("Stock & Facing")) {
|
||||
Intent intent1 = new Intent(DailyDataMenuActivity.this, Stock_FacingActivity.class);
|
||||
intent1.putExtra("categoryName", dailyData.getCategory_name());
|
||||
startActivity(intent1);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView categoryName;
|
||||
ImageView categoryIcon;
|
||||
LinearLayout lay_menu;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
categoryName = (TextView) itemView.findViewById(R.id.categoryName);
|
||||
categoryIcon = (ImageView) itemView.findViewById(R.id.categoryIcon);
|
||||
lay_menu = (LinearLayout) itemView.findViewById(R.id.lay_menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,360 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
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.CardView;
|
||||
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.inputmethod.InputMethodManager;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
|
||||
public class MSL_AvailabilityActivity extends AppCompatActivity {
|
||||
ExpandableListView expandableListView;
|
||||
TextView txt_mslAvailabilityName;
|
||||
|
||||
ArrayList<MSL_AvailabilityGetterSetter> headerDataList;
|
||||
ArrayList<MSL_AvailabilityGetterSetter> childDataList;
|
||||
List<MSL_AvailabilityGetterSetter> hashMapListHeaderData;
|
||||
HashMap<MSL_AvailabilityGetterSetter, List<MSL_AvailabilityGetterSetter>> hashMapListChildData;
|
||||
|
||||
ExpandableListAdapter adapter;
|
||||
|
||||
String title;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_msl__availability);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
txt_mslAvailabilityName = (TextView) findViewById(R.id.txt_mslAvailabilityName);
|
||||
|
||||
title = getIntent().getStringExtra("categoryName");
|
||||
txt_mslAvailabilityName.setText(title);
|
||||
|
||||
prepareList();
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
expandableListView.invalidateViews();
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group click listener
|
||||
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||
@Override
|
||||
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group expanded listener
|
||||
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||
@Override
|
||||
public void onGroupExpand(int groupPosition) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getWindow().getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group collasped listener
|
||||
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||
@Override
|
||||
public void onGroupCollapse(int groupPosition) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getWindow().getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Listview on child click listener
|
||||
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||
@Override
|
||||
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||
int childPosition, long id) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
headerDataList = new ArrayList<>();
|
||||
|
||||
MSL_AvailabilityGetterSetter msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 3");
|
||||
msl.setMbq("3");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax header 4");
|
||||
msl.setMbq("4");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
|
||||
hashMapListHeaderData = new ArrayList<>();
|
||||
hashMapListChildData = new HashMap<>();
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
childDataList = new ArrayList<>();
|
||||
|
||||
MSL_AvailabilityGetterSetter msl1 = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
msl1 = new MSL_AvailabilityGetterSetter();
|
||||
msl.setBrandName("Parodontax 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
adapter = new ExpandableListAdapter(this, hashMapListHeaderData, hashMapListChildData);
|
||||
expandableListView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
private Context _context;
|
||||
private List<MSL_AvailabilityGetterSetter> _listDataHeader;
|
||||
private HashMap<MSL_AvailabilityGetterSetter, List<MSL_AvailabilityGetterSetter>> _listDataChild;
|
||||
|
||||
public ExpandableListAdapter(Context context, List<MSL_AvailabilityGetterSetter> listDataHeader,
|
||||
HashMap<MSL_AvailabilityGetterSetter, List<MSL_AvailabilityGetterSetter>> listChildData) {
|
||||
this._context = context;
|
||||
this._listDataHeader = listDataHeader;
|
||||
this._listDataChild = listChildData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getGroup(int groupPosition) {
|
||||
return this._listDataHeader.get(groupPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGroupCount() {
|
||||
return this._listDataHeader.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getGroupId(int groupPosition) {
|
||||
return groupPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||
MSL_AvailabilityGetterSetter headerTitle = (MSL_AvailabilityGetterSetter) getGroup(groupPosition);
|
||||
|
||||
if (convertView == null) {
|
||||
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = infalInflater.inflate(R.layout.item_msl_availability_header, null, false);
|
||||
}
|
||||
|
||||
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||
|
||||
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||
txt_categoryHeader.setText(headerTitle.getBrandName());
|
||||
|
||||
/*img_camera.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String date = new Date().toLocaleString().toString();
|
||||
String TempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||
|
||||
_pathforcheck = "Stock" + headerTitle.getBrand_cd() + "_" + store_cd + "_" + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = groupPosition;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity(groupPosition);
|
||||
}
|
||||
});
|
||||
|
||||
if (!img1.equalsIgnoreCase("")) {
|
||||
if (groupPosition == child_position) {
|
||||
headerTitle.setImg_cam(img1);
|
||||
img1 = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (headerTitle.getImg_cam().equals("")) {
|
||||
img_camera.setBackgroundResource(R.drawable.cam);
|
||||
} else {
|
||||
img_camera.setBackgroundResource(R.drawable.camtick);
|
||||
}
|
||||
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
txt_header.setTextColor(getResources().getColor(R.color.red));
|
||||
} else {
|
||||
txt_header.setTextColor(getResources().getColor(R.color.grey_dark));
|
||||
}
|
||||
}*/
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getChild(int groupPosition, int childPosititon) {
|
||||
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildrenCount(int groupPosition) {
|
||||
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getChildId(int groupPosition, int childPosition) {
|
||||
return childPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
MSL_AvailabilityGetterSetter childData = (MSL_AvailabilityGetterSetter) getChild(groupPosition, childPosition);
|
||||
ViewHolder holder = null;
|
||||
|
||||
if (convertView == null) {
|
||||
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = infalInflater.inflate(R.layout.item_msl_availability_child, null, false);
|
||||
|
||||
holder = new ViewHolder();
|
||||
holder.cardView = (CardView) convertView.findViewById(R.id.card_view);
|
||||
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||
|
||||
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||
holder.ed_mbq = (EditText) convertView.findViewById(R.id.ed_mbq);
|
||||
holder.toggle_available = (ToggleButton) convertView.findViewById(R.id.toggle_available);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.txt_skuName.setText(childData.getBrandName());
|
||||
holder.ed_mbq.setText(childData.getMbq());
|
||||
|
||||
holder.toggle_available.setTextOff("No");
|
||||
holder.toggle_available.setTextOn("Yes");
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStableIds() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class ViewHolder {
|
||||
EditText ed_mbq;
|
||||
CardView cardView;
|
||||
TextView txt_skuName;
|
||||
ToggleButton toggle_available;
|
||||
LinearLayout lin_category;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,467 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.BaseExpandableListAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
|
||||
public class Stock_FacingActivity extends AppCompatActivity {
|
||||
ExpandableListView expandableListView;
|
||||
TextView txt_stockFacingName;
|
||||
|
||||
ArrayList<Stock_FacingGetterSetter> headerDataList;
|
||||
ArrayList<Stock_FacingGetterSetter> childDataList;
|
||||
List<Stock_FacingGetterSetter> hashMapListHeaderData;
|
||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> hashMapListChildData;
|
||||
|
||||
ExpandableListAdapter adapter;
|
||||
|
||||
String title;
|
||||
|
||||
String path = "", str = "", _pathforcheck = "", img1 = "";
|
||||
static int child_position = -1;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_stock_facing);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
expandableListView = (ExpandableListView) findViewById(R.id.expandableListView);
|
||||
txt_stockFacingName = (TextView) findViewById(R.id.txt_stockFacingName);
|
||||
|
||||
title = getIntent().getStringExtra("categoryName");
|
||||
txt_stockFacingName.setText(title);
|
||||
|
||||
prepareList();
|
||||
|
||||
str = Environment.getExternalStorageState();
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
expandableListView.setOnScrollListener(new AbsListView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrollStateChanged(AbsListView arg0, int arg1) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
|
||||
expandableListView.invalidateViews();
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group click listener
|
||||
expandableListView.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
|
||||
@Override
|
||||
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group expanded listener
|
||||
expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
|
||||
@Override
|
||||
public void onGroupExpand(int groupPosition) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getWindow().getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Listview Group collasped listener
|
||||
expandableListView.setOnGroupCollapseListener(new ExpandableListView.OnGroupCollapseListener() {
|
||||
@Override
|
||||
public void onGroupCollapse(int groupPosition) {
|
||||
InputMethodManager inputManager = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (getWindow().getCurrentFocus() != null) {
|
||||
inputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
getCurrentFocus().clearFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Listview on child click listener
|
||||
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
|
||||
@Override
|
||||
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||
int childPosition, long id) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void prepareList() {
|
||||
headerDataList = new ArrayList<>();
|
||||
|
||||
Stock_FacingGetterSetter msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 3");
|
||||
msl.setMbq("3");
|
||||
msl.setAvailable("Yes");
|
||||
headerDataList.add(msl);
|
||||
|
||||
msl = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax header 4");
|
||||
msl.setMbq("4");
|
||||
msl.setAvailable("No");
|
||||
headerDataList.add(msl);
|
||||
|
||||
|
||||
hashMapListHeaderData = new ArrayList<>();
|
||||
hashMapListChildData = new HashMap<>();
|
||||
|
||||
if (headerDataList.size() > 0) {
|
||||
|
||||
for (int i = 0; i < headerDataList.size(); i++) {
|
||||
hashMapListHeaderData.add(headerDataList.get(i));
|
||||
|
||||
childDataList = new ArrayList<>();
|
||||
|
||||
Stock_FacingGetterSetter msl1 = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax 1");
|
||||
msl.setMbq("1");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
msl1 = new Stock_FacingGetterSetter();
|
||||
msl.setBrandName("Parodontax 2");
|
||||
msl.setMbq("2");
|
||||
msl.setAvailable("No");
|
||||
childDataList.add(msl1);
|
||||
|
||||
hashMapListChildData.put(hashMapListHeaderData.get(i), childDataList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
adapter = new ExpandableListAdapter(this, hashMapListHeaderData, hashMapListChildData);
|
||||
expandableListView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
public class ExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
private Context _context;
|
||||
private List<Stock_FacingGetterSetter> _listDataHeader;
|
||||
private HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> _listDataChild;
|
||||
|
||||
public ExpandableListAdapter(Context context, List<Stock_FacingGetterSetter> listDataHeader,
|
||||
HashMap<Stock_FacingGetterSetter, List<Stock_FacingGetterSetter>> listChildData) {
|
||||
this._context = context;
|
||||
this._listDataHeader = listDataHeader;
|
||||
this._listDataChild = listChildData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getGroup(int groupPosition) {
|
||||
return this._listDataHeader.get(groupPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGroupCount() {
|
||||
return this._listDataHeader.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getGroupId(int groupPosition) {
|
||||
return groupPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getGroupView(final int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
|
||||
final Stock_FacingGetterSetter headerTitle = (Stock_FacingGetterSetter) getGroup(groupPosition);
|
||||
|
||||
if (convertView == null) {
|
||||
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = infalInflater.inflate(R.layout.item_stock_facing_header, null, false);
|
||||
}
|
||||
|
||||
TextView txt_stockFaceupHeader = (TextView) convertView.findViewById(R.id.txt_stockFaceupHeader);
|
||||
LinearLayout lin_stockFaceupHeader = (LinearLayout) convertView.findViewById(R.id.lin_stockFaceupHeader);
|
||||
ImageView img_reference = (ImageView) convertView.findViewById(R.id.img_reference);
|
||||
ImageView img_camera1 = (ImageView) convertView.findViewById(R.id.img_camera1);
|
||||
ImageView img_camera2 = (ImageView) convertView.findViewById(R.id.img_camera2);
|
||||
ImageView img_edit = (ImageView) convertView.findViewById(R.id.img_edit);
|
||||
|
||||
txt_stockFaceupHeader.setTypeface(null, Typeface.BOLD);
|
||||
txt_stockFaceupHeader.setText(headerTitle.getBrandName());
|
||||
|
||||
img_camera1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String date = new Date().toLocaleString().toString();
|
||||
String tempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||
|
||||
_pathforcheck = "Stock Camera1_" + tempDate + ".jpg";
|
||||
child_position = groupPosition;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity(groupPosition);
|
||||
}
|
||||
});
|
||||
|
||||
if (!img1.equalsIgnoreCase("")) {
|
||||
if (groupPosition == child_position) {
|
||||
//headerTitle.setImg_cam(img1);
|
||||
img1 = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*if (headerTitle.getImg_cam().equals("")) {
|
||||
img_camera1.setBackgroundResource(R.drawable.ic_menu_camera);
|
||||
} else {
|
||||
//img_camera1.setBackgroundResource(R.drawable.camtick);
|
||||
}*/
|
||||
|
||||
/*img_camera.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String date = new Date().toLocaleString().toString();
|
||||
String TempDate = new Date().toLocaleString().toString().replace(' ', '_').replace(',', '_').replace(':', '-');
|
||||
|
||||
_pathforcheck = "Stock" + headerTitle.getBrand_cd() + "_" + store_cd + "_" + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
child_position = groupPosition;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity(groupPosition);
|
||||
}
|
||||
});
|
||||
|
||||
if (!img1.equalsIgnoreCase("")) {
|
||||
if (groupPosition == child_position) {
|
||||
headerTitle.setImg_cam(img1);
|
||||
img1 = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (headerTitle.getImg_cam().equals("")) {
|
||||
img_camera.setBackgroundResource(R.drawable.cam);
|
||||
} else {
|
||||
img_camera.setBackgroundResource(R.drawable.camtick);
|
||||
}
|
||||
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
txt_header.setTextColor(getResources().getColor(R.color.red));
|
||||
} else {
|
||||
txt_header.setTextColor(getResources().getColor(R.color.grey_dark));
|
||||
}
|
||||
}*/
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getChild(int groupPosition, int childPosititon) {
|
||||
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).get(childPosititon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getChildrenCount(int groupPosition) {
|
||||
return this._listDataChild.get(this._listDataHeader.get(groupPosition)).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getChildId(int groupPosition, int childPosition) {
|
||||
return childPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
Stock_FacingGetterSetter childData = (Stock_FacingGetterSetter) getChild(groupPosition, childPosition);
|
||||
ViewHolder holder = null;
|
||||
|
||||
if (convertView == null) {
|
||||
LayoutInflater infalInflater = (LayoutInflater) this._context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = infalInflater.inflate(R.layout.item_stock_facing_child, null, false);
|
||||
|
||||
holder = new ViewHolder();
|
||||
holder.cardView = (CardView) convertView.findViewById(R.id.card_view);
|
||||
holder.lin_category = (LinearLayout) convertView.findViewById(R.id.lin_category);
|
||||
|
||||
holder.txt_skuName = (TextView) convertView.findViewById(R.id.txt_skuName);
|
||||
holder.ed_stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
||||
holder.ed_facing = (EditText) convertView.findViewById(R.id.ed_facing);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
|
||||
holder.txt_skuName.setText(childData.getBrandName());
|
||||
holder.ed_stock.setText(childData.getMbq());
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasStableIds() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChildSelectable(int groupPosition, int childPosition) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class ViewHolder {
|
||||
EditText ed_stock, ed_facing;
|
||||
CardView cardView;
|
||||
TextView txt_skuName;
|
||||
LinearLayout lin_category;
|
||||
}
|
||||
|
||||
private void startCameraActivity(int position) {
|
||||
try {
|
||||
Log.e("Stock & Facing ", "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.d("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
// Log.d("TAG", "package name : " + list.get(n).packageName);
|
||||
if (list.get(n).loadLabel(packageManager).toString().equalsIgnoreCase("Camera")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, position);*/
|
||||
|
||||
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
startActivityForResult(intent, position);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
Log.e("Stock & Facing", "resultCode: " + resultCode);
|
||||
switch (resultCode) {
|
||||
case 0:
|
||||
Log.e("Stock & Facing", "User cancelled");
|
||||
break;
|
||||
case -1:
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
img1 = _pathforcheck;
|
||||
//adapter.notifyDataSetChanged();
|
||||
_pathforcheck = "";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
public String getCurrentTime() {
|
||||
Calendar m_cal = Calendar.getInstance();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
|
||||
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 boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == android.R.id.home) {
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by gagang on 22-12-2016.
|
||||
*/
|
||||
|
||||
public class CategoryGetterSetter {
|
||||
|
||||
String category_name;
|
||||
int category_img = -1;
|
||||
|
||||
public String getCategory_name() {
|
||||
return category_name;
|
||||
}
|
||||
|
||||
public void setCategory_name(String category_name) {
|
||||
this.category_name = category_name;
|
||||
}
|
||||
|
||||
public int getCategory_img() {
|
||||
return category_img;
|
||||
}
|
||||
|
||||
public void setCategory_img(int category_img) {
|
||||
this.category_img = category_img;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by gagang on 23-12-2016.
|
||||
*/
|
||||
|
||||
public class CategoryWisePerformaceGetterSetter {
|
||||
String period, sos, t2p, promo, msl_availability, oss;
|
||||
|
||||
public String getPeriod() {
|
||||
return period;
|
||||
}
|
||||
|
||||
public void setPeriod(String period) {
|
||||
this.period = period;
|
||||
}
|
||||
|
||||
public String getSos() {
|
||||
return sos;
|
||||
}
|
||||
|
||||
public void setSos(String sos) {
|
||||
this.sos = sos;
|
||||
}
|
||||
|
||||
public String getT2p() {
|
||||
return t2p;
|
||||
}
|
||||
|
||||
public void setT2p(String t2p) {
|
||||
this.t2p = t2p;
|
||||
}
|
||||
|
||||
public String getPromo() {
|
||||
return promo;
|
||||
}
|
||||
|
||||
public void setPromo(String promo) {
|
||||
this.promo = promo;
|
||||
}
|
||||
|
||||
public String getMsl_availability() {
|
||||
return msl_availability;
|
||||
}
|
||||
|
||||
public void setMsl_availability(String msl_availability) {
|
||||
this.msl_availability = msl_availability;
|
||||
}
|
||||
|
||||
public String getOss() {
|
||||
return oss;
|
||||
}
|
||||
|
||||
public void setOss(String oss) {
|
||||
this.oss = oss;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by gagang on 22-12-2016.
|
||||
*/
|
||||
|
||||
public class DailyDataMenuGetterSetter {
|
||||
|
||||
String category_name;
|
||||
int category_img = -1;
|
||||
|
||||
public String getCategory_name() {
|
||||
return category_name;
|
||||
}
|
||||
|
||||
public void setCategory_name(String category_name) {
|
||||
this.category_name = category_name;
|
||||
}
|
||||
|
||||
public int getCategory_img() {
|
||||
return category_img;
|
||||
}
|
||||
|
||||
public void setCategory_img(int category_img) {
|
||||
this.category_img = category_img;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by gagang on 23-12-2016.
|
||||
*/
|
||||
|
||||
public class MSL_AvailabilityGetterSetter {
|
||||
String brandName, mbq, available;
|
||||
|
||||
public String getBrandName() {
|
||||
return brandName;
|
||||
}
|
||||
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
}
|
||||
|
||||
public String getMbq() {
|
||||
return mbq;
|
||||
}
|
||||
|
||||
public void setMbq(String mbq) {
|
||||
this.mbq = mbq;
|
||||
}
|
||||
|
||||
public String getAvailable() {
|
||||
return available;
|
||||
}
|
||||
|
||||
public void setAvailable(String available) {
|
||||
this.available = available;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 28-12-2016.
|
||||
*/
|
||||
|
||||
public class SkuGetterSetter {
|
||||
String SKU_ID, SKU, BRAND_ID, MRP, SKU_SEQUENCE;
|
||||
|
||||
public String getSKU_ID() {
|
||||
return SKU_ID;
|
||||
}
|
||||
|
||||
public void setSKU_ID(String SKU_ID) {
|
||||
this.SKU_ID = SKU_ID;
|
||||
}
|
||||
|
||||
public String getSKU() {
|
||||
return SKU;
|
||||
}
|
||||
|
||||
public void setSKU(String SKU) {
|
||||
this.SKU = SKU;
|
||||
}
|
||||
|
||||
public String getBRAND_ID() {
|
||||
return BRAND_ID;
|
||||
}
|
||||
|
||||
public void setBRAND_ID(String BRAND_ID) {
|
||||
this.BRAND_ID = BRAND_ID;
|
||||
}
|
||||
|
||||
public String getMRP() {
|
||||
return MRP;
|
||||
}
|
||||
|
||||
public void setMRP(String MRP) {
|
||||
this.MRP = MRP;
|
||||
}
|
||||
|
||||
public String getSKU_SEQUENCE() {
|
||||
return SKU_SEQUENCE;
|
||||
}
|
||||
|
||||
public void setSKU_SEQUENCE(String SKU_SEQUENCE) {
|
||||
this.SKU_SEQUENCE = SKU_SEQUENCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by gagang on 23-12-2016.
|
||||
*/
|
||||
|
||||
public class Stock_FacingGetterSetter {
|
||||
String brandName, mbq, available;
|
||||
|
||||
public String getBrandName() {
|
||||
return brandName;
|
||||
}
|
||||
|
||||
public void setBrandName(String brandName) {
|
||||
this.brandName = brandName;
|
||||
}
|
||||
|
||||
public String getMbq() {
|
||||
return mbq;
|
||||
}
|
||||
|
||||
public void setMbq(String mbq) {
|
||||
this.mbq = mbq;
|
||||
}
|
||||
|
||||
public String getAvailable() {
|
||||
return available;
|
||||
}
|
||||
|
||||
public void setAvailable(String available) {
|
||||
this.available = available;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerColor="#fdfdfd"
|
||||
android:endColor="#d3dfe8"
|
||||
android:startColor="#e8eef4" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#b7ccdd" />
|
||||
|
||||
<padding
|
||||
android:bottom="6dp"
|
||||
android:left="6dp"
|
||||
android:right="6dp"
|
||||
android:top="6dp" />
|
||||
|
||||
<margin
|
||||
android:bottom="15dp"
|
||||
android:left="15dp"
|
||||
android:right="15dp"
|
||||
android:top="15dp" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerColor="#f5cd4a"
|
||||
android:endColor="#e8c34e"
|
||||
android:startColor="#ffe181" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#e3b52c" />
|
||||
|
||||
<padding
|
||||
android:bottom="6dp"
|
||||
android:left="6dp"
|
||||
android:right="6dp"
|
||||
android:top="6dp" />
|
||||
|
||||
<margin
|
||||
android:bottom="15dp"
|
||||
android:left="15dp"
|
||||
android:right="15dp"
|
||||
android:top="15dp" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/gradient_bg" android:state_pressed="false" android:state_selected="false"/>
|
||||
<item android:drawable="@drawable/gradient_bg_hover" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/gradient_bg_hover" android:state_pressed="false" android:state_selected="true"/>
|
||||
|
||||
</selector>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 8.0 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">
|
||||
|
||||
<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_category_list" />
|
||||
|
||||
<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"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</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">
|
||||
|
||||
<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_category_wise_performance" />
|
||||
|
||||
<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"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</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">
|
||||
|
||||
<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_daily_main_menu" />
|
||||
|
||||
<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"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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.GeoTag.GeoTagActivity">
|
||||
|
||||
<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_geo_tag" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@android:drawable/ic_menu_save"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/camrabtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<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_msl__availability" />
|
||||
|
||||
<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"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<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_stock_facing" />
|
||||
|
||||
<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"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
card_view:cardBackgroundColor="@android:color/white"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="2">
|
||||
<!--android:weightSum="10"-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/categoryIcon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/category" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/categoryName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFF"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="Category List"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="#f2711f"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_category_list">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_categoryName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF1710F"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Category Performance"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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_category_wise_performance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_category_wise_performance">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_categoryName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF1710F"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Category Performance"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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_daily_main_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_daily_data_menu">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_categoryName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF1710F"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Category Performance"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<fragment 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:name="com.google.android.gms.maps.SupportMapFragment"
|
||||
android:id="@+id/map"
|
||||
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.GeoTag.GeoTagActivity"
|
||||
tools:showIn="@layout/activity_geo_tag">
|
||||
|
||||
</fragment>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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_msl__availability"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_msl__availability">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_mslAvailabilityName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF1710F"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Must Have Availability"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="MBQ"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Available"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/expandableListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:cacheColorHint="#00000000"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
android:scrollingCache="false" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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_msl__availability"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_msl__availability">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_stockFacingName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFF1710F"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:text="Stock Facing"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@android:color/black" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Stock"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Faceup"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/expandableListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:cacheColorHint="#00000000"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
android:scrollingCache="false" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
card_view:cardBackgroundColor="@android:color/white"
|
||||
card_view:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="2">
|
||||
<!--android:weightSum="10"-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/categoryIcon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/category" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/categoryName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#FFF"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="Category List"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:textColor="#f2711f"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,133 @@
|
||||
<?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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lay_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="30">
|
||||
<!--android:background="#F1E9E9"-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_period"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Period"
|
||||
android:textColor="#000"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f2711f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_sos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SOS"
|
||||
android:textColor="#000"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f2711f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_t2p"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="T2P"
|
||||
android:textColor="#000"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f2711f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_promo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Promo"
|
||||
android:textColor="#000"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f2711f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_msl_availability"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="MSL Availability"
|
||||
android:textColor="#000"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#f2711f" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_oss"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="5"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="OSS"
|
||||
android:textColor="#000"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#888" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
card_view:cardCornerRadius="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_skuName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU Name Value "
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="MBQ"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_mbq"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Available"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/toggle_available"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="5dp"
|
||||
card_view:cardBackgroundColor="@color/grey_background"
|
||||
card_view:cardCornerRadius="10dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rel_categoryHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_categoryHeader"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:text="Brand Name "
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_camera"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="30dp"
|
||||
android:src="@drawable/ic_menu_camera"
|
||||
android:visibility="invisible" />
|
||||
</RelativeLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
card_view:cardCornerRadius="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="5">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2.5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_skuName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="SKU Name Value "
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Stock"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_stock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.25"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!--<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Faceup"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />-->
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_facing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:inputType="number"
|
||||
android:maxLength="7"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="5dp"
|
||||
card_view:cardBackgroundColor="@color/grey_background"
|
||||
card_view:cardCornerRadius="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_stockFaceupHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_stockFaceupHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="25dp"
|
||||
android:paddingRight="5dp"
|
||||
android:text="Brand Name "
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_reference"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@android:drawable/btn_star_big_off" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_camera1"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_menu_camera" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_camera2"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_menu_camera" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_edit"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:src="@android:drawable/ic_menu_edit" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,81 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
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: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>
|
||||
|
||||
|
||||
|
||||
<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:visibility="gone"
|
||||
android:background="#ff9933"
|
||||
android:padding="5sp">
|
||||
|
||||
<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
|
||||
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" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?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>
|
||||
|
||||
<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.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"
|
||||
>
|
||||
</ListView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/no_data_lay"
|
||||
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.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>
|
||||
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<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:background="@drawable/list_selector"
|
||||
android:padding="10sp">
|
||||
|
||||
<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="@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" />
|
||||
|
||||
<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" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -18,6 +18,11 @@
|
||||
android:id="@+id/nav_geotag"
|
||||
android:icon="@drawable/ic_menu_manage"
|
||||
android:title="@string/menu_geotag" />
|
||||
<item
|
||||
android:id="@+id/nav_export"
|
||||
android:icon="@drawable/ic_menu_share"
|
||||
android:title="@string/menu_export" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_exit"
|
||||
android:icon="@drawable/ic_menu_send"
|
||||
|
||||
@@ -24,12 +24,22 @@
|
||||
<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="menu_daily_route_plan">Daily Route Plan</string>
|
||||
<string name="menu_daily_download">Daily Data Download</string>
|
||||
<string name="menu_upload_data">Upload Data</string>
|
||||
<string name="menu_geotag">Geo Tag</string>
|
||||
<string name="menu_export">Data Export</string>
|
||||
|
||||
<string name="menu_exit">Exit</string>
|
||||
<string name="menu_setting">Setting</string>
|
||||
<string name="menu_services">Services</string>
|
||||
|
||||
<string name="title_activity_category_list">Category List</string>
|
||||
<string name="title_activity_category_wise_performance">CategoryWise Performance</string>
|
||||
<string name="title_activity_daily_main_menu">DailyMainMenuActivity</string>
|
||||
<string name="title_activity_msl__availability">MSL_AvailabilityActivity</string>
|
||||
|
||||
</resources>
|
||||
|
||||