Merge pull request #44 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GG_T2p_string_change
Gg t2p string change
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_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_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">
|
||||
|
||||
@@ -15,8 +15,8 @@ android {
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 22
|
||||
|
||||
versionCode 9
|
||||
versionName "2.2"
|
||||
versionCode 10
|
||||
versionName "2.3"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
*/
|
||||
|
||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB3";
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB4";
|
||||
public static final int DATABASE_VERSION = 13;
|
||||
TableBean tableBean;
|
||||
private SQLiteDatabase db;
|
||||
@@ -1579,6 +1579,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setIn_stock("0");
|
||||
cd.setPromo_announcer("0");
|
||||
cd.setRunning_pos("0");
|
||||
cd.setImage_promotion("");
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -1655,6 +1656,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("IN_STOCK_VALUE", Integer.parseInt(data.getIn_stock()));
|
||||
values.put("PROMO_ANNOUNCER_VALUE", Integer.parseInt(data.getPromo_announcer()));
|
||||
values.put("RUNNING_POS_VALUE", Integer.parseInt(data.getRunning_pos()));
|
||||
values.put("ADD_PROMO_IMAGE", data.getImage_promotion());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_ADDITIONAL_PROMO_COMPLIANCE, null, values);
|
||||
} catch (Exception ex) {
|
||||
@@ -1683,6 +1685,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setIn_stock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IN_STOCK_VALUE")));
|
||||
cd.setPromo_announcer(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_ANNOUNCER_VALUE")));
|
||||
cd.setRunning_pos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("RUNNING_POS_VALUE")));
|
||||
cd.setImage_promotion(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ADD_PROMO_IMAGE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
@@ -1712,6 +1716,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("IN_STOCK_VALUE", Integer.parseInt(data.getIn_stock()));
|
||||
values.put("PROMO_ANNOUNCER_VALUE", Integer.parseInt(data.getPromo_announcer()));
|
||||
values.put("RUNNING_POS_VALUE", Integer.parseInt(data.getRunning_pos()));
|
||||
values.put("PROMO_IMAGE", data.getImage_promotion());
|
||||
|
||||
db.insert(CommonString.TABLE_INSERT_PROMO_SKU, null, values);
|
||||
}
|
||||
@@ -1945,6 +1950,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
values.put("IN_STOCK_VALUE", Integer.parseInt(data.getIn_stock()));
|
||||
values.put("PROMO_ANNOUNCER_VALUE", Integer.parseInt(data.getPromo_announcer()));
|
||||
values.put("RUNNING_POS_VALUE", Integer.parseInt(data.getRunning_pos()));
|
||||
values.put("PROMO_IMAGE", data.getImage_promotion());
|
||||
|
||||
db.update(CommonString.TABLE_INSERT_PROMO_SKU, values,
|
||||
"CATEGORY_ID='" + categoryId + "' AND STORE_ID='" + storeId +
|
||||
@@ -1979,6 +1985,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setIn_stock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IN_STOCK_VALUE")));
|
||||
cd.setPromo_announcer(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_ANNOUNCER_VALUE")));
|
||||
cd.setRunning_pos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("RUNNING_POS_VALUE")));
|
||||
cd.setImage_promotion(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_IMAGE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -2124,6 +2131,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setIn_stock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IN_STOCK_VALUE")));
|
||||
cd.setPromo_announcer(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_ANNOUNCER_VALUE")));
|
||||
cd.setRunning_pos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("RUNNING_POS_VALUE")));
|
||||
cd.setImage_promotion(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_IMAGE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
@@ -2160,6 +2168,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
cd.setIn_stock(dbcursor.getString(dbcursor.getColumnIndexOrThrow("IN_STOCK_VALUE")));
|
||||
cd.setPromo_announcer(dbcursor.getString(dbcursor.getColumnIndexOrThrow("PROMO_ANNOUNCER_VALUE")));
|
||||
cd.setRunning_pos(dbcursor.getString(dbcursor.getColumnIndexOrThrow("RUNNING_POS_VALUE")));
|
||||
cd.setImage_promotion(dbcursor.getString(dbcursor.getColumnIndexOrThrow("ADD_PROMO_IMAGE")));
|
||||
|
||||
list.add(cd);
|
||||
dbcursor.moveToNext();
|
||||
|
||||
@@ -41,25 +41,26 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
private SharedPreferences preferences;
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
String date,visit_status;
|
||||
String date, visit_status;
|
||||
GSKOrangeDB db;
|
||||
// ListView list;
|
||||
ValueAdapter adapter;
|
||||
// ListView list;
|
||||
ValueAdapter adapter;
|
||||
RecyclerView recyclerView;
|
||||
private SharedPreferences.Editor editor = null;
|
||||
LinearLayout parent_linear,nodata_linear;
|
||||
LinearLayout parent_linear, nodata_linear;
|
||||
LinearLayout linearlay;
|
||||
FloatingActionButton fab;
|
||||
Toolbar toolbar;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.geotagstorelistfab);
|
||||
//list = (ListView) findViewById(R.id.list_id);
|
||||
|
||||
recyclerView=(RecyclerView) findViewById(R.id.drawer_layout_recycle);
|
||||
recyclerView = (RecyclerView) findViewById(R.id.drawer_layout_recycle);
|
||||
linearlay = (LinearLayout) findViewById(R.id.no_data_lay);
|
||||
// nodata_linear = (LinearLayout) findViewById(R.id.no_data_lay);
|
||||
// nodata_linear = (LinearLayout) findViewById(R.id.no_data_lay);
|
||||
//parent_linear = (LinearLayout) findViewById(R.id.parent_linear);
|
||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
|
||||
@@ -71,7 +72,7 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
@@ -82,31 +83,24 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
Intent in = new Intent(getApplicationContext(), DownloadActivity.class);
|
||||
startActivity(in);
|
||||
|
||||
finish();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
if (storelist.size()>0) {
|
||||
|
||||
adapter=new ValueAdapter(getApplicationContext(),storelist);
|
||||
if (storelist.size() > 0) {
|
||||
adapter = new ValueAdapter(getApplicationContext(), storelist);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
recyclerView.setVisibility(View.INVISIBLE);
|
||||
linearlay.setVisibility(View.VISIBLE);
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +111,7 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id==android.R.id.home){
|
||||
if (id == android.R.id.home) {
|
||||
|
||||
finish();
|
||||
|
||||
@@ -127,6 +121,7 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// TODO Auto-generated method stub
|
||||
@@ -137,86 +132,66 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
}
|
||||
|
||||
|
||||
public class ValueAdapter extends RecyclerView.Adapter<ValueAdapter.MyViewHolder>{
|
||||
public class ValueAdapter extends RecyclerView.Adapter<ValueAdapter.MyViewHolder> {
|
||||
|
||||
private LayoutInflater inflator;
|
||||
|
||||
List<StoreBean> data= Collections.emptyList();
|
||||
List<StoreBean> data = Collections.emptyList();
|
||||
|
||||
public ValueAdapter(Context context, List<StoreBean> data){
|
||||
public ValueAdapter(Context context, List<StoreBean> data) {
|
||||
|
||||
inflator = LayoutInflater.from(context);
|
||||
this.data=data;
|
||||
this.data = data;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int i) {
|
||||
View view = inflator.inflate(R.layout.geotagstorelist, parent, false);
|
||||
|
||||
View view=inflator.inflate(R.layout.geotagstorelist,parent,false);
|
||||
|
||||
MyViewHolder holder=new MyViewHolder(view);
|
||||
|
||||
MyViewHolder holder = new MyViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final ValueAdapter.MyViewHolder viewHolder, final int position) {
|
||||
|
||||
final StoreBean current=data.get(position);
|
||||
|
||||
final StoreBean current = data.get(position);
|
||||
//viewHolder.txt.setText(current.txt);
|
||||
|
||||
viewHolder.txt.setText(current.getSTORE_NAME());
|
||||
viewHolder.txt_storeAddress.setText(current.getADDRESS());
|
||||
|
||||
if(current.getGEO_TAG().equalsIgnoreCase("Y"))
|
||||
{
|
||||
if (current.getGEO_TAG().equalsIgnoreCase("Y")) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.geopin);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("D")){
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("D")) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("U")){
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("U")) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.tick);
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("P")){
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("P")) {
|
||||
viewHolder.imageview.setVisibility(View.VISIBLE);
|
||||
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
viewHolder.imageview.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
viewHolder.relativelayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
if(current.getGEO_TAG().equalsIgnoreCase("Y"))
|
||||
{
|
||||
if (current.getGEO_TAG().equalsIgnoreCase("Y")) {
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_already_done, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("D")){
|
||||
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("U")){
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("D")) {
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("U")) {
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_upload_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
|
||||
|
||||
}
|
||||
else if(current.getGEO_TAG().equalsIgnoreCase("P")){
|
||||
|
||||
} else if (current.getGEO_TAG().equalsIgnoreCase("P")) {
|
||||
Snackbar.make(v, R.string.title_geo_tag_activity_geo_data, Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
} else {
|
||||
// PUT IN PREFERENCES
|
||||
editor = preferences.edit();
|
||||
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
|
||||
@@ -224,11 +199,10 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
|
||||
editor.commit();
|
||||
|
||||
Intent in =new Intent(GeoTagStoreList.this,GeoTagActivity.class);
|
||||
Intent in = new Intent(GeoTagStoreList.this, GeoTagActivity.class);
|
||||
startActivity(in);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -238,21 +212,20 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
return data.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder{
|
||||
|
||||
TextView txt;
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView txt, txt_storeAddress;
|
||||
ImageView icon;
|
||||
RelativeLayout relativelayout;
|
||||
ImageView imageview;
|
||||
|
||||
public MyViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
txt=(TextView) itemView.findViewById(R.id.geolistviewxml_storename);
|
||||
relativelayout=(RelativeLayout) itemView.findViewById(R.id.relativelayout);
|
||||
imageview=(ImageView) itemView.findViewById(R.id.imageView1);
|
||||
|
||||
txt = (TextView) itemView.findViewById(R.id.geolistviewxml_storename);
|
||||
relativelayout = (RelativeLayout) itemView.findViewById(R.id.relativelayout);
|
||||
imageview = (ImageView) itemView.findViewById(R.id.imageView1);
|
||||
txt_storeAddress = (TextView) itemView.findViewById(R.id.txt_storeAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<StoreBean> getdata() {
|
||||
@@ -260,17 +233,16 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
StoreBean storelistdata=new StoreBean();
|
||||
StoreBean storelistdata = new StoreBean();
|
||||
|
||||
for(int i=0;i<storelist.size();i++)
|
||||
{
|
||||
for (int i = 0; i < storelist.size(); i++) {
|
||||
storelistdata.setSTORE_NAME(storelist.get(0).getSTORE_NAME());
|
||||
|
||||
data.add(storelistdata);
|
||||
|
||||
}
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -282,7 +254,7 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
toolbar.setTitle(getString(R.string.title_activity_store_geotag));
|
||||
}
|
||||
|
||||
@@ -312,9 +284,9 @@ public class GeoTagStoreList extends AppCompatActivity implements View.OnClickLi
|
||||
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_UAE_ARABIC;
|
||||
}else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_OMAN;
|
||||
}else{
|
||||
} else {
|
||||
lang = CommonString.KEY_RETURN_LANGUAGE_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,7 +412,10 @@ public class CommonString {
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "RUNNING_POS_VALUE"
|
||||
+ " INTEGER"
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "ADD_PROMO_IMAGE"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
@@ -449,7 +452,10 @@ public class CommonString {
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "RUNNING_POS_VALUE"
|
||||
+ " INTEGER"
|
||||
+ " INTEGER,"
|
||||
|
||||
+ "PROMO_IMAGE"
|
||||
+ " VARCHAR"
|
||||
|
||||
+ ")";
|
||||
|
||||
|
||||
+58
-10
@@ -77,6 +77,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
boolean isDialogOpen = true;
|
||||
private SharedPreferences preferences;
|
||||
int scrollPosition = 0;
|
||||
|
||||
String str = "", _pathforcheck = "";
|
||||
|
||||
@@ -180,6 +181,11 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
expandableListView.smoothScrollToPosition(scrollPosition);
|
||||
|
||||
if (!expandableListView.isGroupExpanded(scrollPosition)) {
|
||||
expandableListView.expandGroup(scrollPosition);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
@@ -594,6 +600,8 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
//expandableListView.smoothScrollToPosition(i);
|
||||
scrollPosition = i;
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.faceup_value);
|
||||
@@ -605,20 +613,24 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
//expandableListView.smoothScrollToPosition(i);
|
||||
scrollPosition = i;
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.stock_value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
if (faceup.equals("")) {
|
||||
if (!checkHeaderArray.contains(i)) {
|
||||
checkHeaderArray.add(i);
|
||||
}
|
||||
//expandableListView.smoothScrollToPosition(i);
|
||||
scrollPosition = i;
|
||||
|
||||
flag = false;
|
||||
Error_Message = getResources().getString(R.string.faceup_value);
|
||||
break;
|
||||
@@ -708,6 +720,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
TextView txt_categoryHeader = (TextView) convertView.findViewById(R.id.txt_categoryHeader);
|
||||
RelativeLayout rel_header = (RelativeLayout) convertView.findViewById(R.id.rel_categoryHeader);
|
||||
ImageView img_camera = (ImageView) convertView.findViewById(R.id.img_camera);
|
||||
CardView card_view = (CardView) convertView.findViewById(R.id.card_view);
|
||||
|
||||
txt_categoryHeader.setTypeface(null, Typeface.BOLD);
|
||||
|
||||
@@ -719,10 +732,19 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
txt_categoryHeader.setText(headerTitle.getSub_category() + "-" + headerTitle.getBrand());
|
||||
|
||||
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
card_view.setCardBackgroundColor(getResources().getColor(R.color.grey_background));
|
||||
}
|
||||
}
|
||||
|
||||
//empty check color change
|
||||
if (headerTitle.getCompany_id().equals("1")) {
|
||||
/*if (headerTitle.getCompany_id().equals("1")) {
|
||||
if (!checkflag) {
|
||||
if (checkHeaderArray.contains(groupPosition)) {
|
||||
//card_view.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
txt_categoryHeader.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
txt_categoryHeader.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||
@@ -736,7 +758,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
txt_categoryHeader.setTextColor(getResources().getColor(R.color.black));
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return convertView;
|
||||
}
|
||||
@@ -779,6 +801,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
holder.facing = (EditText) convertView.findViewById(R.id.ed_facing);
|
||||
holder.stock = (EditText) convertView.findViewById(R.id.ed_stock);
|
||||
|
||||
holder.stock_view = convertView.findViewById(R.id.stock_view);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
@@ -797,8 +820,10 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
|
||||
if (childData.getToggleValue().equals("1")) {
|
||||
holder.stock.setVisibility(View.GONE);
|
||||
holder.stock_view.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.stock.setVisibility(View.VISIBLE);
|
||||
holder.stock_view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
@@ -808,6 +833,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
holder.toggle_available.setVisibility(View.GONE);
|
||||
holder.facing.setVisibility(View.VISIBLE);
|
||||
holder.stock.setVisibility(View.GONE);
|
||||
holder.stock_view.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
/* if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
@@ -1058,15 +1084,29 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
holder.facing.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
holder.facing.setHintTextColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.facing.setHint(getString(R.string.empty));
|
||||
|
||||
/* if (childData.getCompany_id().equals("1") && !childData.getMust_have().equals("0")) {
|
||||
}else{
|
||||
holder.facing.setHint("");
|
||||
}*/
|
||||
tempflag = true;
|
||||
}
|
||||
} else {
|
||||
holder.facing.setHint("");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (tempflag) {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
} else {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (holder.facing.getText().toString().equals("")) {
|
||||
@@ -1076,10 +1116,17 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
tempflag = true;
|
||||
}
|
||||
|
||||
|
||||
if (tempflag) {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
//holder.cardView.setCardBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(android.R.color.holo_red_dark));
|
||||
} else {
|
||||
holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
//holder.cardView.setCardBackgroundColor(getResources().getColor(R.color.white));
|
||||
if (childData.getCompany_id().equals("1") && childData.getMust_have().equals("1")) {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.colorOrange));
|
||||
} else {
|
||||
holder.lin_category.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1104,6 +1151,7 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
ToggleButton toggle_available;
|
||||
LinearLayout lin_category;
|
||||
EditText facing, stock;
|
||||
View stock_view;
|
||||
}
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
@@ -1131,9 +1179,9 @@ public class MSL_Availability_StockFacingActivity extends AppCompatActivity {
|
||||
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_UAE_ARABIC;
|
||||
}else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_OMAN;
|
||||
}else{
|
||||
} else {
|
||||
lang = CommonString.KEY_RETURN_LANGUAGE_DEFAULT;
|
||||
}
|
||||
|
||||
|
||||
+251
-7
@@ -1,17 +1,25 @@
|
||||
package cpm.com.gskmtorange.gsk_dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@@ -19,13 +27,19 @@ import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.StreamHandler;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -38,6 +52,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
Spinner sp_promo;
|
||||
ToggleButton toggle_add_InStock, toggle_add_promoAnnouncer, toggle_add_runningPos;
|
||||
Button btn_add;
|
||||
ImageView img_addPromotion;
|
||||
|
||||
ArrayList<Promo_Compliance_DataGetterSetter> promoSkuListData;
|
||||
ArrayList<Promo_Compliance_DataGetterSetter> promoSpinnerListData;
|
||||
@@ -45,9 +60,17 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
GSKOrangeDB db;
|
||||
String categoryName, categoryId;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id, camera_allow;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String str = CommonString.FILE_PATH,
|
||||
path = "", _pathforcheck = "", img = "";
|
||||
int child_position = -1;
|
||||
Uri outputFileUri;
|
||||
String gallery_package = "";
|
||||
String error_msg;
|
||||
Promo_Compliance_DataGetterSetter cd;
|
||||
|
||||
private static boolean updateResources(Context context, String language) {
|
||||
|
||||
/*String lang;
|
||||
@@ -73,9 +96,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_UAE_ARABIC;
|
||||
}else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
} else if (language.equalsIgnoreCase(CommonString.KEY_LANGUAGE_OMAN)) {
|
||||
lang = CommonString.KEY_RETURE_LANGUAGE_OMAN;
|
||||
}else{
|
||||
} else {
|
||||
lang = CommonString.KEY_RETURN_LANGUAGE_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -115,6 +138,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
toggle_add_promoAnnouncer = (ToggleButton) findViewById(R.id.toggle_add_promoAnnouncer);
|
||||
toggle_add_runningPos = (ToggleButton) findViewById(R.id.toggle_add_runningPos);
|
||||
btn_add = (Button) findViewById(R.id.btn_add);
|
||||
img_addPromotion = (ImageView) findViewById(R.id.img_addPromotion);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
db.open();
|
||||
@@ -130,6 +154,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||
|
||||
//Intent data
|
||||
categoryName = getIntent().getStringExtra("categoryName");
|
||||
@@ -141,7 +166,8 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
additionalPromoListData = new ArrayList<>();
|
||||
AdditionalPromoListView();
|
||||
|
||||
final Promo_Compliance_DataGetterSetter cd = new Promo_Compliance_DataGetterSetter();
|
||||
cd = new Promo_Compliance_DataGetterSetter();
|
||||
|
||||
cd.setStore_id(store_id);
|
||||
cd.setPromo_id("");
|
||||
cd.setPromo("");
|
||||
@@ -151,14 +177,35 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
cd.setPromo_announcer("0");
|
||||
cd.setRunning_pos("0");
|
||||
cd.setSp_promo("0");
|
||||
cd.setImage_promotion("");
|
||||
|
||||
img_addPromotion.setBackgroundResource(R.mipmap.camera_grey);
|
||||
|
||||
toggle_add_InStock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
cd.setIn_stock("1");
|
||||
|
||||
img_addPromotion.setBackgroundResource(R.mipmap.camera_orange);
|
||||
|
||||
if (camera_allow.equals("1")) {
|
||||
img_addPromotion.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
_pathforcheck = "AddPromo_Image_" + store_id + categoryId + "_"
|
||||
+ visit_date.replace("/", "") + "_" +
|
||||
getCurrentTime().replace(":", "") + ".jpg";
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity(2);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
cd.setIn_stock("0");
|
||||
img_addPromotion.setClickable(false);
|
||||
img_addPromotion.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -226,7 +273,6 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < promoSpinnerListData.size(); i++) {
|
||||
if (cd.getSp_promo() == promoSpinnerListData.get(i).getPromo_id()) {
|
||||
sp_promo.setSelection(i);
|
||||
@@ -273,6 +319,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onClick(final View view) {
|
||||
|
||||
//if (isValid()) {
|
||||
boolean flag = true;
|
||||
if (promoSkuListData.size() <= 0) {
|
||||
if (additionalPromoListData.size() <= 0) {
|
||||
@@ -308,7 +355,10 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
/*} else {
|
||||
Snackbar.make(view, error_msg, Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null).show();
|
||||
}*/
|
||||
}
|
||||
});
|
||||
|
||||
@@ -326,6 +376,24 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
boolean flag = true;
|
||||
|
||||
for (int i = 0; i < promoSkuListData.size(); i++) {
|
||||
|
||||
if (promoSkuListData.get(i).getIn_stock().equals("1")) {
|
||||
if (promoSkuListData.get(i).getImage_promotion().equals("")) {
|
||||
flag = false;
|
||||
error_msg = getResources().getString(R.string.click_image);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@@ -346,7 +414,9 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
ArrayAdapter<String> sp_promo_adapter = new ArrayAdapter<>(PromoComplianceActivity.this, android.R.layout.simple_list_item_1);
|
||||
for (int i = 0; i < promoSpinnerListData.size(); i++) {
|
||||
sp_promo_adapter.add(promoSpinnerListData.get(i).getPromo());
|
||||
|
||||
}
|
||||
sp_promo_adapter.setDropDownViewResource(R.layout.spinner_text_view);
|
||||
sp_promo.setAdapter(sp_promo_adapter);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -355,7 +425,11 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
|
||||
private void promoSkuListView() {
|
||||
try {
|
||||
View view;
|
||||
View view = null;
|
||||
|
||||
if (lin_promo_sku != null) {
|
||||
lin_promo_sku.removeAllViews();
|
||||
}
|
||||
|
||||
for (int i = 0; i < promoSkuListData.size(); i++) {
|
||||
view = getLayoutInflater().inflate(R.layout.item_promo_sku_list, null, false);
|
||||
@@ -366,17 +440,39 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
ToggleButton toggle_inStock = (ToggleButton) view.findViewById(R.id.toggle_inStock);
|
||||
ToggleButton toggle_promoAnnouncer = (ToggleButton) view.findViewById(R.id.toggle_promoAnnouncer);
|
||||
ToggleButton toggle_runningPos = (ToggleButton) view.findViewById(R.id.toggle_runningPos);
|
||||
final ImageView img_promotion = (ImageView) view.findViewById(R.id.img_promotion);
|
||||
|
||||
txt_promoSkuName.setText(data.getPromo());
|
||||
|
||||
//In Stock
|
||||
final int finalI = i;
|
||||
toggle_inStock.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
data.setIn_stock("1");
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_orange);
|
||||
|
||||
if (camera_allow.equals("1")) {
|
||||
img_promotion.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
_pathforcheck = "Promo_Image_" + store_id + categoryId + "_" + data.getSku_id() +
|
||||
data.getPromo_id() + visit_date.replace("/", "") + "_" +
|
||||
getCurrentTime().replace(":", "") + ".jpg";
|
||||
//child_position = position;
|
||||
child_position = finalI;
|
||||
path = str + _pathforcheck;
|
||||
|
||||
startCameraActivity(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
data.setIn_stock("0");
|
||||
img_promotion.setClickable(false);
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_grey);
|
||||
data.setImage_promotion("");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -423,6 +519,29 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
toggle_runningPos.setChecked(false);
|
||||
}
|
||||
|
||||
|
||||
if (!img.equalsIgnoreCase("")) {
|
||||
if (i == child_position) {
|
||||
data.setImage_promotion(img);
|
||||
img = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (camera_allow.equals("1")) {
|
||||
//Camera
|
||||
if (data.getIn_stock().equals("1")) {
|
||||
if (data.getImage_promotion().equals("")) {
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_orange);
|
||||
} else {
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_green);
|
||||
}
|
||||
} else {
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
} else {
|
||||
img_promotion.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
lin_promo_sku.addView(view);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -449,6 +568,7 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
TextView txt_inStock = (TextView) view.findViewById(R.id.txt_inStock);
|
||||
TextView txt_promoAnnouncer = (TextView) view.findViewById(R.id.txt_promoAnnouncer);
|
||||
TextView txt_runningPos = (TextView) view.findViewById(R.id.txt_runningPos);
|
||||
ImageView img_add_promotion_view = (ImageView) view.findViewById(R.id.img_add_promotion_view);
|
||||
|
||||
txt_promoName.setText(data.getPromo());
|
||||
|
||||
@@ -473,6 +593,13 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
txt_runningPos.setText(getResources().getString(R.string.no));
|
||||
}
|
||||
|
||||
//Camera Image
|
||||
if (!data.getImage_promotion().equals("")) {
|
||||
img_add_promotion_view.setBackgroundResource(R.mipmap.camera_green);
|
||||
} else {
|
||||
img_add_promotion_view.setBackgroundResource(R.mipmap.camera_orange);
|
||||
}
|
||||
|
||||
lin_addtional_promo.addView(view);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -543,4 +670,121 @@ public class PromoComplianceActivity extends AppCompatActivity {
|
||||
android.app.AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
private void startCameraActivity(int pos) {
|
||||
try {
|
||||
|
||||
Log.i("Stock & Facing ", "startCameraActivity()");
|
||||
File file = new File(path);
|
||||
outputFileUri = Uri.fromFile(file);
|
||||
|
||||
String defaultCameraPackage = "";
|
||||
final PackageManager packageManager = getPackageManager();
|
||||
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
for (int n = 0; n < list.size(); n++) {
|
||||
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
|
||||
//temp value in case camera is gallery app above jellybean
|
||||
String packag = list.get(n).loadLabel(packageManager).toString();
|
||||
if (packag.equalsIgnoreCase("Gallery") || packag.equalsIgnoreCase("Galeri") || packag.equalsIgnoreCase("الاستوديو")) {
|
||||
gallery_package = list.get(n).packageName;
|
||||
}
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera") || packag.equalsIgnoreCase("الكاميرا")) {
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera") || packag.equalsIgnoreCase("الكاميرا")) {
|
||||
|
||||
defaultCameraPackage = list.get(n).packageName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, pos);
|
||||
|
||||
} catch (ActivityNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(gallery_package);
|
||||
startActivityForResult(intent, pos);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
Log.e("Stock & Facing", "resultCode: " + resultCode + " requestCode: " + requestCode);
|
||||
|
||||
switch (requestCode) {
|
||||
case 1:
|
||||
if (resultCode == 0) {
|
||||
Log.e("Stock & Facing", "User cancelled");
|
||||
} else if (resultCode == -1) {
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
img = _pathforcheck;
|
||||
promoSkuListView();
|
||||
//t2PAdapter.notifyDataSetChanged();
|
||||
_pathforcheck = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (resultCode == 0) {
|
||||
Log.e("Stock & Facing", "User cancelled");
|
||||
} else if (resultCode == -1) {
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
//img = _pathforcheck;
|
||||
cd.setImage_promotion(_pathforcheck);
|
||||
_pathforcheck = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
private static String arabicToenglish(String number) {
|
||||
char[] chars = new char[number.length()];
|
||||
for (int i = 0; i < number.length(); i++) {
|
||||
char ch = number.charAt(i);
|
||||
if (ch >= 0x0660 && ch <= 0x0669)
|
||||
ch -= 0x0660 - '0';
|
||||
else if (ch >= 0x06f0 && ch <= 0x06F9)
|
||||
ch -= 0x06f0 - '0';
|
||||
chars[i] = ch;
|
||||
}
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
public String getCurrentTime() {
|
||||
Calendar m_cal = Calendar.getInstance();
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss:mmm");
|
||||
String cdate = formatter.format(m_cal.getTime());
|
||||
|
||||
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_KSA)) {
|
||||
cdate = arabicToenglish(cdate);
|
||||
} else if (preferences.getString(CommonString.KEY_LANGUAGE, "").equalsIgnoreCase(CommonString.KEY_LANGUAGE_ARABIC_UAE)) {
|
||||
cdate = arabicToenglish(cdate);
|
||||
}
|
||||
|
||||
return cdate;
|
||||
}
|
||||
}
|
||||
|
||||
+336
-691
File diff suppressed because it is too large
Load Diff
@@ -481,7 +481,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
for (int i1 = 0; i1 < promotionSkuList.size(); i1++) {
|
||||
if (!promotionSkuList.get(i1).getCategory_id().equals("0")) {
|
||||
|
||||
onXML = "[PROMOTION_DATA]"
|
||||
onXML = "[PROMOTION_DATA_NEW]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[CATEGORY_ID]" + Integer.parseInt(promotionSkuList.get(i1).getCategory_id()) + "[/CATEGORY_ID]"
|
||||
@@ -491,7 +491,8 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[IN_STOCK]" + Integer.parseInt(promotionSkuList.get(i1).getIn_stock()) + "[/IN_STOCK]"
|
||||
+ "[PROMO_ANNOUNCER]" + Integer.parseInt(promotionSkuList.get(i1).getPromo_announcer()) + "[/PROMO_ANNOUNCER]"
|
||||
+ "[RUNNING_POS]" + Integer.parseInt(promotionSkuList.get(i1).getRunning_pos()) + "[/RUNNING_POS]"
|
||||
+ "[/PROMOTION_DATA]";
|
||||
+ "[PROMO_IMAGE]" + promotionSkuList.get(i1).getImage_promotion() + "[/PROMO_IMAGE]"
|
||||
+ "[/PROMOTION_DATA_NEW]";
|
||||
|
||||
promoition_data_xml = promoition_data_xml + onXML;
|
||||
}
|
||||
@@ -501,7 +502,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "PROMOTION_DATA");
|
||||
request.addProperty("KEYS", "PROMOTION_DATA_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -532,7 +533,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
for (int i1 = 0; i1 < additionalPromotionList.size(); i1++) {
|
||||
if (!additionalPromotionList.get(i1).getCategory_id().equals("0")) {
|
||||
|
||||
onXML = "[ADDITIONAL_PROMOTION_DATA]"
|
||||
onXML = "[ADDITIONAL_PROMOTION_DATA_NEW]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[CATEGORY_ID]" + Integer.parseInt(additionalPromotionList.get(i1).getCategory_id()) + "[/CATEGORY_ID]"
|
||||
@@ -542,7 +543,8 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[IN_STOCK]" + Integer.parseInt(additionalPromotionList.get(i1).getIn_stock()) + "[/IN_STOCK]"
|
||||
+ "[PROMO_ANNOUNCER]" + Integer.parseInt(additionalPromotionList.get(i1).getPromo_announcer()) + "[/PROMO_ANNOUNCER]"
|
||||
+ "[RUNNING_POS]" + Integer.parseInt(additionalPromotionList.get(i1).getRunning_pos()) + "[/RUNNING_POS]"
|
||||
+ "[/ADDITIONAL_PROMOTION_DATA]";
|
||||
+ "[ADD_PROMO_IMAGE]" + additionalPromotionList.get(i1).getImage_promotion() + "[/ADD_PROMO_IMAGE]"
|
||||
+ "[/ADDITIONAL_PROMOTION_DATA_NEW]";
|
||||
|
||||
additional_promoition_data_xml = additional_promoition_data_xml + onXML;
|
||||
}
|
||||
@@ -552,7 +554,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "ADDITIONAL_PROMOTION_DATA");
|
||||
request.addProperty("KEYS", "ADDITIONAL_PROMOTION_DATA_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -1158,6 +1160,94 @@ public class UploadActivity extends AppCompatActivity {
|
||||
data.value = 75;
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
if (adddata.size() > 0) {
|
||||
for (int i1 = 0; i1 < adddata.size(); i1++) {
|
||||
|
||||
if (adddata.get(i1).getCategoryImage1() != null && !adddata.get(i1).getCategoryImage1().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage1()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (adddata.get(i1).getCategoryImage2() != null && !adddata.get(i1).getCategoryImage2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (adddata.get(i1).getCategoryImage3() != null && !adddata.get(i1).getCategoryImage3().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage3()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (adddata.get(i1).getCategoryImage4() != null && !adddata.get(i1).getCategoryImage4().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage4()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "CategoryImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("CategoryImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
data.value = 75;
|
||||
publishProgress(data);
|
||||
|
||||
//Start store images
|
||||
if (coverageList.size() > 0) {
|
||||
for (int i1 = 0; i1 < coverageList.size(); i1++) {
|
||||
@@ -1187,6 +1277,64 @@ public class UploadActivity extends AppCompatActivity {
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
//PromoCompliance Image
|
||||
if (promotionSkuList.size() > 0) {
|
||||
for (int i1 = 0; i1 < promotionSkuList.size(); i1++) {
|
||||
|
||||
if (promotionSkuList.get(i1).getImage_promotion() != null && !promotionSkuList.get(i1).getImage_promotion().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + promotionSkuList.get(i1).getImage_promotion()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(promotionSkuList.get(i1).getImage_promotion(), "PromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("PromotionImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
data.value = 85;
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
//Additional PromoCompliance Image
|
||||
if (additionalPromotionList.size() > 0) {
|
||||
for (int i1 = 0; i1 < additionalPromotionList.size(); i1++) {
|
||||
|
||||
if (additionalPromotionList.get(i1).getImage_promotion() != null && !additionalPromotionList.get(i1).getImage_promotion().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalPromotionList.get(i1).getImage_promotion()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalPromotionList.get(i1).getImage_promotion(), "AdditionalPromotionImages");
|
||||
/*if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "StoreImages";
|
||||
}*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalPromotionImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
data.value = 88;
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
//CheckOut Store Image
|
||||
if (coverageList.size() > 0) {
|
||||
for (int i1 = 0; i1 < coverageList.size(); i1++) {
|
||||
|
||||
+10
-1
@@ -7,7 +7,8 @@ import java.util.ArrayList;
|
||||
*/
|
||||
|
||||
public class Promo_Compliance_DataGetterSetter {
|
||||
String store_id, sku_id, sku, promo_id, promo, in_stock, promo_announcer, running_pos, sp_promo, category_id;
|
||||
String store_id, sku_id, sku, promo_id, promo, in_stock, promo_announcer,
|
||||
running_pos, sp_promo, category_id,image_promotion;
|
||||
|
||||
public String getStore_id() {
|
||||
return store_id;
|
||||
@@ -88,4 +89,12 @@ public class Promo_Compliance_DataGetterSetter {
|
||||
public void setCategory_id(String category_id) {
|
||||
this.category_id = category_id;
|
||||
}
|
||||
|
||||
public String getImage_promotion() {
|
||||
return image_promotion;
|
||||
}
|
||||
|
||||
public void setImage_promotion(String image_promotion) {
|
||||
this.image_promotion = image_promotion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/grey_background" />
|
||||
|
||||
<stroke
|
||||
android:width="1dip"
|
||||
android:color="#888" />
|
||||
</shape>
|
||||
@@ -90,16 +90,39 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2">
|
||||
|
||||
<Button
|
||||
android:id="@+id/delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@color/grey_background"
|
||||
android:text="@string/delete" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="15dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/camera_green" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@color/grey_background"
|
||||
android:text="@string/delete" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -252,17 +252,42 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingRight="15dp">
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingRight="15dp"
|
||||
android:weightSum="1">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_promotion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_addPromotion"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="5dp" />
|
||||
<!--android:src="@mipmap/camera_grey"-->
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:text="@string/promo_compliance_add"
|
||||
android:textColor="@color/white" />
|
||||
android:layout_weight=".5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/colorPrimaryDark"
|
||||
android:text="@string/promo_compliance_add"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="35"
|
||||
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
@@ -24,12 +24,10 @@
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:id="@+id/relativelayout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginBottom="1sp"
|
||||
|
||||
android:padding="10sp">
|
||||
|
||||
<ImageView
|
||||
@@ -42,16 +40,32 @@
|
||||
android:paddingTop="5sp"
|
||||
android:src="@mipmap/store" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/geolistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/geolistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/geolistviewxml_storeico"
|
||||
android:text="GSK MT ORANGE STORE"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/geolistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="GSK MT ORANGE STORE"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_storeAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="STORE Address"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
@@ -60,8 +74,8 @@
|
||||
android:layout_alignBottom="@+id/geolistviewxml_storeico"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@mipmap/geopin"
|
||||
android:visibility="gone"/>
|
||||
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
</RelativeLayout>
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<!-- <TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
@@ -28,7 +28,48 @@
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/promo_compliance_promos_sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
android:textColor="@color/black" />-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/promo_compliance_promos_sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_promotion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_add_promotion_view"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="5dp" />
|
||||
<!--android:src="@mipmap/camera_grey"-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!--Promo sku name-->
|
||||
<LinearLayout
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:weightSum="5">
|
||||
@@ -90,6 +91,8 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight=".25"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
@@ -98,17 +101,26 @@
|
||||
android:id="@+id/ed_facing"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:maxLength="5"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_weight=".25"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
@@ -117,13 +129,22 @@
|
||||
android:id="@+id/ed_stock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:maxLength="5"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="#222"
|
||||
android:textColorHint="#666"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/stock_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -17,15 +17,46 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/promo_compliance_promos_sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/promo_compliance_promos_sku"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lin_promotion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight=".2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_promotion"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="5dp" />
|
||||
<!--android:src="@mipmap/camera_grey"-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!--Promo sku name-->
|
||||
<LinearLayout
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="Text"
|
||||
android:textSize="15dp" />
|
||||
@@ -65,7 +65,7 @@
|
||||
<string name="menu_setting">Settings</string>
|
||||
<string name="menu_services">Services</string>
|
||||
|
||||
<string name="title_activity_t2_pcompliance">T2P Compliance</string>
|
||||
<string name="title_activity_t2_pcompliance">Monthly Availability</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">T2P Compliance</string>
|
||||
<string name="daily_data_menu_t2p">Monthly Availability</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>
|
||||
|
||||
Reference in New Issue
Block a user