T2P upload data newss
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<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">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
<activity
|
||||
android:name=".LoginActivity"
|
||||
android:label="@string/title_activity_login"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/main_menu_activity_name"
|
||||
@@ -43,7 +44,8 @@
|
||||
<activity
|
||||
android:name=".SelectLanguageActivity"
|
||||
android:label="@string/title_activity_select_language"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".download.DownloadActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
@@ -89,19 +91,23 @@
|
||||
android:name=".gsk_dailyentry.CategoryListActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.CategoryWisePerformanceActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.DailyDataMenuActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
<activity
|
||||
android:name=".gsk_dailyentry.MSL_AvailabilityActivity"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
@@ -148,15 +154,18 @@
|
||||
<activity
|
||||
android:name=".dailyentry.SettingsActivity"
|
||||
android:label="@string/title_activity_settings"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.CheckoutActivity"
|
||||
android:label="@string/title_activity_checkout"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".dailyentry.ServiceActivity"
|
||||
android:label="@string/title_activity_service"
|
||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:screenOrientation="portrait"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -130,12 +130,6 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_COVERAGE_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
|
||||
}
|
||||
|
||||
public void deleteAllTables() {
|
||||
|
||||
@@ -52,6 +52,7 @@ import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.CategoryListActivity;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
@@ -469,7 +470,7 @@ public class StoreListActivity extends AppCompatActivity {
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
dialog.cancel();
|
||||
} else {
|
||||
Intent in = new Intent(StoreListActivity.this, CategoryListActivity.class);
|
||||
Intent in = new Intent(StoreListActivity.this, StoreWisePerformanceActivity.class);
|
||||
startActivity(in);
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
dialog.cancel();
|
||||
|
||||
+80
-2
@@ -7,10 +7,13 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
@@ -33,6 +36,9 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
@@ -59,8 +65,10 @@ import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.fonts.FontManager;
|
||||
import cpm.com.gskmtorange.fonts.TextDrawable;
|
||||
import cpm.com.gskmtorange.gsk_dailyentry.Stock_FacingActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MAPPING_PLANOGRAM_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
|
||||
@@ -116,7 +124,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
rec_t2p = (RecyclerView) findViewById(R.id.rec_t2p);
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -168,6 +176,16 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
}
|
||||
|
||||
rec_t2p.addOnScrollListener(new RecyclerView.OnScrollListener(){
|
||||
@Override
|
||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy){
|
||||
if (dy > 0)
|
||||
fab.hide();
|
||||
else if (dy < 0)
|
||||
fab.show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -253,7 +271,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
holder.btn_ref_img.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
showPlanogram(mItem.getRef_image_url());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -978,4 +996,64 @@ public class T2PComplianceActivity extends AppCompatActivity {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void showPlanogram(String planogram_image){
|
||||
|
||||
final Dialog dialog = new Dialog(T2PComplianceActivity.this);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
//dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
dialog.setContentView(R.layout.planogram_dialog_layout);
|
||||
dialog.getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
|
||||
dialog.setCancelable(false);
|
||||
|
||||
//ArrayList<MAPPING_PLANOGRAM_DataGetterSetter> mp = db.getMappingPlanogramData("");
|
||||
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
|
||||
WebView webView = (WebView) dialog.findViewById(R.id.webview);
|
||||
webView.setWebViewClient(new MyWebViewClient());
|
||||
|
||||
webView.getSettings().setAllowFileAccess(true);
|
||||
webView.getSettings().setJavaScriptEnabled(true);
|
||||
webView.getSettings().setBuiltInZoomControls(true);
|
||||
|
||||
//String planogram_image = mp.get(0).getPLANOGRAM_IMAGE();
|
||||
if (new File(str + planogram_image).exists()) {
|
||||
|
||||
String imagePath = "file://" + CommonString.FILE_PATH + "/" + planogram_image;
|
||||
String html = "<html><head></head><body><img src=\"" + imagePath + "\"></body></html>";
|
||||
webView.loadDataWithBaseURL("", html, "text/html", "utf-8", "");
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
ImageView cancel = (ImageView) dialog.findViewById(R.id.img_cancel);
|
||||
cancel.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private class MyWebViewClient extends WebViewClient {
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
view.clearCache(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -85,6 +85,7 @@ public class CategoryWisePerformanceActivity extends AppCompatActivity {
|
||||
intent.putExtra("categoryName", categoryName);
|
||||
intent.putExtra("categoryId", categoryId);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
} catch (Resources.NotFoundException e) {
|
||||
|
||||
+1
@@ -103,6 +103,7 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(StoreWisePerformanceActivity.this, CategoryListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
} catch (Resources.NotFoundException e) {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package cpm.com.gskmtorange.upload;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
@@ -40,6 +42,7 @@ import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.FailureGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.GapsChecklistGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.MSL_AvailabilityGetterSetter;
|
||||
@@ -894,7 +897,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
///////close store images
|
||||
//T2p Images
|
||||
|
||||
for (int m = 0; m < t2PGetterSetters.size(); m++) {
|
||||
|
||||
@@ -984,7 +987,7 @@ public class UploadActivity extends AppCompatActivity {
|
||||
|
||||
dialog.dismiss();
|
||||
if (result.equals("")) {
|
||||
finish();
|
||||
showAlert(getString(R.string.menu_upload_data));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1022,4 +1025,22 @@ public class UploadActivity extends AppCompatActivity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void showAlert(String str) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(UploadActivity.this);
|
||||
builder.setTitle("Parinaam");
|
||||
builder.setMessage(str).setCancelable(false)
|
||||
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
|
||||
/* Intent i = new Intent(activity, StorelistActivity.class);
|
||||
activity.startActivity(i);
|
||||
activity.finish();*/
|
||||
finish();
|
||||
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,27 +126,6 @@
|
||||
<string name="title_activity_Want_to_delete1"> Verileri silmek istiyor musun</string>
|
||||
<string name="title_activity_click_delete">Silme için Evet tıklayın</string>
|
||||
<string name="title_activity_select_dropdown">Please Select dropdown</string>
|
||||
<string name="title_activity_take_image">Please Take a image</string>
|
||||
|
||||
<string name="title_activity_fill_sku">Please fill sku data</string>
|
||||
<string name="title_activity_enter_quantity">Please enter Quantity</string>
|
||||
<string name="title_activity_save_data">Do you want to save the data</string>
|
||||
|
||||
|
||||
<string name="clickimage">Please click the image</string>
|
||||
<string name="gps">GPS IS DISABLED...</string>
|
||||
<string name="gpsebale">Click ok to enable GPS.</string>
|
||||
<string name="takeimage"> Please Take Image Before Save</string>
|
||||
<string name="notsuppoted">This device is not supported.</string>
|
||||
<string name="uploaddata">Uploading Data</string>
|
||||
<string name="geotagdata">Uploading Geotag Data...</string>
|
||||
<string name="failure">failure</string>
|
||||
<string name="uploadimge">Uploading Geotag Images</string>
|
||||
<string name="success">success</string>
|
||||
<string name="wantcheckout">Are you sure you want to Checkout</string>
|
||||
<string name="nonetwork"> No Network</string>
|
||||
|
||||
<string name="click_image">Please click image</string>
|
||||
|
||||
<string name="export_database">Veritabanı Aktar</string>
|
||||
<string name="title_activity_service">Servisler</string>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
Reference in New Issue
Block a user