Merge pull request #6 from CPM-INDIA-SALES-AND-MARKETING-PVT-LTD/GeoT
Geo t
This commit is contained in:
Generated
+2
-1
@@ -3,8 +3,9 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="C:\Program Files\Android\Android Studio2\gradle\gradle-2.14.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
||||
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">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "24.0.1"
|
||||
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".dailyentry.StoreListActivity"
|
||||
android:label="@string/title_activity_store_list_geotag"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
@@ -2,10 +2,15 @@ package cpm.com.gskmtorange.Database;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.JourneyPlanGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlHandlers.TableBean;
|
||||
|
||||
@@ -125,8 +130,84 @@ public class GSKOrangeDB extends SQLiteOpenHelper{
|
||||
|
||||
|
||||
|
||||
public ArrayList<StoreBean> getStoreData(String date) {
|
||||
|
||||
|
||||
ArrayList<StoreBean> list = new ArrayList<StoreBean>();
|
||||
Cursor dbcursor = null;
|
||||
|
||||
try {
|
||||
|
||||
dbcursor = db.rawQuery("SELECT * from JOURNEY_PLAN where VISIT_DATE ='" + date + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
StoreBean sb = new StoreBean();
|
||||
|
||||
sb.setSTORE_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORE_ID")));
|
||||
|
||||
sb.setEMP_ID((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("EMP_ID"))));
|
||||
|
||||
sb.setKEYACCOUNT(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("KEYACCOUNT")));
|
||||
|
||||
sb.setSTORE_NAME(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORE_NAME")));
|
||||
|
||||
sb.setADDRESS((dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("ADDRESS"))));
|
||||
sb.setCITY(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CITY")));
|
||||
|
||||
sb.setSTORETYPE(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORETYPE")));
|
||||
|
||||
sb.setCLASSIFICATION(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CLASSIFICATION")));
|
||||
|
||||
sb.setKEYACCOUNT_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("KEYACCOUNT_ID")));
|
||||
|
||||
sb.setSTORETYPE_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("STORETYPE_ID")));
|
||||
|
||||
sb.setCLASS_ID(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CLASS_ID")));
|
||||
|
||||
sb.setVISIT_DATE(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("VISIT_DATE")));
|
||||
|
||||
sb.setCAMERA_ALLOW(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CAMERA_ALLOW")));
|
||||
|
||||
sb.setUPLOAD_STATUS(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("UPLOAD_STATUS")));
|
||||
sb.setCHECKOUT_STATUS(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("CHECKOUT_STATUS")));
|
||||
|
||||
sb.setGEO_TAG(dbcursor.getString(dbcursor
|
||||
.getColumnIndexOrThrow("GEO_TAG")));
|
||||
|
||||
|
||||
list.add(sb);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d("Exception get JCP!", e.toString());
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ import cpm.com.gskmtorange.R;
|
||||
* Created by ashishc on 27-12-2016.
|
||||
*/
|
||||
|
||||
public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallback,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener{
|
||||
public class GeoTagActivity extends AppCompatActivity //implements OnMapReadyCallback,GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener
|
||||
{
|
||||
|
||||
private GoogleMap mMap;
|
||||
double latitude =0.0;
|
||||
@@ -40,7 +41,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCa
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
//username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
|
||||
|
||||
fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
@@ -51,7 +52,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCa
|
||||
|
||||
mapFragment = (SupportMapFragment) getSupportFragmentManager()
|
||||
.findFragmentById(R.id.map);
|
||||
mapFragment.getMapAsync(this);
|
||||
// mapFragment.getMapAsync(this);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package cpm.com.gskmtorange.GetterSetter;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreBean {
|
||||
|
||||
String STORE_ID;
|
||||
String EMP_ID;
|
||||
String KEYACCOUNT;
|
||||
String STORE_NAME;
|
||||
String ADDRESS;
|
||||
String CITY;
|
||||
String STORETYPE;
|
||||
String CLASSIFICATION;
|
||||
String KEYACCOUNT_ID;
|
||||
String STORETYPE_ID;
|
||||
String CLASS_ID;
|
||||
String VISIT_DATE;
|
||||
String CAMERA_ALLOW;
|
||||
String UPLOAD_STATUS;
|
||||
|
||||
public String getSTORE_ID() {
|
||||
return STORE_ID;
|
||||
}
|
||||
|
||||
public void setSTORE_ID(String STORE_ID) {
|
||||
this.STORE_ID = STORE_ID;
|
||||
}
|
||||
|
||||
public String getEMP_ID() {
|
||||
return EMP_ID;
|
||||
}
|
||||
|
||||
public void setEMP_ID(String EMP_ID) {
|
||||
this.EMP_ID = EMP_ID;
|
||||
}
|
||||
|
||||
public String getKEYACCOUNT() {
|
||||
return KEYACCOUNT;
|
||||
}
|
||||
|
||||
public void setKEYACCOUNT(String KEYACCOUNT) {
|
||||
this.KEYACCOUNT = KEYACCOUNT;
|
||||
}
|
||||
|
||||
public String getSTORE_NAME() {
|
||||
return STORE_NAME;
|
||||
}
|
||||
|
||||
public void setSTORE_NAME(String STORE_NAME) {
|
||||
this.STORE_NAME = STORE_NAME;
|
||||
}
|
||||
|
||||
public String getADDRESS() {
|
||||
return ADDRESS;
|
||||
}
|
||||
|
||||
public void setADDRESS(String ADDRESS) {
|
||||
this.ADDRESS = ADDRESS;
|
||||
}
|
||||
|
||||
public String getCITY() {
|
||||
return CITY;
|
||||
}
|
||||
|
||||
public void setCITY(String CITY) {
|
||||
this.CITY = CITY;
|
||||
}
|
||||
|
||||
public String getSTORETYPE() {
|
||||
return STORETYPE;
|
||||
}
|
||||
|
||||
public void setSTORETYPE(String STORETYPE) {
|
||||
this.STORETYPE = STORETYPE;
|
||||
}
|
||||
|
||||
public String getCLASSIFICATION() {
|
||||
return CLASSIFICATION;
|
||||
}
|
||||
|
||||
public void setCLASSIFICATION(String CLASSIFICATION) {
|
||||
this.CLASSIFICATION = CLASSIFICATION;
|
||||
}
|
||||
|
||||
public String getKEYACCOUNT_ID() {
|
||||
return KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public void setKEYACCOUNT_ID(String KEYACCOUNT_ID) {
|
||||
this.KEYACCOUNT_ID = KEYACCOUNT_ID;
|
||||
}
|
||||
|
||||
public String getSTORETYPE_ID() {
|
||||
return STORETYPE_ID;
|
||||
}
|
||||
|
||||
public void setSTORETYPE_ID(String STORETYPE_ID) {
|
||||
this.STORETYPE_ID = STORETYPE_ID;
|
||||
}
|
||||
|
||||
public String getCLASS_ID() {
|
||||
return CLASS_ID;
|
||||
}
|
||||
|
||||
public void setCLASS_ID(String CLASS_ID) {
|
||||
this.CLASS_ID = CLASS_ID;
|
||||
}
|
||||
|
||||
public String getVISIT_DATE() {
|
||||
return VISIT_DATE;
|
||||
}
|
||||
|
||||
public void setVISIT_DATE(String VISIT_DATE) {
|
||||
this.VISIT_DATE = VISIT_DATE;
|
||||
}
|
||||
|
||||
public String getCAMERA_ALLOW() {
|
||||
return CAMERA_ALLOW;
|
||||
}
|
||||
|
||||
public void setCAMERA_ALLOW(String CAMERA_ALLOW) {
|
||||
this.CAMERA_ALLOW = CAMERA_ALLOW;
|
||||
}
|
||||
|
||||
public String getUPLOAD_STATUS() {
|
||||
return UPLOAD_STATUS;
|
||||
}
|
||||
|
||||
public void setUPLOAD_STATUS(String UPLOAD_STATUS) {
|
||||
this.UPLOAD_STATUS = UPLOAD_STATUS;
|
||||
}
|
||||
|
||||
public String getCHECKOUT_STATUS() {
|
||||
return CHECKOUT_STATUS;
|
||||
}
|
||||
|
||||
public void setCHECKOUT_STATUS(String CHECKOUT_STATUS) {
|
||||
this.CHECKOUT_STATUS = CHECKOUT_STATUS;
|
||||
}
|
||||
|
||||
public String getGEO_TAG() {
|
||||
return GEO_TAG;
|
||||
}
|
||||
|
||||
public void setGEO_TAG(String GEO_TAG) {
|
||||
this.GEO_TAG = GEO_TAG;
|
||||
}
|
||||
|
||||
String CHECKOUT_STATUS;
|
||||
String GEO_TAG ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -117,6 +117,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||
//populateAutoComplete();
|
||||
|
||||
mPasswordView = (EditText) findViewById(R.id.password);
|
||||
|
||||
museridView.setText("testmer");
|
||||
mPasswordView.setText("cpm123");
|
||||
|
||||
|
||||
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import android.widget.TextView;
|
||||
|
||||
import cpm.com.gskmtorange.GeoTag.GeoTagStoreList;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.StoreListActivity;
|
||||
import cpm.com.gskmtorange.download.DownloadActivity;
|
||||
|
||||
public class MainActivity extends AppCompatActivity
|
||||
@@ -129,6 +130,13 @@ public class MainActivity extends AppCompatActivity
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.nav_route_plan) {
|
||||
|
||||
Intent startDownload = new Intent(this,StoreListActivity.class);
|
||||
startActivity(startDownload);
|
||||
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
|
||||
// Handle the camera action
|
||||
} else if (id == R.id.nav_download) {
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ public class CommonString {
|
||||
public static final String KEY_USERNAME = "username";
|
||||
public static final String KEY_PASSWORD = "password";
|
||||
public static final String KEY_DATE = "date";
|
||||
public static final String KEY_STOREVISITED_STATUS = "STOREVISITED_STATUS";
|
||||
|
||||
|
||||
|
||||
public static final String KEY_PATH = "path";
|
||||
public static final String KEY_VERSION = "APP_VERSION";
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
|
||||
/**
|
||||
* Created by ashishc on 29-12-2016.
|
||||
*/
|
||||
|
||||
public class StoreListActivity extends AppCompatActivity {
|
||||
|
||||
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
|
||||
|
||||
|
||||
ListView list;
|
||||
private SharedPreferences preferences;
|
||||
|
||||
String date,visit_status;
|
||||
GSKOrangeDB db;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.storelist);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
visit_status = preferences.getString(CommonString.KEY_STOREVISITED_STATUS, "");
|
||||
|
||||
db = new GSKOrangeDB(StoreListActivity.this);
|
||||
db.open();
|
||||
|
||||
|
||||
list = (ListView)findViewById(R .id.list_id);
|
||||
|
||||
|
||||
storelist = db.getStoreData(date);
|
||||
|
||||
|
||||
if (storelist.size()>0) {
|
||||
list.setAdapter(new MyAdaptor());
|
||||
}
|
||||
|
||||
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view,
|
||||
int position, long id) {
|
||||
|
||||
|
||||
Toast.makeText(getApplicationContext(),"Click",Toast.LENGTH_LONG).show();
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private class MyAdaptor extends BaseAdapter {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
|
||||
return storelist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder holder = null;
|
||||
if (convertView == null) {
|
||||
holder = new ViewHolder();
|
||||
|
||||
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
convertView = inflater.inflate(R.layout.storeviewlist, null);
|
||||
|
||||
holder.storename = (TextView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storename);
|
||||
holder.storeaddress = (TextView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storeaddress);
|
||||
|
||||
holder.imgtick = (ImageView) convertView
|
||||
.findViewById(R.id.storelistviewxml_storeico);
|
||||
|
||||
holder.checkout = (Button) convertView
|
||||
.findViewById(R.id.chkout);
|
||||
|
||||
holder.l1 = (RelativeLayout) convertView
|
||||
.findViewById(R.id.storenamelistview_layout);
|
||||
|
||||
convertView.setTag(holder);
|
||||
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
holder.storename.setText(storelist.get(position).getSTORE_NAME());
|
||||
holder.storeaddress.setText(storelist.get(position).getCITY());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
holder.checkout.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(
|
||||
StoreListActivity.this);
|
||||
builder.setMessage("Are you sure you want to checkout")
|
||||
.setCancelable(false)
|
||||
.setPositiveButton("OK",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
.setNegativeButton("Cancel",
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(
|
||||
DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private class ViewHolder {
|
||||
TextView storename, storeaddress;
|
||||
ImageView imgtick;
|
||||
Button checkout;
|
||||
|
||||
RelativeLayout l1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle action bar item clicks here. The action bar will
|
||||
// automatically handle clicks on the Home/Up button, so long
|
||||
// as you specify a parent activity in AndroidManifest.xml.
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id==android.R.id.home){
|
||||
|
||||
// NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,6 +25,10 @@ import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.net.MalformedURLException;
|
||||
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.LoginActivity;
|
||||
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
|
||||
@@ -45,7 +49,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
private TextView percentage, message;
|
||||
Data data;
|
||||
int eventType;
|
||||
|
||||
GSKOrangeDB db;
|
||||
private SharedPreferences preferences = null;
|
||||
String userId, culture_id;
|
||||
|
||||
@@ -63,6 +67,8 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_download);
|
||||
|
||||
db = new GSKOrangeDB(this);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
userId = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
culture_id = preferences.getString(CommonString.KEY_CULTURE_ID, null);
|
||||
@@ -433,6 +439,28 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
db.open();
|
||||
|
||||
db.InsertJCP(jcpgettersetter);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}catch (MalformedURLException e) {
|
||||
|
||||
/*final AlertMessage message = new AlertMessage(
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerColor="#fdfdfd"
|
||||
android:endColor="#d3dfe8"
|
||||
android:startColor="#e8eef4" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#b7ccdd" />
|
||||
|
||||
<padding
|
||||
android:bottom="6dp"
|
||||
android:left="6dp"
|
||||
android:right="6dp"
|
||||
android:top="6dp" />
|
||||
|
||||
<margin
|
||||
android:bottom="15dp"
|
||||
android:left="15dp"
|
||||
android:right="15dp"
|
||||
android:top="15dp" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:centerColor="#f5cd4a"
|
||||
android:endColor="#e8c34e"
|
||||
android:startColor="#ffe181" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#e3b52c" />
|
||||
|
||||
<padding
|
||||
android:bottom="6dp"
|
||||
android:left="6dp"
|
||||
android:right="6dp"
|
||||
android:top="6dp" />
|
||||
|
||||
<margin
|
||||
android:bottom="15dp"
|
||||
android:left="15dp"
|
||||
android:right="15dp"
|
||||
android:top="15dp" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/gradient_bg" android:state_pressed="false" android:state_selected="false"/>
|
||||
<item android:drawable="@drawable/gradient_bg_hover" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/gradient_bg_hover" android:state_pressed="false" android:state_selected="true"/>
|
||||
|
||||
</selector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -0,0 +1,81 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:weightSum="100"
|
||||
>
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/storename"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_weight="10"
|
||||
android:visibility="gone"
|
||||
android:background="#ff9933"
|
||||
android:padding="5sp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/store_ID"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="20dp"
|
||||
android:text="Stores"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/storelist"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
|
||||
android:layout_weight="100"
|
||||
|
||||
>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_id"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:cacheColorHint="#00000000"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#ff9933"
|
||||
android:dividerHeight="2dp"
|
||||
android:drawSelectorOnTop="false"
|
||||
android:fastScrollEnabled="true"
|
||||
android:smoothScrollbar="true" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/storenamelistview_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/list_selector"
|
||||
android:padding="10sp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/storelistviewxml_storeico"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginRight="6sp"
|
||||
android:background="@drawable/store"
|
||||
android:paddingTop="5sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/storelistviewxml_storeico"
|
||||
android:layout_toRightOf="@+id/storelistviewxml_storeico"
|
||||
android:text="Balaji Tele Communication"
|
||||
android:textColor="#1F3A6C"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/storelistviewxml_storeaddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/storelistviewxml_storename"
|
||||
android:layout_below="@+id/storelistviewxml_storename"
|
||||
android:text="C 126, Okhla II, "
|
||||
android:textColor="#666666"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/chkout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:focusable="false"
|
||||
android:visibility="invisible" />
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -24,7 +24,7 @@
|
||||
<string name="select_language">Please select language</string>
|
||||
<string name="title_activity_select_language">SelectLanguageActivity</string>
|
||||
|
||||
<string name="title_activity_store_list_geotag">StoreListActivity</string>
|
||||
<string name="title_activity_store_list_geotag">Store List</string>
|
||||
|
||||
|
||||
<string name="menu_daily_route_plan">Daily Route Plan</string>
|
||||
|
||||
Reference in New Issue
Block a user