review
This commit is contained in:
+21
@@ -56,6 +56,27 @@ public class AddittionalGetterSetter {
|
||||
|
||||
String Brand,Brand_id,Sku,Sku_id,Store_id,Image;
|
||||
|
||||
|
||||
String Image2;
|
||||
|
||||
public String getImage3() {
|
||||
return Image3;
|
||||
}
|
||||
|
||||
public void setImage3(String image3) {
|
||||
Image3 = image3;
|
||||
}
|
||||
|
||||
public String getImage2() {
|
||||
return Image2;
|
||||
}
|
||||
|
||||
public void setImage2(String image2) {
|
||||
Image2 = image2;
|
||||
}
|
||||
|
||||
String Image3;
|
||||
|
||||
public String getKey_id() {
|
||||
return key_id;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package cpm.com.gskmtorange.constant;
|
||||
|
||||
import android.os.Environment;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 19-12-2016.
|
||||
*/
|
||||
@@ -145,6 +147,8 @@ public class CommonString {
|
||||
|
||||
public static final String MESSAGE_EXCEPTION = "Problem Occured : Report The Problem To Parinaam ";
|
||||
public static final String MESSAGE_SOCKETEXCEPTION = "Network Communication Failure. Check Your Network Connection";
|
||||
public static final String MESSAGE_XmlPull = "Problem Occured xml pull: Report The Problem To Parinaam";
|
||||
|
||||
public static final String TABLE_STORE_GEOTAGGING = "STORE_GEOTAGGING";
|
||||
public static final String TABLE_COVERAGE_DATA = "COVERAGE_DATA";
|
||||
|
||||
@@ -338,6 +342,10 @@ public class CommonString {
|
||||
|
||||
+ "image_url"
|
||||
+ " VARCHAR,"
|
||||
+ "image_url2"
|
||||
+ " VARCHAR,"
|
||||
+ "image_url3"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "sku_id"
|
||||
+ " VARCHAR,"
|
||||
@@ -459,6 +467,10 @@ public class CommonString {
|
||||
|
||||
+ "image_url"
|
||||
+ " VARCHAR,"
|
||||
+ "image_url2"
|
||||
+ " VARCHAR,"
|
||||
+ "image_url3"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+ "sku_id"
|
||||
+ " VARCHAR,"
|
||||
|
||||
+106
-36
@@ -80,11 +80,10 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
Spinner spinner_brand, spinner_sku;
|
||||
Spinner spinner_brand_list, spinner_sku_list;
|
||||
|
||||
|
||||
AdditionalDialogGetterSetter additionalgeetersetter;
|
||||
public static ArrayList<AddittionalGetterSetter> data = new ArrayList<AddittionalGetterSetter>();
|
||||
ToggleButton btntoggle;
|
||||
ImageView btnimage, btnedit;
|
||||
ImageView btnimage, btnedit,btnimage1,btnimage2;
|
||||
Button btnsku, btnaddlayout;
|
||||
GSKOrangeDB db;
|
||||
ArrayList<SkuGetterSetter> sku_list;
|
||||
@@ -101,9 +100,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
|
||||
ArrayList<SkuGetterSetter> empty_list = new ArrayList<>();
|
||||
String _pathforcheck, _path, str, msg;
|
||||
String _pathforcheck1,_pathforcheck2,_pathforcheck3, _path, str, msg;
|
||||
private SharedPreferences preferences;
|
||||
String store_id, date, intime, img_str, togglevalue = "1", CATEGORY_ID, camera_allow,store_type_id,class_id,key_account_id;
|
||||
String store_id, date, intime, img_str1,img_str2,img_str3, togglevalue = "1", CATEGORY_ID, camera_allow,store_type_id,class_id,key_account_id;
|
||||
ImageView img_cam, img_clicked;
|
||||
Button btn_add, btn_close;
|
||||
EditText Edt_txt;
|
||||
@@ -152,6 +151,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
cardvew = (CardView) findViewById(R.id.cardviewid);
|
||||
btntoggle = (ToggleButton) findViewById(R.id.btntoggle);
|
||||
btnimage = (ImageView) findViewById(R.id.btn_image);
|
||||
btnimage1 = (ImageView) findViewById(R.id.btn_image2);
|
||||
btnimage2 = (ImageView) findViewById(R.id.btn_image3);
|
||||
|
||||
btnedit = (ImageView) findViewById(R.id.btn_edit);
|
||||
btnsku = (Button) findViewById(R.id.btn_sku);
|
||||
btnaddlayout = (Button) findViewById(R.id.btadd);
|
||||
@@ -236,7 +238,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
listviewlay.setVisibility(View.INVISIBLE);
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
btntoggle.setChecked(false);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
@@ -261,7 +263,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
maincard.setVisibility(View.INVISIBLE);
|
||||
btntoggle.setChecked(false);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
@@ -317,6 +319,8 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
newadd.setBrand(listdata.get(J).getBrand_id());
|
||||
newadd.setBrand_id(listdata.get(J).getBrand_id());
|
||||
newadd.setImage(listdata.get(J).getImage());
|
||||
newadd.setImage2(listdata.get(J).getImage2());
|
||||
newadd.setImage3(listdata.get(J).getImage3());
|
||||
newadd.setSku(listdata.get(J).getSku());
|
||||
newadd.setSku_id(listdata.get(J).getSku_id());
|
||||
newadd.setStore_id(listdata.get(J).getStore_id());
|
||||
@@ -365,21 +369,23 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(brand_list_name);
|
||||
newadd.setBrand_id(brand_list_id);
|
||||
newadd.setImage(img_str);
|
||||
newadd.setSku(sku_list_name);
|
||||
newadd.setSku_id(sku_list_id);
|
||||
newadd.setStore_id(store_id);
|
||||
newadd.setBtn_toogle(togglevalue);
|
||||
newadd.setCategoryId(categoryId);
|
||||
newadd = new AddittionalGetterSetter();
|
||||
newadd.setBrand(brand_list_name);
|
||||
newadd.setBrand_id(brand_list_id);
|
||||
newadd.setImage(img_str1);
|
||||
newadd.setImage2(img_str2);
|
||||
newadd.setImage3(img_str3);
|
||||
newadd.setSku(sku_list_name);
|
||||
newadd.setSku_id(sku_list_id);
|
||||
newadd.setStore_id(store_id);
|
||||
newadd.setBtn_toogle(togglevalue);
|
||||
newadd.setCategoryId(categoryId);
|
||||
|
||||
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
|
||||
finish();
|
||||
db.InsertMainListAdditionalData(newadd, additionalVisibilitySkuList, categoryId);
|
||||
finish();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
|
||||
@@ -395,7 +401,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
// show it
|
||||
alertDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -409,7 +415,10 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
adGt = new AddittionalGetterSetter();
|
||||
adGt.setBrand(brand_list_name);
|
||||
adGt.setBrand_id(brand_list_id);
|
||||
adGt.setImage(img_str);
|
||||
adGt.setImage(img_str1);
|
||||
adGt.setImage2(img_str2);
|
||||
adGt.setImage3(img_str3);
|
||||
|
||||
adGt.setSku(sku_list_name);
|
||||
adGt.setSku_id(sku_list_id);
|
||||
adGt.setStore_id(store_id);
|
||||
@@ -431,7 +440,9 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
db.InsertAdditionalData(adGt, defdata, categoryId);
|
||||
spinner_brand_list.setSelection(0);
|
||||
spinner_sku_list.setSelection(0);
|
||||
img_str = "";
|
||||
img_str1 = "";
|
||||
img_str2 = "";
|
||||
img_str3 = "";
|
||||
brand_list_name = "";
|
||||
brand_list_id = "";
|
||||
sku_list_name = "";
|
||||
@@ -440,8 +451,15 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
if (camera_allow.equals("1")) {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_orange);
|
||||
|
||||
btnimage1.setBackgroundResource(R.mipmap.camera_orange);
|
||||
btnimage2.setBackgroundResource(R.mipmap.camera_orange);
|
||||
|
||||
} else {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_grey);
|
||||
|
||||
btnimage1.setBackgroundResource(R.mipmap.camera_grey);
|
||||
btnimage2.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
|
||||
@@ -512,7 +530,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
togglevalue = "1";
|
||||
btntoggle.setChecked(true);
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
@@ -561,7 +579,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
db.deleteStockEntryall(store_id, categoryId);
|
||||
togglevalue = "1";
|
||||
btntoggle.setChecked(true);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
@@ -589,7 +607,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
else{
|
||||
togglevalue = "1";
|
||||
btntoggle.setChecked(true);
|
||||
brandlayout.setVisibility(View.VISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.VISIBLE);
|
||||
cameralayout.setVisibility(View.VISIBLE);
|
||||
btnsku.setVisibility(View.VISIBLE);
|
||||
@@ -627,7 +645,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
defdata.clear();
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
@@ -660,7 +678,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
defdata.clear();
|
||||
btntoggle.setChecked(false);
|
||||
btnaddlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.INVISIBLE);
|
||||
brandlayout.setVisibility(View.GONE);
|
||||
diaplylayout.setVisibility(View.INVISIBLE);
|
||||
cameralayout.setVisibility(View.INVISIBLE);
|
||||
btnsku.setVisibility(View.INVISIBLE);
|
||||
@@ -677,19 +695,46 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
btnimage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck = store_id + "AdditionalVisibility" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
_pathforcheck1 = store_id + "AdditionalImage1" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
_path = CommonString.FILE_PATH + _pathforcheck1;
|
||||
intime = getCurrentTime();
|
||||
startCameraActivity();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
btnimage1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck2 = store_id + "AdditionalImage2" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck2;
|
||||
intime = getCurrentTime();
|
||||
startCameraActivity();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
btnimage2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
_pathforcheck3 = store_id + "AdditionalImage3" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck3;
|
||||
intime = getCurrentTime();
|
||||
startCameraActivity();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_grey);
|
||||
|
||||
|
||||
btnimage1.setBackgroundResource(R.mipmap.camera_grey);
|
||||
btnimage2.setBackgroundResource(R.mipmap.camera_grey);
|
||||
}
|
||||
|
||||
|
||||
@@ -993,15 +1038,36 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
|
||||
case -1:
|
||||
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
if (_pathforcheck1 != null && !_pathforcheck1.equals("")) {
|
||||
if (new File(str + _pathforcheck1).exists()) {
|
||||
|
||||
btnimage.setBackgroundResource(R.mipmap.camera_green);
|
||||
|
||||
img_str = _pathforcheck;
|
||||
_pathforcheck = "";
|
||||
img_str1 = _pathforcheck1;
|
||||
_pathforcheck1 = "";
|
||||
}
|
||||
}
|
||||
if (_pathforcheck2 != null && !_pathforcheck2.equals("")) {
|
||||
if (new File(str + _pathforcheck2).exists()) {
|
||||
|
||||
btnimage1.setBackgroundResource(R.mipmap.camera_green);
|
||||
|
||||
img_str2 = _pathforcheck2;
|
||||
_pathforcheck2 = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (_pathforcheck3 != null && !_pathforcheck3.equals("")) {
|
||||
if (new File(str + _pathforcheck3).exists()) {
|
||||
|
||||
btnimage2.setBackgroundResource(R.mipmap.camera_green);
|
||||
|
||||
img_str3 = _pathforcheck3;
|
||||
_pathforcheck3 = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1108,7 +1174,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
defdata.add(ab);
|
||||
// db.InsertStockDialog(ab);
|
||||
|
||||
spinner_brand.setSelection(0);
|
||||
// spinner_brand.setSelection(0);
|
||||
spinner_sku.setSelection(0);
|
||||
Edt_txt.setText("");
|
||||
|
||||
@@ -1512,7 +1578,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
flag = true;
|
||||
} else {
|
||||
|
||||
if (brandid.equalsIgnoreCase("") || skuid.equalsIgnoreCase("")) {
|
||||
if (/*brandid.equalsIgnoreCase("") ||*/ skuid.equalsIgnoreCase("")) {
|
||||
flag = false;
|
||||
|
||||
errormsg = getResources().getString(R.string.title_activity_select_dropdown);
|
||||
@@ -1524,6 +1590,10 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
|
||||
errormsg = getResources().getString(R.string.title_activity_take_image);
|
||||
|
||||
}
|
||||
else if (dialog.size() == 0) {
|
||||
errormsg = getResources().getString(R.string.title_activity_fill_sku);
|
||||
flag = false;
|
||||
}
|
||||
|
||||
} else if (dialog.size() == 0) {
|
||||
|
||||
|
||||
@@ -32,9 +32,11 @@ import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.StringReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Locale;
|
||||
@@ -91,6 +93,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
private TextView percentage, message;
|
||||
private SharedPreferences preferences = null;
|
||||
Toolbar toolbar;
|
||||
String str;
|
||||
boolean ResultFlag=true;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -473,7 +477,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
} else {
|
||||
return "DISPLAY_CHECKLIST_MASTER";
|
||||
}
|
||||
data.value = 55;
|
||||
data.value = 60;
|
||||
data.name = "DISPLAY_CHECKLIST_MASTER " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
@@ -506,7 +510,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (mappingChecklistGetterSetter.getCHECKLIST_ID().size() > 0) {
|
||||
data.value = 60;
|
||||
data.value = 65;
|
||||
data.name = "MAPPING_DISPLAY_CHECKLIST " + getResources().getString(R.string.download_data);
|
||||
} else {
|
||||
//return "MAPPING_DISPLAY_CHECKLIST";
|
||||
@@ -545,7 +549,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
} else {
|
||||
return "NON_WORKING_REASON";
|
||||
}
|
||||
data.value = 65;
|
||||
data.value = 70;
|
||||
data.name = "NON_WORKING_REASON " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
publishProgress(data);
|
||||
@@ -579,7 +583,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (mappingPromotionGetterSetter.getSTORE_ID().size() > 0) {
|
||||
data.value = 70;
|
||||
data.value = 75;
|
||||
data.name = "MAPPING_PROMOTION " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
|
||||
@@ -619,7 +623,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (mapping_additional_promotion_masterGetterSetter.getSTORE_ID().size() > 0) {
|
||||
data.value = 75;
|
||||
data.value = 80;
|
||||
data.name = "MAPPING_ADDITIONAL_PROMOTION " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
}
|
||||
@@ -654,7 +658,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (store_performance_masterGetterSetter.getSTORE_ID().size() > 0) {
|
||||
data.value = 80;
|
||||
data.value = 85;
|
||||
data.name = "STORE_PERFORMANCE Data Download";
|
||||
} else {
|
||||
//return "STORE_PERFORMANCE";
|
||||
@@ -694,7 +698,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
} else {
|
||||
//return "ADDITIONAL_DISPLAY_MASTER";
|
||||
}
|
||||
data.value = 100;
|
||||
data.value = 90;
|
||||
data.name = "ADDITIONAL_DISPLAY_MASTER Data Download";
|
||||
}
|
||||
publishProgress(data);
|
||||
@@ -727,7 +731,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
TableBean.setMappingPlanogram(table_mapping_planogram);
|
||||
}
|
||||
if (mapping_planogram_masterGetterSetter.getKEYACCOUNT_ID().size() > 0) {
|
||||
data.value = 85;
|
||||
data.value = 92;
|
||||
data.name = "MAPPING_PLANOGRAM Data Download";
|
||||
} else {
|
||||
//return "MAPPING_PLANOGRAM";
|
||||
@@ -765,7 +769,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
if (mapping_sos_target_masterGetterSetter.getSTORE_ID().size() > 0) {
|
||||
data.value = 75;
|
||||
data.value = 95;
|
||||
data.name = "MAPPING_SOS_TARGET " + getResources().getString(R.string.download_data);
|
||||
}
|
||||
}
|
||||
@@ -910,31 +914,53 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db.InsertMAPPING_SOS_TARGET(mapping_sos_target_masterGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_EXCEPTION, "download", e);*/
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// TODO Auto-generated method stub
|
||||
showAlert(CommonString.MESSAGE_EXCEPTION);
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
/* final AlertMessage message = new AlertMessage(
|
||||
CompleteDownloadActivity.this,
|
||||
AlertMessage.MESSAGE_SOCKETEXCEPTION, "socket", e);*/
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
showAlert(CommonString.MESSAGE_SOCKETEXCEPTION);
|
||||
}
|
||||
});
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_EXCEPTION;
|
||||
return CommonString.MESSAGE_EXCEPTION;
|
||||
}
|
||||
return "";
|
||||
catch (SocketTimeoutException e) {
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||
}
|
||||
catch (InterruptedIOException e){
|
||||
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_EXCEPTION;
|
||||
return CommonString.MESSAGE_EXCEPTION;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||
return CommonString.MESSAGE_SOCKETEXCEPTION;
|
||||
}
|
||||
catch (XmlPullParserException e) {
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_XmlPull;
|
||||
return CommonString.MESSAGE_XmlPull;
|
||||
} catch (Exception e) {
|
||||
ResultFlag=false;
|
||||
str=CommonString.MESSAGE_EXCEPTION;
|
||||
|
||||
return CommonString.MESSAGE_EXCEPTION;
|
||||
}
|
||||
|
||||
if(ResultFlag)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -950,10 +976,16 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
protected void onPostExecute(String s) {
|
||||
super.onPostExecute(s);
|
||||
|
||||
dialog.dismiss();
|
||||
|
||||
showAlert(getString(R.string.data_downloaded_successfully));
|
||||
if(s.equalsIgnoreCase("")){
|
||||
dialog.dismiss();
|
||||
|
||||
showAlert(getString(R.string.data_downloaded_successfully));
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog.dismiss();
|
||||
showAlert(getString(R.string.datanotfound)+" "+s);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
onXML = "[ADDITIONAL_VISIBILITY_DATA]"
|
||||
onXML = "[ADDITIONAL_VISIBILITY_NEW]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]"
|
||||
+ userId
|
||||
@@ -650,19 +650,25 @@ public class UploadActivity extends AppCompatActivity {
|
||||
+ "[ADDITIONAL_DISPLAY]"
|
||||
+ additionalVisibilityList.get(J).getBtn_toogle()
|
||||
+ "[/ADDITIONAL_DISPLAY]"
|
||||
+ "[BRAND_ID]"
|
||||
/* + "[BRAND_ID]"
|
||||
+ additionalVisibilityList.get(J).getBrand_id()
|
||||
+ "[/BRAND_ID]"
|
||||
+ "[/BRAND_ID]"*/
|
||||
+ "[IMAGE_URL]"
|
||||
+ additionalVisibilityList.get(J).getImage()
|
||||
+ "[/IMAGE_URL]"
|
||||
+ "[IMAGE_URL1]"
|
||||
+ additionalVisibilityList.get(J).getImage2()
|
||||
+ "[/IMAGE_URL1]"
|
||||
+ "[IMAGE_URL2]"
|
||||
+ additionalVisibilityList.get(J).getImage3()
|
||||
+ "[/IMAGE_URL2]"
|
||||
+ "[DISPLAY_ID]"
|
||||
+ additionalVisibilityList.get(J).getSku_id()
|
||||
+ "[/DISPLAY_ID]"
|
||||
+ "[SKU_LIST]"
|
||||
+ additional_visibility_dialog_xml
|
||||
+ "[/SKU_LIST]"
|
||||
+ "[/ADDITIONAL_VISIBILITY_DATA]";
|
||||
+ "[/ADDITIONAL_VISIBILITY_NEW]";
|
||||
|
||||
|
||||
additional_visibility_data_xml = additional_visibility_data_xml + onXML;
|
||||
@@ -677,7 +683,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_VISIBILITY_DATA");
|
||||
request.addProperty("KEYS", "ADDITIONAL_VISIBILITY_NEW");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
@@ -893,9 +899,54 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage2() != null && !additionalVisibilityList.get(i1).getImage2().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalVisibilityList.get(i1).getImage2()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage2(), "AdditionalVisibilityImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalVisibilityImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (additionalVisibilityList.get(i1).getImage3() != null && !additionalVisibilityList.get(i1).getImage3().equals("")) {
|
||||
if (new File(CommonString.FILE_PATH + additionalVisibilityList.get(i1).getImage3()).exists()) {
|
||||
|
||||
try {
|
||||
result = UploadImage(additionalVisibilityList.get(i1).getImage3(), "AdditionalVisibilityImages");
|
||||
|
||||
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||
return "AdditionalVisibilityImages";
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
message.setText("AdditionalVisibilityImages Uploaded");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// ashish close image
|
||||
|
||||
///////Start store images
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="184dp"
|
||||
android:layout_height="96dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
@@ -22,6 +22,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="10"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:weightSum="25">
|
||||
|
||||
<TextView
|
||||
@@ -51,14 +52,14 @@
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_weight="10"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="25">
|
||||
android:weightSum="50">
|
||||
|
||||
<TextView
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:layout_weight="10"
|
||||
android:layout_weight="30"
|
||||
android:text="@string/displayname"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -106,19 +107,21 @@
|
||||
<!-- </LinearLayout> -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="25">
|
||||
|
||||
<Button
|
||||
android:id="@+id/delete_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_weight="10"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_weight="7"
|
||||
android:background="@color/grey_background"
|
||||
android:text="@string/delete" />
|
||||
android:text="@string/delete"
|
||||
android:layout_gravity="right"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -22,11 +22,10 @@
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="60"
|
||||
android:layout_weight="50"
|
||||
android:background="@color/grey_background"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
|
||||
@@ -77,7 +76,8 @@
|
||||
android:background="@color/grey_background"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="3">
|
||||
android:weightSum="3"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
@@ -133,12 +133,12 @@
|
||||
android:background="@color/grey_background"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp"
|
||||
android:weightSum="3">
|
||||
android:weightSum="5">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="1.5"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<TextView
|
||||
@@ -165,11 +165,38 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@mipmap/camera_orange" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_image2"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@mipmap/camera_orange" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_image3"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@mipmap/camera_orange" />
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".5"
|
||||
android:background="@color/grey_background">
|
||||
|
||||
<ImageView
|
||||
@@ -226,7 +253,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="40"
|
||||
android:layout_weight="50"
|
||||
android:padding="10dp"
|
||||
card_view:cardBackgroundColor="@color/colorOrange"
|
||||
card_view:cardCornerRadius="20dp"
|
||||
@@ -235,17 +262,17 @@
|
||||
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listviewlv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
<ListView
|
||||
android:id="@+id/listviewlv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true"></ListView>
|
||||
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
<string name="fill_gaps_data">Lütfen GAP verilerini doldurun</string>
|
||||
|
||||
<string name="enter_the_values">Değerleri girin</string>
|
||||
|
||||
<string name="datanotfound">Içinde bulunmayan veri</string>
|
||||
</resources>
|
||||
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
<string name="select_promo">Select</string>
|
||||
|
||||
<!--Gagan end code 3-->
|
||||
|
||||
|
||||
//text for uploading screen
|
||||
<string name="coverage_data_uploading">Coverage Uploading</string>
|
||||
<string name="availability_data_uploading">Availability Data Uploading</string>
|
||||
@@ -265,5 +265,5 @@
|
||||
<string name="first_geotag_the_store">First geotag the store</string>
|
||||
|
||||
<string name="new_update_available">New Update Available \n\n Yeni güncelleme var</string>
|
||||
|
||||
<string name="datanotfound">Data not found in</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user