no camera added
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -12,11 +12,11 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "cpm.com.gskmtorange"
|
||||
minSdkVersion 15
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 22
|
||||
|
||||
versionCode 10
|
||||
versionName "2.3"
|
||||
versionCode 11
|
||||
versionName "2.4"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -202,7 +202,20 @@
|
||||
android:name=".dailyentry.FutureJCPActivity"
|
||||
android:label=""
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name=".dailyentry.CreateSelfActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_create_self"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name=".dailyentry.NoCameraActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_create_self"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" ></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -43,11 +43,13 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingDisplayChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingPromotionGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingStockGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGroupMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
@@ -62,7 +64,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
*/
|
||||
|
||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB5";
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB12";
|
||||
public static final int DATABASE_VERSION = 13;
|
||||
TableBean tableBean;
|
||||
private SQLiteDatabase db;
|
||||
@@ -150,9 +152,11 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE);
|
||||
|
||||
db.execSQL(TableBean.getMappingSubCategoryImageAllow());
|
||||
db.execSQL(TableBean.getSkugroupMaster());
|
||||
|
||||
//15-03-2017
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_NO_CAMERA_FACING_DATA);
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -281,14 +285,19 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<T2PGetterSetter> getT2PDefaultData(String store_id) {
|
||||
public ArrayList<T2PGetterSetter> getT2PDefaultData(String store_id, String category_id) {
|
||||
|
||||
ArrayList<T2PGetterSetter> t2PList = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("Select BM.BRAND As BRAND, BM.BRAND_ID As BRAND_ID, DM.DISPLAY As DISPLAY, DM.DISPLAY_ID As DISPLAY_ID, DM.IMAGE_URL As IMAGE_URL, DM.IMAGE_PATH As IMAGE_PATH, T.CATEGORY_FIXTURE As CATEGORY_FIXTURE from BRAND_MASTER BM INNER JOIN MAPPING_T2P T ON BM.BRAND_ID = T.BRAND_ID INNER JOIN DISPLAY_MASTER DM ON T.DISPLAY_ID= DM.DISPLAY_ID WHERE T.STORE_ID = '" + store_id + "'", null);
|
||||
dbcursor = db.rawQuery("Select BM.BRAND As BRAND, BM.BRAND_ID As BRAND_ID, DM.DISPLAY As DISPLAY, " +
|
||||
"DM.DISPLAY_ID As DISPLAY_ID, DM.IMAGE_URL As IMAGE_URL, DM.IMAGE_PATH As IMAGE_PATH, " +
|
||||
"T.CATEGORY_FIXTURE As CATEGORY_FIXTURE from BRAND_MASTER BM INNER JOIN MAPPING_T2P T " +
|
||||
"ON BM.BRAND_ID = T.BRAND_ID INNER JOIN DISPLAY_MASTER DM " +
|
||||
"ON T.DISPLAY_ID= DM.DISPLAY_ID INNER JOIN SUB_CATEGORY_MASTER SCM ON BM.SUB_CATEGORY_ID = SCM.SUB_CATEGORY_ID " +
|
||||
"WHERE T.STORE_ID = '" + store_id + "' AND SCM.CATEGORY_ID ='"+ category_id +"'", null);
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
@@ -4231,7 +4240,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
" INNER JOIN SUB_CATEGORY_MASTER SB ON BR.SUB_CATEGORY_ID = SB.SUB_CATEGORY_ID" +
|
||||
" INNER JOIN CATEGORY_MASTER CA ON SB.CATEGORY_ID = CA.CATEGORY_ID" +
|
||||
" INNER JOIN MAPPING_SUB_CATEGORY_IMAGE_ALLOW MIA ON SB.SUB_CATEGORY_ID=MIA.SUB_CATEGORY_ID " +
|
||||
" WHERE M.KEYACCOUNT_ID = '" + key_account_id + " 'AND M.STORETYPE_ID = '" + store_type_id + "' AND M.CLASS_ID = '" + class_id + "' AND CA.CATEGORY_ID = '" + categoryId + "'", null);
|
||||
" WHERE M.KEYACCOUNT_ID = '" + key_account_id + " ' AND M.STORETYPE_ID = '" + store_type_id + "' AND M.CLASS_ID = '" + class_id + "' AND CA.CATEGORY_ID = '" + categoryId + "'", null);
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
@@ -5095,4 +5104,211 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//get Sub Category Master
|
||||
public ArrayList<MSL_AvailabilityStockFacingGetterSetter> getSubCategoryMaster(
|
||||
String category_id) {
|
||||
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * FROM SUB_CATEGORY_MASTER WHERE CATEGORY_ID = '"+ category_id +"'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
MSL_AvailabilityStockFacingGetterSetter cd = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
|
||||
cd.setSub_category_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||
cd.setSub_category(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//Sku Group Master Data for No camera
|
||||
|
||||
public ArrayList<NoCameraDataGetterSetter> getSkuGroupMasterData(String category_id, String sub_category_id) {
|
||||
Cursor cursordata = null;
|
||||
ArrayList<NoCameraDataGetterSetter> Data = new ArrayList<>();
|
||||
|
||||
try {
|
||||
|
||||
cursordata = db.rawQuery("SELECT * FROM SKUGROUP_MASTER " +
|
||||
"WHERE CATEGORY_ID ='" + category_id + "' AND SUB_CATEGORY_ID ='"+ sub_category_id +"' ORDER BY SKUGROUP_SEQUENCE", null);
|
||||
|
||||
if (cursordata != null) {
|
||||
cursordata.moveToFirst();
|
||||
while (!cursordata.isAfterLast()) {
|
||||
NoCameraDataGetterSetter sb = new NoCameraDataGetterSetter();
|
||||
|
||||
sb.setSKUGROUP_ID(cursordata.getString(cursordata.getColumnIndexOrThrow("SKUGROUP_ID")));
|
||||
|
||||
sb.setSKUGROUP_NAME(cursordata.getString(cursordata.getColumnIndexOrThrow("SKUGROUP_NAME")));
|
||||
|
||||
Data.add(sb);
|
||||
cursordata.moveToNext();
|
||||
}
|
||||
cursordata.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
return Data;
|
||||
|
||||
}
|
||||
|
||||
//insert no camera category data drag drop
|
||||
public void InsertNoCameraAddedData(
|
||||
String storeId, String categoryId, String sub_category_id, int row_count, HashMap<Integer,
|
||||
List<NoCameraDataGetterSetter>> hashMapRowData) {
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
db.beginTransaction();
|
||||
for (int i = 1; i < row_count; i++) {
|
||||
|
||||
for (int j = 0; j < hashMapRowData.get(i).size(); j++) {
|
||||
NoCameraDataGetterSetter data = hashMapRowData.get(i).get(j);
|
||||
|
||||
values.put(CommonString.KEY_STORE_ID, storeId);
|
||||
values.put(CommonString.KEY_CATEGORY_ID, categoryId);
|
||||
values.put(CommonString.KEY_SUB_CATEGORY_ID, sub_category_id);
|
||||
values.put(CommonString.KEY_SKU_GROUP_ID, data.getSKUGROUP_ID());
|
||||
values.put(CommonString.KEY_ROW_NO, i);
|
||||
values.put(CommonString.KEY_COLUMN_NO, j+1);
|
||||
values.put(CommonString.KEY_FACING, data.getFacing());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA, null, values);
|
||||
}
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in Insert NO CAMERA " + ex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
//get no camera category drag drop
|
||||
//get for specific sub category id
|
||||
public ArrayList<NoCameraDataGetterSetter> getNoCameraCategoryDataInserted(
|
||||
String store_id, String category_id, String subcategory_id) {
|
||||
|
||||
ArrayList<NoCameraDataGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
if(subcategory_id==null){
|
||||
dbcursor = db.rawQuery("SELECT * FROM "+ CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA+" WHERE " + CommonString.KEY_STORE_ID + " = '"+ store_id
|
||||
+"' AND "+ CommonString.KEY_CATEGORY_ID + " ='"+ category_id
|
||||
+"'", null);
|
||||
}
|
||||
else {
|
||||
dbcursor = db.rawQuery("SELECT * FROM "+ CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA+" WHERE " + CommonString.KEY_STORE_ID + " = '"+ store_id
|
||||
+"' AND "+ CommonString.KEY_CATEGORY_ID + " ='"+ category_id
|
||||
+"' AND "+ CommonString.KEY_SUB_CATEGORY_ID + " ='"+ subcategory_id +"'", null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
NoCameraDataGetterSetter cd = new NoCameraDataGetterSetter();
|
||||
|
||||
cd.setSKUGROUP_ID(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SKU_GROUP_ID))+"");
|
||||
cd.setRow_no(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ROW_NO)));
|
||||
cd.setColumn_no(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_COLUMN_NO)));
|
||||
cd.setFacing(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_FACING)));
|
||||
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//get no camera category drag drop
|
||||
//get for specific sub category id
|
||||
public ArrayList<NoCameraDataGetterSetter> getNoCameraCategoryStoreWiseDataInserted(
|
||||
String store_id) {
|
||||
|
||||
ArrayList<NoCameraDataGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * FROM "+ CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA+" WHERE " +
|
||||
CommonString.KEY_STORE_ID + " = '"+ store_id +"'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
NoCameraDataGetterSetter cd = new NoCameraDataGetterSetter();
|
||||
|
||||
cd.setCATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_CATEGORY_ID)));
|
||||
cd.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SUB_CATEGORY_ID)));
|
||||
cd.setSKUGROUP_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_SKU_GROUP_ID)));
|
||||
cd.setRow_no(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_ROW_NO))));
|
||||
cd.setColumn_no(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_COLUMN_NO))));
|
||||
cd.setFacing(Integer.parseInt(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_FACING))));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||
return list;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
//Sku Group Master
|
||||
|
||||
public void InsertSkuGroupMaster(SkuGroupMasterGetterSetter data) {
|
||||
db.delete("SKUGROUP_MASTER", null, null);
|
||||
|
||||
ContentValues values = new ContentValues();
|
||||
try {
|
||||
for (int i = 0; i < data.getSUB_CATEGORY_ID().size(); i++) {
|
||||
|
||||
values.put("SKUGROUP_ID", data.getSKUGROUP_ID().get(i));
|
||||
values.put("SKUGROUP_NAME", data.getSKUGROUP_NAME().get(i));
|
||||
values.put("SUB_CATEGORY_ID", data.getSUB_CATEGORY_ID().get(i));
|
||||
values.put("CATEGORY_ID", data.getCATEGORY_ID().get(i));
|
||||
values.put("SKUGROUP_SEQUENCE", data.getSKUGROUP_SEQUENCE().get(i));
|
||||
|
||||
db.insert("SKUGROUP_MASTER", null, values);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Log.d("Exception ", " in SKUGROUP_MASTER " + ex.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
||||
public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener {
|
||||
|
||||
String result, errormsg = "";
|
||||
;
|
||||
private ProgressBar pb;
|
||||
private GoogleMap mMap;
|
||||
double latitude = 0.0;
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
package cpm.com.gskmtorange.adapter;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.os.Build;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.listener.DragListener;
|
||||
import cpm.com.gskmtorange.listener.Listener;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
|
||||
public class ListAdapter extends RecyclerView.Adapter<ListAdapter.ListViewHolder>
|
||||
implements View.OnTouchListener {
|
||||
|
||||
private List<NoCameraDataGetterSetter> list;
|
||||
private Listener listener;
|
||||
|
||||
public ListAdapter(List<NoCameraDataGetterSetter> list, Listener listener) {
|
||||
this.list = list;
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(
|
||||
parent.getContext()).inflate(R.layout.brand_item_top_item, parent, false);
|
||||
return new ListViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ListViewHolder holder, int position) {
|
||||
holder.text.setText(list.get(position).getSKUGROUP_NAME());
|
||||
holder.linear_parent.setTag(position);
|
||||
holder.linear_parent.setOnTouchListener(this);
|
||||
holder.linear_parent.setOnDragListener(new DragListener(listener));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
ClipData data = ClipData.newPlainText("", "");
|
||||
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(v);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
v.startDragAndDrop(data, shadowBuilder, v, 0);
|
||||
} else {
|
||||
v.startDrag(data, shadowBuilder, v, 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<NoCameraDataGetterSetter> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
void updateList(List<NoCameraDataGetterSetter> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public DragListener getDragInstance() {
|
||||
if (listener != null) {
|
||||
return new DragListener(listener);
|
||||
} else {
|
||||
Log.e("ListAdapter", "Listener wasn't initialized!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class ListViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
TextView text;
|
||||
LinearLayout linear_parent;
|
||||
|
||||
ListViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
text = (TextView) itemView.findViewById(R.id.tv_brand);
|
||||
linear_parent = (LinearLayout) itemView.findViewById(R.id.linear_parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package cpm.com.gskmtorange.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.listener.DragListener;
|
||||
import cpm.com.gskmtorange.listener.Listener;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 17-10-2017.
|
||||
*/
|
||||
|
||||
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> {
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<NoCameraDataGetterSetter> data = Collections.emptyList();
|
||||
private Listener listener;
|
||||
|
||||
public MyAdapter(Context context, List<NoCameraDataGetterSetter> data, Listener listener) {
|
||||
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.data = data;
|
||||
this.listener = listener;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = inflator.inflate(R.layout.brand_item, parent, false);
|
||||
|
||||
MyAdapter.MyViewHolder holder = new MyAdapter.MyViewHolder(view);
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(MyViewHolder holder, int position) {
|
||||
|
||||
final NoCameraDataGetterSetter current = data.get(position);
|
||||
|
||||
final String name = current.getSKUGROUP_NAME();
|
||||
|
||||
holder.name.setText(name);
|
||||
holder.tv_facing.setText(current.getFacing()+"");
|
||||
|
||||
holder.linear_parent.setTag(position);
|
||||
//holder.linear_parent.getLayoutParams().width = 100;
|
||||
//holder.linear_parent.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
|
||||
holder.linear_parent.setOnDragListener(new DragListener(listener));
|
||||
|
||||
}
|
||||
|
||||
public DragListener getDragInstance() {
|
||||
if (listener != null) {
|
||||
return new DragListener(listener);
|
||||
} else {
|
||||
Log.e("ListAdapter", "Listener wasn't initialized!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return data.size();
|
||||
}
|
||||
|
||||
public List<NoCameraDataGetterSetter> getList() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void updateList(List<NoCameraDataGetterSetter> list) {
|
||||
this.data = list;
|
||||
}
|
||||
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
TextView name;
|
||||
TextView tv_facing;
|
||||
LinearLayout linear_parent;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
name = (TextView) itemView.findViewById(R.id.tv_brand);
|
||||
tv_facing = (TextView) itemView.findViewById(R.id.tv_facing);
|
||||
linear_parent = (LinearLayout) itemView.findViewById(R.id.linear_parent);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,7 @@ public class CommonString {
|
||||
public static final String KEY_DISPLAY_ID = "DISPLAY_ID";
|
||||
public static final String KEY_QUANTITY = "QUANTITY";
|
||||
public static final String KEY_SKU_ID = "SKU_ID";
|
||||
public static final String KEY_SKU_GROUP_ID = "SKU_GROUP_ID";
|
||||
public static final String KEY_SKUNAME = "SKUNAME";
|
||||
public static final String UNIQUE_KEY_ID = "UNIQUE_KEY_ID";
|
||||
public static final String KEY_CATEGORY_ID = "CATEGORY_ID";
|
||||
@@ -105,6 +106,10 @@ public class CommonString {
|
||||
public static final String KEY_FALSE = "False";
|
||||
public static final String KEY_CHANGED = "Changed";
|
||||
|
||||
public static final String KEY_NUMBER_OF_ROWS = "NUMBER_OF_ROWS";
|
||||
public static final String KEY_SUB_CATEGORY = "SUB_CATEGORY";
|
||||
public static final String KEY_SUB_CATEGORY_ID = "SUB_CATEGORY_ID";
|
||||
|
||||
public static final String KEY_NO_DATA = "NODATA";
|
||||
|
||||
public static String URL = "http://gskme.parinaam.in/Gskwebservice.asmx";
|
||||
@@ -771,6 +776,8 @@ public class CommonString {
|
||||
|
||||
public static final String TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING = "Msl_Availability_Stock_Facing_Data";
|
||||
|
||||
public static final String TABLE_INSERT_NO_CAMERA_FACING_DATA = "NO_CAMERA_FACING_DATA";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING
|
||||
+ "("
|
||||
@@ -814,4 +821,19 @@ public class CommonString {
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
public static final String KEY_ROW_NO = "ROW_NO";
|
||||
public static final String KEY_COLUMN_NO = "COLUMN_NO";
|
||||
public static final String KEY_FACING = "FACING";
|
||||
|
||||
public static final String CREATE_TABLE_INSERT_NO_CAMERA_FACING_DATA = "CREATE TABLE IF NOT EXISTS " + TABLE_INSERT_NO_CAMERA_FACING_DATA
|
||||
+ " ("
|
||||
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
+ KEY_STORE_ID + " INTEGER, "
|
||||
+ KEY_CATEGORY_ID + " INTEGER,"
|
||||
+ KEY_SUB_CATEGORY_ID + " INTEGER,"
|
||||
+ KEY_SKU_GROUP_ID + " INTEGER,"
|
||||
+ KEY_ROW_NO + " INTEGER,"
|
||||
+ KEY_COLUMN_NO + " INTEGER,"
|
||||
+ KEY_FACING + " INTEGER)";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,438 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.adapter.ListAdapter;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SelectGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
|
||||
public class CreateSelfActivity extends AppCompatActivity {
|
||||
|
||||
GSKOrangeDB db;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
String categoryName, categoryId;
|
||||
private SharedPreferences preferences;
|
||||
MSL_AvailabilityStockFacingGetterSetter brand_selected;
|
||||
int number_of_rows=0;
|
||||
RecyclerView rec_sub_category;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_create_self);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
rec_sub_category = (RecyclerView) findViewById(R.id.rec_sub_category);
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
|
||||
//Intent data
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
|
||||
db = new GSKOrangeDB(CreateSelfActivity.this);
|
||||
db.open();
|
||||
|
||||
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
showSkuDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
number_of_rows=0;
|
||||
brand_selected = null;
|
||||
|
||||
db.open();
|
||||
|
||||
ArrayList<String> added_sub_category_list = new ArrayList<>();
|
||||
|
||||
ArrayList<MSL_AvailabilityStockFacingGetterSetter> sub_category_list = db.getSubCategoryMaster(categoryId);
|
||||
|
||||
for(int i=0;i<sub_category_list.size();i++){
|
||||
|
||||
if(db.getNoCameraCategoryDataInserted(store_id, categoryId, sub_category_list.get(i).getSub_category_id()).size()>0){
|
||||
|
||||
added_sub_category_list.add(sub_category_list.get(i).getSub_category());
|
||||
}
|
||||
}
|
||||
|
||||
if(added_sub_category_list.size()>0){
|
||||
rec_sub_category.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
SubcategoryAdapter skuAdapter = new SubcategoryAdapter(added_sub_category_list);
|
||||
rec_sub_category.setAdapter(skuAdapter);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void showSkuDialog() {
|
||||
|
||||
final ArrayList<MSL_AvailabilityStockFacingGetterSetter> sub_category_list = db.getSubCategoryMaster(categoryId);
|
||||
MSL_AvailabilityStockFacingGetterSetter brand = new MSL_AvailabilityStockFacingGetterSetter();
|
||||
brand.setSub_category("select");
|
||||
sub_category_list.add(0, brand);
|
||||
// ArrayList<SkuMasterGetterSetter> skuMasterGetterSetterArrayList = db.getSkuT2PData("1", "1", "1",)
|
||||
|
||||
final Dialog dialog = new Dialog(CreateSelfActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.create_self_dialog_layout);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
//dialog.setCancelable(false);
|
||||
final Spinner spinner_sub_category = (Spinner) dialog.findViewById(R.id.spinner_sub_category);
|
||||
final Spinner spinner_sku = (Spinner) dialog.findViewById(R.id.spinner_no_rows);
|
||||
final Button btn_create = (Button) dialog.findViewById(R.id.btn_create);
|
||||
Button btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);
|
||||
|
||||
btn_create.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if(brand_selected==null){
|
||||
Snackbar.make(btn_create,"Please select Sub Category",Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
else if(number_of_rows==0){
|
||||
Snackbar.make(btn_create,"Please select number of rows",Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
else {
|
||||
Intent in = new Intent(getApplicationContext(), NoCameraActivity.class);
|
||||
in.putExtra("categoryName", categoryName);
|
||||
in.putExtra("categoryId", categoryId);
|
||||
in.putExtra(CommonString.KEY_NUMBER_OF_ROWS, number_of_rows);
|
||||
in.putExtra(CommonString.KEY_SUB_CATEGORY, brand_selected);
|
||||
startActivity(in);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
dialog.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
btn_cancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
dialog.cancel();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Create custom adapter object ( see below CustomAdapter.java )
|
||||
CustomAdapter adapter = new CustomAdapter(CreateSelfActivity.this, R.layout.custom_spinner_item, sub_category_list);
|
||||
// Set adapter to spinner
|
||||
spinner_sub_category.setAdapter(adapter);
|
||||
|
||||
final ArrayList<String> no_of_rows = new ArrayList<>();
|
||||
no_of_rows.add(getString(R.string.select));
|
||||
for(int i=1; i<9; i++){
|
||||
no_of_rows.add(i + "");
|
||||
}
|
||||
CustomSpinnerAdapter skuadapter = new CustomSpinnerAdapter(CreateSelfActivity.this, R.layout.custom_spinner_item, no_of_rows);
|
||||
spinner_sku.setAdapter(skuadapter);
|
||||
|
||||
|
||||
spinner_sub_category.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (position != 0) {
|
||||
brand_selected = sub_category_list.get(position);
|
||||
}
|
||||
else{
|
||||
brand_selected = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
spinner_sku.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (position != 0) {
|
||||
number_of_rows = Integer.parseInt(no_of_rows.get(position));
|
||||
}
|
||||
else {
|
||||
number_of_rows = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
public class CustomSpinnerAdapter extends ArrayAdapter<String> {
|
||||
|
||||
String tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
|
||||
/*************
|
||||
* CustomAdapter Constructor
|
||||
*****************/
|
||||
public CustomSpinnerAdapter(
|
||||
CreateSelfActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (String) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText(getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues);
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomAdapter extends ArrayAdapter<String> {
|
||||
|
||||
MSL_AvailabilityStockFacingGetterSetter tempValues = null;
|
||||
LayoutInflater inflater;
|
||||
private Activity activity;
|
||||
private ArrayList data;
|
||||
|
||||
/*************
|
||||
* CustomAdapter Constructor
|
||||
*****************/
|
||||
public CustomAdapter(
|
||||
CreateSelfActivity activitySpinner,
|
||||
int textViewResourceId,
|
||||
ArrayList objects
|
||||
|
||||
) {
|
||||
super(activitySpinner, textViewResourceId, objects);
|
||||
|
||||
/********** Take passed values **********/
|
||||
activity = activitySpinner;
|
||||
data = objects;
|
||||
/*********** Layout inflator to call external xml layout () **********************/
|
||||
inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getDropDownView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
return getCustomView(position, convertView, parent);
|
||||
}
|
||||
|
||||
// This funtion called for each row ( Called data.size() times )
|
||||
public View getCustomView(int position, View convertView, ViewGroup parent) {
|
||||
|
||||
/********** Inflate spinner_rows.xml file for each row ( Defined below ) ************/
|
||||
View row = inflater.inflate(R.layout.custom_spinner_item, parent, false);
|
||||
|
||||
/***** Get each Model object from Arraylist ********/
|
||||
tempValues = null;
|
||||
tempValues = (MSL_AvailabilityStockFacingGetterSetter) data.get(position);
|
||||
|
||||
TextView label = (TextView) row.findViewById(R.id.tv_text);
|
||||
|
||||
if (position == 0) {
|
||||
|
||||
// Default selected Spinner item
|
||||
label.setText(getString(R.string.select));
|
||||
//sub.setText("");
|
||||
} else {
|
||||
// Set values for spinner each row
|
||||
label.setText(tempValues.getSub_category());
|
||||
}
|
||||
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
@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) {
|
||||
|
||||
/* android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(CreateSelfActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();*/
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
//Adapte sub category
|
||||
|
||||
public class SubcategoryAdapter extends RecyclerView.Adapter<SubcategoryAdapter.ViewHolder> {
|
||||
|
||||
private ArrayList<String> list;
|
||||
|
||||
public SubcategoryAdapter(ArrayList<String> skuList) {
|
||||
list = skuList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubcategoryAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.sub_category_item_list, parent, false);
|
||||
return new SubcategoryAdapter.ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final SubcategoryAdapter.ViewHolder holder, final int position) {
|
||||
|
||||
holder.tv_sub_category.setText(list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public final View mView;
|
||||
//public final LinearLayout parentLayout;
|
||||
public final TextView tv_sub_category;
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
|
||||
mView = view;
|
||||
|
||||
tv_sub_category = (TextView) mView.findViewById(R.id.tv_sub_category);
|
||||
//parentLayout = (LinearLayout) mView.findViewById(R.id.parent_layout);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.DragEvent;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.adapter.ListAdapter;
|
||||
import cpm.com.gskmtorange.adapter.MyAdapter;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.listener.Listener;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DynamycIdsGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
|
||||
public class NoCameraActivity extends AppCompatActivity implements Listener {
|
||||
|
||||
GSKOrangeDB db;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
String categoryName, categoryId;
|
||||
int number_of_rows;
|
||||
private SharedPreferences preferences;
|
||||
LinearLayout linear_bottom_parent;
|
||||
ArrayList<DynamycIdsGetterSetter> ids = new ArrayList<>();
|
||||
|
||||
ArrayList<NoCameraDataGetterSetter> top_list = new ArrayList<>();
|
||||
|
||||
RecyclerView rvTop;
|
||||
MSL_AvailabilityStockFacingGetterSetter sub_category_data;
|
||||
|
||||
FloatingActionButton fab;
|
||||
|
||||
ScrollView scroll_no_camera;
|
||||
|
||||
int mScrollDistance = 0;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_no_camera);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
|
||||
rvTop = (RecyclerView) findViewById(R.id.rvTop);
|
||||
linear_bottom_parent = (LinearLayout) findViewById(R.id.lin_bottom_parent);
|
||||
scroll_no_camera = (ScrollView) findViewById(R.id.scroll_no_camera);
|
||||
|
||||
//SCROLLVIEW
|
||||
scroll_no_camera.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
|
||||
@Override
|
||||
public void onScrollChanged() {
|
||||
mScrollDistance = scroll_no_camera.getScrollY(); // For ScrollView
|
||||
// DO SOMETHING WITH THE SCROLL COORDINATES
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//preference data
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
|
||||
//Intent data
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
categoryId = getIntent().getStringExtra("categoryId");
|
||||
number_of_rows = getIntent().getIntExtra(CommonString.KEY_NUMBER_OF_ROWS, 0);
|
||||
sub_category_data = (MSL_AvailabilityStockFacingGetterSetter) getIntent().getSerializableExtra(CommonString.KEY_SUB_CATEGORY);
|
||||
|
||||
db = new GSKOrangeDB(NoCameraActivity.this);
|
||||
db.open();
|
||||
|
||||
top_list = prepareTopList(categoryId);
|
||||
|
||||
rvTop.setLayoutManager(new GridLayoutManager(this, 3));
|
||||
ListAdapter topListAdapter = new ListAdapter(top_list, this);
|
||||
rvTop.setAdapter(topListAdapter);
|
||||
//tvEmptyListTop.setOnDragListener(topListAdapter.getDragInstance());
|
||||
rvTop.setOnDragListener(topListAdapter.getDragInstance());
|
||||
|
||||
for (int i = 1; i <= number_of_rows; i++) {
|
||||
|
||||
DynamycIdsGetterSetter dynamic_ids = new DynamycIdsGetterSetter();
|
||||
|
||||
// first Button
|
||||
RelativeLayout rLayout = new RelativeLayout(getApplicationContext());
|
||||
RelativeLayout.LayoutParams lprams = new RelativeLayout.LayoutParams(
|
||||
RelativeLayout.LayoutParams.MATCH_PARENT,
|
||||
RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
TextView tv = new TextView(getApplicationContext());
|
||||
tv.setHeight(60);
|
||||
tv.setTextSize(18);
|
||||
tv.setBackgroundColor(getResources().getColor(R.color.grey_textview));
|
||||
tv.setText("Drop SKU Groups Here ");
|
||||
tv.setPadding(5, 5, 0, 0);
|
||||
tv.setLayoutParams(lprams);
|
||||
int tv_id = View.generateViewId();
|
||||
tv.setId(tv_id);
|
||||
|
||||
//set dynamic textview id to object
|
||||
dynamic_ids.setTextview_id(tv_id);
|
||||
|
||||
RecyclerView rec_bottom = new RecyclerView(getApplicationContext());
|
||||
int rec_id = View.generateViewId();
|
||||
|
||||
//set dynamic recycler id to object
|
||||
dynamic_ids.setRecycler_id(rec_id);
|
||||
|
||||
rec_bottom.setLayoutParams(lprams);
|
||||
rec_bottom.setPadding(0, 0, 0, 2);
|
||||
|
||||
rec_bottom.setVisibility(View.GONE);
|
||||
|
||||
rec_bottom.setId(rec_id);
|
||||
rec_bottom.setBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||
|
||||
RelativeLayout.LayoutParams lprams2 = new RelativeLayout.LayoutParams(
|
||||
RelativeLayout.LayoutParams.MATCH_PARENT,
|
||||
RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
lprams2.height = 2;
|
||||
View view = new View(getApplicationContext());
|
||||
view.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
view.setLayoutParams(lprams2);
|
||||
|
||||
rLayout.addView(tv);
|
||||
rLayout.addView(rec_bottom);
|
||||
rLayout.addView(view);
|
||||
rLayout.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
|
||||
linear_bottom_parent.addView(rLayout);
|
||||
|
||||
ids.add(dynamic_ids);
|
||||
|
||||
rec_bottom.setLayoutManager(new LinearLayoutManager(
|
||||
this, LinearLayoutManager.HORIZONTAL, false));
|
||||
|
||||
List<BrandMasterGetterSetter> bottomList = new ArrayList<>();
|
||||
|
||||
/* bottomList.add("C");
|
||||
bottomList.add("D");*/
|
||||
|
||||
/*setEmptyListBottom(true);
|
||||
ListAdapter bottomListAdapter = new ListAdapter(bottomList, this);
|
||||
rvBottom.setAdapter(bottomListAdapter);*/
|
||||
|
||||
List<NoCameraDataGetterSetter> brands = new ArrayList<>();
|
||||
|
||||
MyAdapter adapter = new MyAdapter(getApplicationContext(), brands, this);
|
||||
rec_bottom.setAdapter(adapter);
|
||||
|
||||
tv.setOnDragListener(adapter.getDragInstance());
|
||||
rec_bottom.setOnDragListener(adapter.getDragInstance());
|
||||
}
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
boolean flag_all_rows_filled = true;
|
||||
|
||||
HashMap<Integer, List<NoCameraDataGetterSetter>> hashMapRowData = new HashMap<>();
|
||||
|
||||
for(int i=0; i < number_of_rows;i++){
|
||||
|
||||
int rec_id = ids.get(i).getRecycler_id();
|
||||
|
||||
RecyclerView target = (RecyclerView) findViewById(rec_id);
|
||||
MyAdapter adapterMYTarget = (MyAdapter) target.getAdapter();
|
||||
List<NoCameraDataGetterSetter> customListMyTarget = adapterMYTarget.getList();
|
||||
if(customListMyTarget.size()==0){
|
||||
flag_all_rows_filled = false;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
hashMapRowData.put(i+1, customListMyTarget);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(flag_all_rows_filled){
|
||||
db.open();
|
||||
db.InsertNoCameraAddedData(store_id, categoryId, sub_category_data.getSub_category_id(), number_of_rows, hashMapRowData);
|
||||
finish();
|
||||
}
|
||||
else {
|
||||
Snackbar.make(linear_bottom_parent,R.string.please_add_subgroup_facing,Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public ArrayList<NoCameraDataGetterSetter> prepareTopList(String category_id) {
|
||||
|
||||
return db.getSkuGroupMasterData(category_id, sub_category_data.getSub_category_id());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmptyListBottom(boolean visibility, int tv, RecyclerView rv) {
|
||||
((TextView) findViewById(tv)).setVisibility(visibility ? View.VISIBLE : View.GONE);
|
||||
rv.setVisibility(visibility ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addNUpdateRow(View v, int view_id, NoCameraDataGetterSetter parent_item) {
|
||||
|
||||
int rv_id = 0;
|
||||
if (v instanceof TextView) {
|
||||
|
||||
for (int i = 0; i < ids.size(); i++) {
|
||||
|
||||
if (ids.get(i).getTextview_id() == view_id) {
|
||||
rv_id = ids.get(i).getRecycler_id();
|
||||
}
|
||||
}
|
||||
|
||||
RecyclerView target = (RecyclerView) v.getRootView().findViewById(rv_id);
|
||||
((TextView) findViewById(view_id)).setVisibility(false ? View.VISIBLE : View.GONE);
|
||||
target.setVisibility(false ? View.GONE : View.VISIBLE);
|
||||
|
||||
} else {
|
||||
rv_id = view_id;
|
||||
}
|
||||
|
||||
RecyclerView target;
|
||||
target = (RecyclerView) v.getRootView().findViewById(rv_id);
|
||||
|
||||
MyAdapter adapterMYTarget = (MyAdapter) target.getAdapter();
|
||||
List<NoCameraDataGetterSetter> customListMyTarget = adapterMYTarget.getList();
|
||||
|
||||
|
||||
showAddFacingDialog(adapterMYTarget, customListMyTarget, parent_item);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void smoothScrollToRow(View v, DragEvent event) {
|
||||
|
||||
//no action necessary
|
||||
int y = Math.round(v.getY())+Math.round(event.getY());
|
||||
int translatedY = y - mScrollDistance;
|
||||
//Log.i("translated",""+translatedY+" "+ mScrollDistance+" "+y);
|
||||
int threshold =50 ;
|
||||
// make a scrolling up due the y has passed the threshold
|
||||
/* if (translatedY < 200) {
|
||||
// make a scroll up by 30 px
|
||||
scroll_no_camera.smoothScrollBy(0, -15);
|
||||
}
|
||||
// make a autoscrolling down due y has passed the 500 px border
|
||||
if (translatedY + threshold > 500) {
|
||||
// make a scroll down by 30 px
|
||||
scroll_no_camera.smoothScrollBy(0, 15);
|
||||
}*/
|
||||
}
|
||||
|
||||
public void showAddFacingDialog(final MyAdapter adapterMYTarget, final List<NoCameraDataGetterSetter> customListMyTarget, final NoCameraDataGetterSetter parent_item) {
|
||||
|
||||
// ArrayList<SkuMasterGetterSetter> skuMasterGetterSetterArrayList = db.getSkuT2PData("1", "1", "1",)
|
||||
|
||||
final Dialog dialog = new Dialog(NoCameraActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.add_facing_custom_dialog);
|
||||
//pb = (ProgressBar) dialog.findViewById(R.id.progressBar1);
|
||||
//dialog.setCancelable(false);
|
||||
final EditText et_facing = (EditText) dialog.findViewById(R.id.et_facing);
|
||||
|
||||
final Button btn_ok = (Button) dialog.findViewById(R.id.btn_ok);
|
||||
|
||||
btn_ok.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
String facing = et_facing.getText().toString();
|
||||
|
||||
if (facing.equals("")) {
|
||||
Snackbar.make(btn_ok, R.string.please_facing, Snackbar.LENGTH_SHORT).show();
|
||||
} else {
|
||||
int facing_int = Integer.parseInt(facing);
|
||||
parent_item.setFacing(facing_int);
|
||||
NoCameraDataGetterSetter item = new NoCameraDataGetterSetter();
|
||||
item.setSKUGROUP_ID(parent_item.getSKUGROUP_ID());
|
||||
item.setSKUGROUP_NAME(parent_item.getSKUGROUP_NAME());
|
||||
item.setFacing(facing_int);
|
||||
customListMyTarget.add(item);
|
||||
|
||||
adapterMYTarget.updateList(customListMyTarget);
|
||||
adapterMYTarget.notifyDataSetChanged();
|
||||
dialog.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//dialog.setCancelable(false);
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
|
||||
@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) {
|
||||
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NoCameraActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if (id == R.id.action_settings) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// super.onBackPressed();
|
||||
|
||||
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(NoCameraActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(getResources().getString(R.string.data_will_be_lost)).setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
}
|
||||
});
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,6 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
chkbtn = (Button) itemView.findViewById(R.id.chkout);
|
||||
Cardbtn = (CardView) itemView.findViewById(R.id.card_view);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.location.Geocoder;
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
import android.net.Uri;
|
||||
@@ -36,7 +35,6 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.gms.appindexing.AppIndex;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GooglePlayServicesUtil;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
@@ -44,11 +42,6 @@ import com.google.android.gms.location.LocationListener;
|
||||
import com.google.android.gms.location.LocationRequest;
|
||||
import com.google.android.gms.location.LocationServices;
|
||||
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
import com.google.android.gms.maps.GoogleMap;
|
||||
import com.google.android.gms.maps.model.LatLng;
|
||||
import com.google.android.gms.maps.model.MarkerOptions;
|
||||
|
||||
import org.ksoap2.SoapEnvelope;
|
||||
import org.ksoap2.serialization.SoapObject;
|
||||
import org.ksoap2.serialization.SoapSerializationEnvelope;
|
||||
@@ -72,12 +65,10 @@ import java.util.Locale;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagActivity;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlHandlers.FailureXMLHandler;
|
||||
|
||||
@@ -177,7 +177,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
t2PGetterSetters = db.getT2pComplianceData(store_id, categoryId);
|
||||
|
||||
if (t2PGetterSetters.size() == 0) {
|
||||
t2PGetterSetters = db.getT2PDefaultData(store_id);
|
||||
t2PGetterSetters = db.getT2PDefaultData(store_id, categoryId);
|
||||
} else {
|
||||
for (int i = 0; i < t2PGetterSetters.size(); i++) {
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSet
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGroupMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
@@ -91,6 +92,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
MAPPING_PLANOGRAM_MasterGetterSetter mapping_planogram_masterGetterSetter;
|
||||
ShelfMasterGetterSetter shelfMasterGetterSetter;
|
||||
MappingSubCategoryImageAllowGetterSetter mappingSubCategoryImageAllowGetterSetter;
|
||||
SkuGroupMasterGetterSetter skuGroupMasterGetterSetter;
|
||||
|
||||
private Dialog dialog;
|
||||
private ProgressBar pb;
|
||||
@@ -850,6 +852,43 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
//SKUGROUP_MASTER
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "SKUGROUP_MASTER");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
skuGroupMasterGetterSetter = XMLHandlers.skuGroupMasterXMLHandler(xpp, eventType);
|
||||
|
||||
String table_skuGrpMaster = skuGroupMasterGetterSetter.getTable_SKUGROUP_MASTER();
|
||||
if (table_skuGrpMaster != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setSkugroupMaster(table_skuGrpMaster);
|
||||
}
|
||||
|
||||
if (skuGroupMasterGetterSetter.getSUB_CATEGORY_ID().size() > 0) {
|
||||
data.value = 97;
|
||||
data.name = "SKUGROUP_MASTER " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Images DownLoads
|
||||
|
||||
@@ -990,6 +1029,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db.InsertSHELF_MASTER(shelfMasterGetterSetter);
|
||||
|
||||
db.InsertMappingSubCategoryImageAllow(mappingSubCategoryImageAllowGetterSetter);
|
||||
db.InsertSkuGroupMaster(skuGroupMasterGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
|
||||
|
||||
+23
-7
@@ -31,6 +31,7 @@ import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
||||
import cpm.com.gskmtorange.dailyentry.CategoryPicture;
|
||||
import cpm.com.gskmtorange.dailyentry.CreateSelfActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.DailyDataMenuGetterSetter;
|
||||
|
||||
@@ -194,14 +195,24 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_category_picture));
|
||||
//category_camera_list = db.getCategoryPicturedata(categoryId, keyAccount_id, storeType_id, class_id);
|
||||
if (camera_allow.equalsIgnoreCase("1")) {
|
||||
//if (category_camera_list.size()>0) {
|
||||
//if (category_camera_list.size()>0) {
|
||||
if (db.isCategoryPictureData(store_id, categoryId)) {
|
||||
data.setCategory_img(R.mipmap.picturecatogory_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.picturecatogory);
|
||||
}
|
||||
} else {
|
||||
// }
|
||||
} /*else {
|
||||
data.setCategory_img(R.mipmap.picturecatogory_grey);
|
||||
}*/
|
||||
|
||||
}
|
||||
else {
|
||||
if (db.getNoCameraCategoryDataInserted(store_id, categoryId, null).size()>0) {
|
||||
data.setCategory_img(R.mipmap.picturecatogory_done);
|
||||
} else {
|
||||
data.setCategory_img(R.mipmap.picturecatogory);
|
||||
// }
|
||||
}
|
||||
}
|
||||
categoryList.add(data);
|
||||
|
||||
@@ -308,9 +319,9 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_category_picture)))) {
|
||||
if (camera_allow.equalsIgnoreCase("1")) {
|
||||
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
} else {
|
||||
} /*else {
|
||||
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||
}
|
||||
}*/
|
||||
}else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
||||
if (db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id)) {
|
||||
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
@@ -371,8 +382,13 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
} /*else {
|
||||
}*/
|
||||
} else {
|
||||
Intent intent = new Intent(DailyDataMenuActivity.this, CreateSelfActivity.class);
|
||||
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
}
|
||||
|
||||
} else if (dailyData.getCategory_name().equalsIgnoreCase(getResources().getString(R.string.daily_data_menu_msl_availability))) {
|
||||
if (db.isMappingStockDataStockFacing(categoryId, keyAccount_id, storeType_id, class_id)) {
|
||||
|
||||
+30
-14
@@ -487,7 +487,8 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
} else {*/
|
||||
|
||||
if (!camera_allow.equals("1")) {
|
||||
findViewById(R.id.lin_camera).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
||||
/* findViewById(R.id.lin_camera).setVisibility(View.VISIBLE);
|
||||
|
||||
findViewById(R.id.view_camera2).setVisibility(View.GONE);
|
||||
findViewById(R.id.view_camera3).setVisibility(View.GONE);
|
||||
@@ -518,7 +519,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
startActivityForResult(intent, 100);
|
||||
}
|
||||
|
||||
});
|
||||
});*/
|
||||
} else {
|
||||
findViewById(R.id.lin_camera).setVisibility(View.GONE);
|
||||
}
|
||||
@@ -593,13 +594,13 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
//Company_id
|
||||
if (listDataChild.get(listDataHeader.get(i)).get(j).getCompany_id().equals("1")) {
|
||||
if (data.getMust_have().equals("1")) {
|
||||
if (!camera_allow.equalsIgnoreCase("1")) {
|
||||
/*if (!camera_allow.equalsIgnoreCase("1")) {
|
||||
if (!(planogramShelfHeaderDataList.size() > 0)) {
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.stock_planogram_data_noCamera_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
@@ -902,14 +903,14 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
final EditText caption = (EditText) v;
|
||||
String edStock = caption.getText().toString();
|
||||
String edStock = caption.getText().toString().replaceFirst("^0+(?!$)", "");
|
||||
|
||||
/*if (!childData.getFacing().equals("") && Integer.parseInt(stock) >= 0 && Integer.parseInt(childData.getFacing()) < Integer.parseInt(stock)) {
|
||||
|
||||
}*/
|
||||
|
||||
if (!edStock.equals("")) {
|
||||
String stock = edStock.replaceFirst("^0+(?!$)", "");
|
||||
String stock = edStock;
|
||||
|
||||
if (Integer.parseInt(stock) >= 0 && Integer.parseInt(stock) < Integer.parseInt(childData.getMbq())) {
|
||||
|
||||
@@ -1030,6 +1031,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finalHolder1.facing.setText("");
|
||||
dialog.dismiss();
|
||||
finalHolder2.facing.setText("");
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
@@ -1058,16 +1060,30 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
//}
|
||||
} else {
|
||||
} else{
|
||||
isFill = true;
|
||||
|
||||
/*if (!edFaceup.equals("")) {
|
||||
String faceup = edFaceup.replaceFirst("^0+(?!$)", "");
|
||||
childData.setFacing(faceup);
|
||||
} else {
|
||||
childData.setFacing("");
|
||||
}*/
|
||||
}
|
||||
/* //If toggle is yes then facing cannot be 0
|
||||
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")
|
||||
&& !edFaceup.equals("") && edFaceup.equals("0")) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MSL_Availability_StockFacingActivity.this);
|
||||
builder.setMessage(getString(R.string.check_faceup_not_zero))
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
finalHolder1.facing.setText("");
|
||||
dialog.dismiss();
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
} else {
|
||||
isFill = true;
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
if (isFill) {
|
||||
if (!edFaceup.equals("")) {
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package cpm.com.gskmtorange.listener;
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.DragEvent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.adapter.ListAdapter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 25-10-2017.
|
||||
*/
|
||||
|
||||
public class DragListener implements View.OnDragListener {
|
||||
|
||||
private boolean isDropped = false;
|
||||
private Listener listener;
|
||||
|
||||
public DragListener(Listener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDrag(View v, DragEvent event) {
|
||||
|
||||
View viewSource = (View) event.getLocalState();
|
||||
int viewId = v.getId();
|
||||
|
||||
final int rvTop = R.id.rvTop;
|
||||
|
||||
switch (event.getAction()) {
|
||||
case DragEvent.ACTION_DROP:
|
||||
isDropped = true;
|
||||
int positionTarget = -1;
|
||||
|
||||
if( v instanceof TextView || v instanceof RecyclerView){
|
||||
|
||||
if (viewSource != null) {
|
||||
|
||||
RecyclerView source = (RecyclerView) viewSource.getParent();
|
||||
|
||||
ListAdapter adapterSource = (ListAdapter) source.getAdapter();
|
||||
int positionSource = (int) viewSource.getTag();
|
||||
int sourceId = source.getId();
|
||||
|
||||
NoCameraDataGetterSetter parent_item = adapterSource.getList().get(positionSource);
|
||||
|
||||
if(viewId != rvTop){
|
||||
|
||||
listener.addNUpdateRow(v, viewId, parent_item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DragEvent.ACTION_DRAG_LOCATION:
|
||||
|
||||
if(viewId == rvTop){
|
||||
listener.smoothScrollToRow(v, event);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (!isDropped && event.getLocalState() != null) {
|
||||
((View) event.getLocalState()).setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cpm.com.gskmtorange.listener;
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.DragEvent;
|
||||
import android.view.View;
|
||||
import android.widget.ScrollView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 25-10-2017.
|
||||
*/
|
||||
|
||||
public interface Listener {
|
||||
|
||||
void setEmptyListBottom(boolean visibility, int tv, RecyclerView rv);
|
||||
void addNUpdateRow(View v, int view_id, NoCameraDataGetterSetter parent_item);
|
||||
void smoothScrollToRow(View v, DragEvent event);
|
||||
}
|
||||
@@ -50,6 +50,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityStockFacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NoCameraDataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Promo_Compliance_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.StockFacing_PlanogramTrackerDataGetterSetter;
|
||||
@@ -87,7 +88,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
Object result = "";
|
||||
Toolbar toolbar;
|
||||
ArrayList<CategoryPictureGetterSetter> adddata = new ArrayList<CategoryPictureGetterSetter>();
|
||||
ArrayList<CategoryPictureGetterSetter> listdat = new ArrayList<CategoryPictureGetterSetter>();
|
||||
ArrayList<CategoryPictureGetterSetter> listdat = new ArrayList<>();
|
||||
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
||||
|
||||
ArrayList<Store_wise_camera_DataGetterSetter> storeWiseCameraDataGetterSetters;
|
||||
@@ -934,6 +935,50 @@ public class UploadActivity extends AppCompatActivity {
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||
}*/
|
||||
}
|
||||
else{
|
||||
|
||||
ArrayList<NoCameraDataGetterSetter> nocamera_data_list = db.getNoCameraCategoryStoreWiseDataInserted(coverageList.get(i).getStoreId());
|
||||
|
||||
if(nocamera_data_list.size()>0){
|
||||
|
||||
String onXml_nodata="", No_camera_data="";
|
||||
for(int n=0; n<nocamera_data_list.size(); n++){
|
||||
|
||||
onXml_nodata = "[NO_CAMERA_POG_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[CATEGORY_ID]" + nocamera_data_list.get(n).getCATEGORY_ID() + "[/CATEGORY_ID]"
|
||||
+ "[SUB_CATEGORY_ID]" + nocamera_data_list.get(n).getSUB_CATEGORY_ID() + "[/SUB_CATEGORY_ID]"
|
||||
+ "[SKU_GROUP_ID]" + nocamera_data_list.get(n).getSKUGROUP_ID() + "[/SKU_GROUP_ID]"
|
||||
+ "[ROW_NO]" + nocamera_data_list.get(n).getRow_no() + "[/ROW_NO]"
|
||||
+ "[COLUMN_NO]" + nocamera_data_list.get(n).getColumn_no() + "[/COLUMN_NO]"
|
||||
+ "[FACING]" + nocamera_data_list.get(n).getFacing() + "[/FACING]"
|
||||
+ "[/NO_CAMERA_POG_DATA]";
|
||||
|
||||
No_camera_data = No_camera_data + onXml_nodata;
|
||||
}
|
||||
|
||||
final String sos_xml = "[DATA]" + No_camera_data + "[/DATA]";
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "NO_CAMERA_POG");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
data.value = 60;
|
||||
data.name = getString(R.string.additional_data_uploading);
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 25-10-2017.
|
||||
*/
|
||||
|
||||
public class DynamycIdsGetterSetter {
|
||||
|
||||
int recycler_id = 0;
|
||||
int textview_id = 0;
|
||||
|
||||
public int getRecycler_id() {
|
||||
return recycler_id;
|
||||
}
|
||||
|
||||
public void setRecycler_id(int recycler_id) {
|
||||
this.recycler_id = recycler_id;
|
||||
}
|
||||
|
||||
public int getTextview_id() {
|
||||
return textview_id;
|
||||
}
|
||||
|
||||
public void setTextview_id(int textview_id) {
|
||||
this.textview_id = textview_id;
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -1,10 +1,12 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by gagang on 23-12-2016.
|
||||
*/
|
||||
|
||||
public class MSL_AvailabilityStockFacingGetterSetter {
|
||||
public class MSL_AvailabilityStockFacingGetterSetter implements Serializable{
|
||||
String sub_category_id, sub_category, brand_id, brand,
|
||||
sku_id, sku, mrp, sku_sequence, toggleValue, mbq, category_id, facing, stock,company_id,must_have;
|
||||
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 26-10-2017.
|
||||
*/
|
||||
|
||||
public class NoCameraDataGetterSetter {
|
||||
|
||||
String SKUGROUP_ID;
|
||||
String SKUGROUP_NAME;
|
||||
|
||||
public String getSKUGROUP_ID() {
|
||||
return SKUGROUP_ID;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_ID(String SKUGROUP_ID) {
|
||||
this.SKUGROUP_ID = SKUGROUP_ID;
|
||||
}
|
||||
|
||||
public String getSKUGROUP_NAME() {
|
||||
return SKUGROUP_NAME;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_NAME(String SKUGROUP_NAME) {
|
||||
this.SKUGROUP_NAME = SKUGROUP_NAME;
|
||||
}
|
||||
|
||||
String CATEGORY_ID;
|
||||
String SUB_CATEGORY_ID;
|
||||
int facing, row_no, column_no;
|
||||
|
||||
public int getFacing() {
|
||||
return facing;
|
||||
}
|
||||
|
||||
public void setFacing(int facing) {
|
||||
this.facing = facing;
|
||||
}
|
||||
|
||||
public int getRow_no() {
|
||||
return row_no;
|
||||
}
|
||||
|
||||
public void setRow_no(int row_no) {
|
||||
this.row_no = row_no;
|
||||
}
|
||||
|
||||
public int getColumn_no() {
|
||||
return column_no;
|
||||
}
|
||||
|
||||
public void setColumn_no(int column_no) {
|
||||
this.column_no = column_no;
|
||||
}
|
||||
|
||||
public String getCATEGORY_ID() {
|
||||
return CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||
this.CATEGORY_ID = CATEGORY_ID;
|
||||
}
|
||||
|
||||
public String getSUB_CATEGORY_ID() {
|
||||
return SUB_CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setSUB_CATEGORY_ID(String SUB_CATEGORY_ID) {
|
||||
this.SUB_CATEGORY_ID = SUB_CATEGORY_ID;
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 27-10-2017.
|
||||
*/
|
||||
|
||||
public class SkuGroupMasterGetterSetter {
|
||||
|
||||
public String getTable_SKUGROUP_MASTER() {
|
||||
return table_SKUGROUP_MASTER;
|
||||
}
|
||||
|
||||
public void setTable_SKUGROUP_MASTER(String table_SKUGROUP_MASTER) {
|
||||
this.table_SKUGROUP_MASTER = table_SKUGROUP_MASTER;
|
||||
}
|
||||
|
||||
String table_SKUGROUP_MASTER;
|
||||
|
||||
ArrayList<String> SKUGROUP_ID = new ArrayList<>();
|
||||
ArrayList<String> SKUGROUP_NAME = new ArrayList<>();
|
||||
|
||||
public ArrayList<String> getSKUGROUP_ID() {
|
||||
return SKUGROUP_ID;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_ID(String SKUGROUP_ID) {
|
||||
this.SKUGROUP_ID.add(SKUGROUP_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKUGROUP_NAME() {
|
||||
return SKUGROUP_NAME;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_NAME(String SKUGROUP_NAME) {
|
||||
this.SKUGROUP_NAME.add(SKUGROUP_NAME);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSUB_CATEGORY_ID() {
|
||||
return SUB_CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setSUB_CATEGORY_ID(String SUB_CATEGORY_ID) {
|
||||
this.SUB_CATEGORY_ID.add(SUB_CATEGORY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCATEGORY_ID() {
|
||||
return CATEGORY_ID;
|
||||
}
|
||||
|
||||
public void setCATEGORY_ID(String CATEGORY_ID) {
|
||||
this.CATEGORY_ID.add(CATEGORY_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSKUGROUP_SEQUENCE() {
|
||||
return SKUGROUP_SEQUENCE;
|
||||
}
|
||||
|
||||
public void setSKUGROUP_SEQUENCE(String SKUGROUP_SEQUENCE) {
|
||||
this.SKUGROUP_SEQUENCE.add(SKUGROUP_SEQUENCE);
|
||||
}
|
||||
|
||||
ArrayList<String> SUB_CATEGORY_ID = new ArrayList<>();
|
||||
ArrayList<String> CATEGORY_ID = new ArrayList<>();
|
||||
ArrayList<String> SKUGROUP_SEQUENCE = new ArrayList<>();
|
||||
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class TableBean {
|
||||
public static String MAPPING_SOS_TARGET;
|
||||
public static String SHELF_MASTER;
|
||||
public static String MAPPING_SUB_CATEGORY_IMAGE_ALLOW;
|
||||
public static String SKUGROUP_MASTER;
|
||||
|
||||
|
||||
public static String getAdditionalDisplay() {
|
||||
@@ -188,4 +189,12 @@ public class TableBean {
|
||||
public static void setMappingSubCategoryImageAllow(String mappingSubCategoryImageAllow) {
|
||||
MAPPING_SUB_CATEGORY_IMAGE_ALLOW = mappingSubCategoryImageAllow;
|
||||
}
|
||||
|
||||
public static String getSkugroupMaster() {
|
||||
return SKUGROUP_MASTER;
|
||||
}
|
||||
|
||||
public static void setSkugroupMaster(String skugroupMaster) {
|
||||
SKUGROUP_MASTER = skugroupMaster;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.MappingSubCategoryImageAllowGetterSet
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.NonWorkingReasonGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.STORE_PERFORMANCE_MasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGroupMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
|
||||
@@ -855,4 +856,41 @@ public class XMLHandlers {
|
||||
return st;
|
||||
}
|
||||
|
||||
//SKUGROUP_MASTER
|
||||
public static SkuGroupMasterGetterSetter skuGroupMasterXMLHandler(XmlPullParser xpp, int eventType) {
|
||||
SkuGroupMasterGetterSetter st = new SkuGroupMasterGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
st.setTable_SKUGROUP_MASTER(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKUGROUP_ID")) {
|
||||
st.setSKUGROUP_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKUGROUP_NAME")) {
|
||||
st.setSKUGROUP_NAME(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("CATEGORY_ID")) {
|
||||
st.setCATEGORY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SUB_CATEGORY_ID")) {
|
||||
st.setSUB_CATEGORY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SKUGROUP_SEQUENCE")) {
|
||||
st.setSKUGROUP_SEQUENCE(xpp.nextText());
|
||||
}
|
||||
|
||||
}
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return st;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.CreateSelfActivity"
|
||||
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_create_self" />
|
||||
|
||||
<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="@mipmap/ic_create_white_48dp" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.NoCameraActivity">
|
||||
|
||||
<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_no_camera_individual" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
card_view:cardBackgroundColor="@color/colorPrimary"
|
||||
card_view:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:text="@string/enter_facing"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="@string/stock_facing_faceup"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_normal" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_facing"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="6"
|
||||
android:inputType="number"
|
||||
android:maxLength="3"
|
||||
android:layout_gravity="center_vertical"></EditText>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_ok"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ok"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/linear_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:layout_margin="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_facing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="2dp"
|
||||
android:padding="7dp"
|
||||
android:text="5"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:background="@color/blue"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/linear_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:layout_margin="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@mipmap/ic_subtitles_black_48dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.CreateSelfActivity"
|
||||
tools:showIn="@layout/activity_create_self">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rec_sub_category"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_no_camera">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_no_camera"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/content_no_camera_top_rec" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
<include layout="@layout/content_no_camera_bottom_layout"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/lin_bottom_parent"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_no_camera"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.NoCameraActivity">
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_no_camera">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3.5" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#cccccc" />
|
||||
|
||||
<!-- <View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"/>-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="6.5">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_no_camera"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/lin_bottom_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:orientation="vertical" />
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="5dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/activity_no_camera"
|
||||
tools:context="cpm.com.gskmtorange.dailyentry.NoCameraActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="Top RecyclerView"
|
||||
android:textSize="25sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEmptyListTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
android:background="#cccccc"
|
||||
android:gravity="center"
|
||||
android:text="Top List is Empty!"
|
||||
android:textSize="20sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rvTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="20dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#cccccc" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?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="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
card_view:cardBackgroundColor="@color/colorPrimary"
|
||||
card_view:cardCornerRadius="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="@string/sub_category"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_normal" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_sub_category"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="6"
|
||||
android:layout_gravity="center_vertical"></Spinner>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="6"
|
||||
android:layout_marginTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="@string/no_of_rows_on_shelf"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/text_size_normal" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_no_rows"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:layout_gravity="center_vertical"></Spinner>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_create"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/create"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/linear_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
android:layout_margin="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="10dp"
|
||||
android:background="@mipmap/ic_subtitles_black_48dp"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sub_category"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 223 B |
Binary file not shown.
|
After Width: | Height: | Size: 653 B |
@@ -182,8 +182,8 @@
|
||||
<string name="title_activity_store_wise_performance">أداء المتجر</string>
|
||||
<string name="success">نجاح</string>
|
||||
<string name="category_performance_t2p">مواد الدعاية في المتاجر</string>
|
||||
<string name="daily_data_menu_t2p">المتاح او المتوفر الشهري</string>
|
||||
<string name="title_activity_t2_pcompliance">مطابقة مواد الدعاية لقوانين الشركة</string>
|
||||
<string name="daily_data_menu_t2p">T2P -المتاح او المتوفر الشهري</string>
|
||||
<string name="title_activity_t2_pcompliance"> T2P - مطابقة مواد الدعاية لقوانين الشركة</string>
|
||||
<string name="t2p_data_uploading">تحميل بيانات مواد الدعاية T2P</string>
|
||||
<string name="title_activity_t2p_brand__avaibility">تواجد مواد الدعاية</string>
|
||||
<string name="notsuppoted">هذا الجهاز غير معتمد.</string>
|
||||
@@ -235,4 +235,5 @@
|
||||
<string name="future_route_plan">بحث عن خط السير</string>
|
||||
<string name="select_date">اختيار التاريخ</string>
|
||||
<string name="no_route_plan_for_day">لا يوجد خط سير لليوم</string>
|
||||
<string name="check_faceup_not_zero">لا يمكن ان يكون عدد أوجه الأصناف صفر علي الرف اذا كانت الأصناف متوفره</string>
|
||||
</resources>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<string name="select">Seçiniz</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">Kalıcı Teşhir</string>
|
||||
<string name="title_activity_t2_pcompliance">T2P - Kalıcı Teşhir</string>
|
||||
|
||||
<string name="yes">Evet</string>
|
||||
<string name="no">Hayır</string>
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<string name="daily_data_menu_msl_availability">SKU bulunurluğu</string>
|
||||
<string name="daily_data_menu_stock_facing">Raf Payı</string>
|
||||
<string name="daily_data_menu_t2p">Kalıcı Teşhir</string>
|
||||
<string name="daily_data_menu_t2p">T2P - Kalıcı Teşhir</string>
|
||||
<string name="daily_data_menu_additional_visibility">Ek Teşhir</string>
|
||||
<string name="daily_data_menu_promo_compliance">Promosyon</string>
|
||||
<string name="daily_data_menu_competition_tracking">Rakip Bilgisi</string>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<color name="green">#FF27A404</color>
|
||||
<color name="blue">#2196F3</color>
|
||||
|
||||
<color name="grey_textview">#cccccc</color>
|
||||
|
||||
<color name="colorOrange">#FFE0B2</color>
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<string name="menu_setting">Settings</string>
|
||||
<string name="menu_services">Services</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">Monthly Visibility</string>
|
||||
<string name="title_activity_t2_pcompliance">T2P - Monthly Visibility</string>
|
||||
|
||||
<!--Gagan start code-->
|
||||
<string name="title_activity_category_list">Category List</string>
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<string name="daily_data_menu_msl_availability">SKU Availability</string>
|
||||
<string name="daily_data_menu_stock_facing">Stock and Facing</string>
|
||||
<string name="daily_data_menu_t2p">Monthly Visibility</string>
|
||||
<string name="daily_data_menu_t2p">T2P - Monthly Visibility</string>
|
||||
<string name="daily_data_menu_additional_visibility">Additional Visibility</string>
|
||||
<string name="daily_data_menu_promo_compliance">Promo Compliance</string>
|
||||
<string name="daily_data_menu_competition_tracking">Competition Visibility</string>
|
||||
@@ -244,6 +244,7 @@
|
||||
<!--Gagan start code 3-->
|
||||
<string name="empty">Empty</string>
|
||||
<string name="check_faceup">Faceup can not be greater than stock value</string>
|
||||
<string name="check_faceup_not_zero">Faceup cannot be zero in this case</string>
|
||||
<string name="fill_stock_value">First fill the stock value</string>
|
||||
<string name="want_add">Are you sure you want to add</string>
|
||||
<string name="promo_add">promo is added</string>
|
||||
@@ -312,6 +313,15 @@
|
||||
<string name="msg_select_present">Please select present </string>
|
||||
|
||||
<string name="please_select_answer">Please select answer</string>
|
||||
<string name="title_activity_create_self">No Camera Option</string>
|
||||
|
||||
<string name="create_self">Create Shelf</string>
|
||||
<string name="create">Create</string>
|
||||
<string name="no_of_rows_on_shelf">No. of Rows on Shelf</string>
|
||||
<string name="sub_category">Sub Category</string>
|
||||
<string name="enter_facing">Enter Facing</string>
|
||||
<string name="please_facing">Please fill Facing</string>
|
||||
<string name="please_add_subgroup_facing">Please add atleast one Sub Group to every row</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.1'
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in New Issue
Block a user