Deepak_commit_31_05_2018
This commit is contained in:
@@ -21,8 +21,8 @@ android {
|
||||
targetSdkVersion 22
|
||||
|
||||
//For Egypt
|
||||
/*versionCode 14
|
||||
versionName "2.6"*/
|
||||
versionCode 19
|
||||
versionName "3.1"
|
||||
|
||||
//For UAE
|
||||
/*versionCode 19
|
||||
@@ -33,8 +33,8 @@ android {
|
||||
versionName "2.7"*/
|
||||
|
||||
//For KSA
|
||||
versionCode 19
|
||||
versionName "3.1"
|
||||
/*versionCode 19
|
||||
versionName "3.1"*/
|
||||
|
||||
|
||||
multiDexEnabled true
|
||||
|
||||
@@ -266,36 +266,40 @@
|
||||
|
||||
<activity
|
||||
android:name=".storeinmap.StoreListMapActivity"
|
||||
android:label="@string/title_activity_store_list_map"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_store_list_map"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan"/>
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".storeinmap.StoreListRouteActivity"
|
||||
android:label="@string/title_activity_store_list_route"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_store_list_route"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan"/>
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".storeinmap.StoreRouteActivity"
|
||||
android:label="@string/title_activity_store_route"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_store_route"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan"/>
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".dailyentry.MessageActivity"
|
||||
android:label="@string/title_activity_message"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_message"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan"/>
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".dailyentry.ConversationActivity"
|
||||
android:label="@string/title_activity_conversation"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||
android:label="@string/title_activity_conversation"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan" ></activity>
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name=".dailyentry.CoachingVisitActivity"
|
||||
android:label="@string/title_activity_coaching_visit"
|
||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -19,6 +19,7 @@ import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.ChatMessageGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoachingVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
@@ -71,6 +72,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.StoreWisePerformaceGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.Store_wise_camera_DataGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SupervisorListGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.T2PGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
|
||||
@@ -79,7 +81,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
*/
|
||||
|
||||
public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB34";
|
||||
public static final String DATABASE_NAME = "GSK_ORANGE_DB35";
|
||||
public static final int DATABASE_VERSION = 15;
|
||||
TableBean tableBean;
|
||||
private SQLiteDatabase db;
|
||||
@@ -178,12 +180,14 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.execSQL(TableBean.getTable_NO_CAMERA_LAST_VISIT_DATA());
|
||||
db.execSQL(TableBean.getTable_GEO_FENCING());
|
||||
db.execSQL(TableBean.getTable_NON_WORKING_SUB_REASON());//--Added 26.09.2018
|
||||
db.execSQL(TableBean.getTable_SUPERVISOR_LIST());//--Added 01.10.2018
|
||||
|
||||
//15-03-2017
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_MSL_AVAILABILITY_STOCK_FACING);
|
||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_NO_CAMERA_FACING_DATA);
|
||||
db.execSQL(CommonString.CREATE_TABLE_AUDIT_DATA_SAVE);
|
||||
db.execSQL(CommonString.CREATE_TABLE_POG_DATA_SAVE);
|
||||
db.execSQL(CommonString.CREATE_TABLE_COACHING_VISIT);
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -238,6 +242,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.delete(CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA, CommonString.KEY_STORE_ID + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_AUDIT_DATA_SAVE, "STORE_CD" + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_POG_DATA_SAVE, "STORE_CD" + "='" + storeid + "'", null);
|
||||
db.delete(CommonString.TABLE_COACHING_VISIT, "STORE_ID" + "='" + storeid + "'", null);
|
||||
|
||||
}
|
||||
|
||||
@@ -273,6 +278,7 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
db.delete(CommonString.TABLE_INSERT_NO_CAMERA_FACING_DATA, null, null);
|
||||
db.delete(CommonString.TABLE_AUDIT_DATA_SAVE, null, null);
|
||||
db.delete(CommonString.TABLE_POG_DATA_SAVE, null, null);
|
||||
db.delete(CommonString.TABLE_COACHING_VISIT, null, null);
|
||||
}
|
||||
|
||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||
@@ -6520,7 +6526,121 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
||||
return list;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
//SUPERVISOR_LIST data
|
||||
|
||||
public void insertSUPERVISOR_LIST_DATA(SupervisorListGetterSetter data) {
|
||||
db.delete("SUPERVISOR_LIST", null, null);
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
|
||||
for (int i = 0; i < data.getEMP_ID().size(); i++) {
|
||||
|
||||
values.put("EMP_ID", Integer.parseInt(data.getEMP_ID().get(i)));
|
||||
values.put("SUPERVISOR", data.getSUPERVISOR().get(i));
|
||||
values.put("COUNTRY_ID", data.getCOUNTRY_ID().get(i));
|
||||
|
||||
db.insert("SUPERVISOR_LIST", null, values);
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// get Supervisor data for coaching visit
|
||||
public ArrayList<SupervisorListGetterSetter> getSupervisorListData() {
|
||||
|
||||
ArrayList<SupervisorListGetterSetter> list = new ArrayList<>();
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM SUPERVISOR_LIST ", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
SupervisorListGetterSetter sb = new SupervisorListGetterSetter();
|
||||
|
||||
sb.setEMP_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("EMP_ID")));
|
||||
|
||||
sb.setSUPERVISOR(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUPERVISOR")));
|
||||
|
||||
list.add(sb);
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return list;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public void insertCoachingVisitData(CoachingVisitGetterSetter data, String store_id) {
|
||||
db.delete("COACHING_VISIT", "STORE_ID" + "='" + store_id + "'", null);
|
||||
ContentValues values = new ContentValues();
|
||||
|
||||
try {
|
||||
values.put(CommonString.KEY_EMP_ID, Integer.parseInt(data.getEmp_id()));
|
||||
values.put(CommonString.KEY_STORE_ID, store_id);
|
||||
values.put(CommonString.KEY_IMAGE, data.getImg_path());
|
||||
|
||||
int exist;
|
||||
if(data.isExists()){
|
||||
exist = 1;
|
||||
}
|
||||
else {
|
||||
exist = 0;
|
||||
}
|
||||
values.put(CommonString.KEY_EXIST, exist);
|
||||
|
||||
db.insert("COACHING_VISIT", null, values);
|
||||
|
||||
} catch (Exception ex) {
|
||||
Log.d("Database Exception ", ex.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// get coaching visit data
|
||||
public CoachingVisitGetterSetter getCoachingVisitData(String store_id) {
|
||||
|
||||
CoachingVisitGetterSetter sb = new CoachingVisitGetterSetter();
|
||||
Cursor dbcursor = null;
|
||||
try {
|
||||
dbcursor = db.rawQuery("SELECT * FROM COACHING_VISIT where STORE_ID" + "='" + store_id + "'", null);
|
||||
|
||||
if (dbcursor != null) {
|
||||
dbcursor.moveToFirst();
|
||||
while (!dbcursor.isAfterLast()) {
|
||||
|
||||
sb.setEmp_id(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_EMP_ID)));
|
||||
|
||||
sb.setImg_path(dbcursor.getString(dbcursor.getColumnIndexOrThrow(CommonString.KEY_IMAGE)));
|
||||
sb.setExists(dbcursor.getInt(dbcursor.getColumnIndexOrThrow(CommonString.KEY_EXIST))==1);
|
||||
|
||||
dbcursor.moveToNext();
|
||||
}
|
||||
dbcursor.close();
|
||||
return sb;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
return sb;
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package cpm.com.gskmtorange.GetterSetter;
|
||||
|
||||
public class CoachingVisitGetterSetter {
|
||||
|
||||
String emp_id, img_path = "";
|
||||
boolean exists;
|
||||
|
||||
public String getEmp_id() {
|
||||
return emp_id;
|
||||
}
|
||||
|
||||
public void setEmp_id(String emp_id) {
|
||||
this.emp_id = emp_id;
|
||||
}
|
||||
|
||||
public String getImg_path() {
|
||||
return img_path;
|
||||
}
|
||||
|
||||
public void setImg_path(String img_path) {
|
||||
this.img_path = img_path;
|
||||
}
|
||||
|
||||
public boolean isExists() {
|
||||
return exists;
|
||||
}
|
||||
|
||||
public void setExists(boolean exists) {
|
||||
this.exists = exists;
|
||||
}
|
||||
}
|
||||
@@ -216,6 +216,19 @@ public class CommonString {
|
||||
+ KEY_REASON + " VARCHAR)";
|
||||
|
||||
|
||||
public static final String TABLE_COACHING_VISIT = "COACHING_VISIT";
|
||||
public static final String KEY_EXIST = "EXIST";
|
||||
|
||||
|
||||
public static final String CREATE_TABLE_COACHING_VISIT = "CREATE TABLE IF NOT EXISTS " + TABLE_COACHING_VISIT
|
||||
+ " ("
|
||||
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||
+ KEY_STORE_ID + " INTEGER,USER_ID VARCHAR, "
|
||||
+ KEY_EMP_ID + " VARCHAR,"
|
||||
+ KEY_IMAGE + " VARCHAR,"
|
||||
+ KEY_EXIST + " INTEGER)";
|
||||
|
||||
|
||||
public static final String CREATE_TABLE_STORE_GEOTAGGING = "CREATE TABLE IF NOT EXISTS "
|
||||
+ TABLE_STORE_GEOTAGGING
|
||||
+ " ("
|
||||
|
||||
@@ -0,0 +1,386 @@
|
||||
package cpm.com.gskmtorange.dailyentry;
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
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.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoachingVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SupervisorListGetterSetter;
|
||||
|
||||
public class CoachingVisitActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener, View.OnClickListener{
|
||||
|
||||
private GSKOrangeDB database;
|
||||
ArrayList<SupervisorListGetterSetter> supervisorList;
|
||||
private Spinner exist_spinner, supervisor_spinner;
|
||||
private ArrayAdapter<CharSequence> exist_adapter, supervisor_adapter;
|
||||
int coaching_visit;
|
||||
LinearLayout linear_supervisor;
|
||||
ImageView img_cam;
|
||||
FloatingActionButton fab_next, fab_save;
|
||||
String emp_id;
|
||||
protected String _pathforcheck = "", _path, image_name="", str;
|
||||
String visit_date, store_id, username;
|
||||
private SharedPreferences preferences;
|
||||
String gallery_package = "";
|
||||
Uri outputFileUri;
|
||||
boolean saved_flag = false, update_flag = false;
|
||||
CoachingVisitGetterSetter coachingVisitdata;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_coaching_visit);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
linear_supervisor = (LinearLayout) findViewById(R.id.linear_supervisor);
|
||||
exist_spinner = (Spinner) findViewById(R.id.spinner_coaching_visit);
|
||||
supervisor_spinner = (Spinner) findViewById(R.id.spinner_supervisor);
|
||||
img_cam = (ImageView) findViewById(R.id.img_cam);
|
||||
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
CommonFunctions.updateLangResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||
|
||||
str = CommonString.FILE_PATH;
|
||||
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, "");
|
||||
visit_date = preferences.getString(CommonString.KEY_DATE, null);
|
||||
username = preferences.getString(CommonString.KEY_USERNAME, null);
|
||||
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||
|
||||
fab_next = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab_save = (FloatingActionButton) findViewById(R.id.fab_save);
|
||||
|
||||
database = new GSKOrangeDB(this);
|
||||
database.open();
|
||||
|
||||
coachingVisitdata = database.getCoachingVisitData(store_id);
|
||||
|
||||
supervisorList = database.getSupervisorListData();
|
||||
|
||||
exist_adapter = new ArrayAdapter<>(this,
|
||||
android.R.layout.simple_spinner_item);
|
||||
|
||||
String select_str = getResources().getString(R.string.select);
|
||||
|
||||
exist_adapter.add(select_str);
|
||||
exist_adapter.add("Yes");
|
||||
exist_adapter.add("No");
|
||||
|
||||
exist_spinner.setAdapter(exist_adapter);
|
||||
|
||||
exist_adapter
|
||||
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
|
||||
exist_spinner.setOnItemSelectedListener(this);
|
||||
|
||||
if(coachingVisitdata!=null && coachingVisitdata.getEmp_id()!=null){
|
||||
update_flag = true;
|
||||
fab_save.setVisibility(View.GONE);
|
||||
fab_next.setVisibility(View.VISIBLE);
|
||||
if(coachingVisitdata.isExists()){
|
||||
exist_spinner.setSelection(1);
|
||||
}
|
||||
else {
|
||||
exist_spinner.setSelection(2);
|
||||
}
|
||||
|
||||
exist_spinner.setEnabled(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
fab_next.setOnClickListener(this);
|
||||
fab_save.setOnClickListener(this);
|
||||
img_cam.setOnClickListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
switch (parent.getId()) {
|
||||
case R.id.spinner_coaching_visit:
|
||||
if (position != 0) {
|
||||
|
||||
|
||||
|
||||
if(!update_flag){
|
||||
|
||||
fab_save.setVisibility(View.VISIBLE);
|
||||
|
||||
if(position==1){
|
||||
|
||||
linear_supervisor.setVisibility(View.VISIBLE);
|
||||
|
||||
coaching_visit = 1;
|
||||
|
||||
supervisor_adapter = new ArrayAdapter<CharSequence>(this,
|
||||
android.R.layout.simple_spinner_item);
|
||||
|
||||
String select_str = getResources().getString(R.string.select_promo);
|
||||
|
||||
supervisor_adapter.add(select_str);
|
||||
|
||||
for (int i = 0; i < supervisorList.size(); i++) {
|
||||
supervisor_adapter.add(supervisorList.get(i).getSUPERVISOR().get(0));
|
||||
}
|
||||
|
||||
supervisor_spinner.setAdapter(supervisor_adapter);
|
||||
|
||||
supervisor_adapter
|
||||
.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
|
||||
supervisor_spinner.setOnItemSelectedListener(this);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
coaching_visit = 0;
|
||||
linear_supervisor.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
coaching_visit = -1;
|
||||
linear_supervisor.setVisibility(View.GONE);
|
||||
fab_save.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case R.id.spinner_supervisor:
|
||||
|
||||
if(position!=0){
|
||||
emp_id = supervisorList.get(position-1).getEMP_ID().get(0);
|
||||
}
|
||||
else {
|
||||
emp_id = "";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
switch (v.getId()){
|
||||
case R.id.img_cam:
|
||||
_pathforcheck = store_id + "CoachingVisit" + visit_date.replace("/", "") + CommonFunctions.getCurrentTimeWithLanguage(getApplicationContext()).replace(":", "") + ".jpg";
|
||||
|
||||
_path = CommonString.FILE_PATH + _pathforcheck;
|
||||
|
||||
startCameraActivity();
|
||||
break;
|
||||
|
||||
case R.id.fab_save:
|
||||
|
||||
if(coaching_visit==1){
|
||||
|
||||
String error_msg = "";
|
||||
boolean flag = true;
|
||||
if(emp_id.equals("")){
|
||||
flag = false;
|
||||
error_msg = getString(R.string.title_activity_select_dropdown);
|
||||
}
|
||||
else if(image_name.equals("")){
|
||||
flag = false;
|
||||
error_msg = getString(R.string.clickimage);
|
||||
}
|
||||
|
||||
if(flag){
|
||||
CoachingVisitGetterSetter coachingVisitGetterSetter = new CoachingVisitGetterSetter();
|
||||
coachingVisitGetterSetter.setEmp_id(emp_id);
|
||||
coachingVisitGetterSetter.setImg_path(image_name);
|
||||
coachingVisitGetterSetter.setExists(coaching_visit==1);
|
||||
|
||||
database.insertCoachingVisitData(coachingVisitGetterSetter, store_id);
|
||||
|
||||
Toast.makeText(getApplicationContext(),getString(R.string.save_message), Toast.LENGTH_SHORT).show();
|
||||
|
||||
saved_flag = true;
|
||||
|
||||
fab_next.setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
Snackbar.make(linear_supervisor,error_msg, Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
else {
|
||||
CoachingVisitGetterSetter coachingVisitGetterSetter = new CoachingVisitGetterSetter();
|
||||
coachingVisitGetterSetter.setEmp_id("0");
|
||||
coachingVisitGetterSetter.setImg_path(image_name);
|
||||
coachingVisitGetterSetter.setExists(coaching_visit==1);
|
||||
|
||||
database.insertCoachingVisitData(coachingVisitGetterSetter, store_id);
|
||||
|
||||
Toast.makeText(getApplicationContext(),getString(R.string.save_message), Toast.LENGTH_SHORT).show();
|
||||
saved_flag = true;
|
||||
fab_next.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case R.id.fab:
|
||||
|
||||
if(saved_flag || update_flag){
|
||||
|
||||
Intent intent = new Intent(CoachingVisitActivity.this, MessageActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
}
|
||||
else {
|
||||
Snackbar.make(linear_supervisor,getString(R.string.please_save_data), Snackbar.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void startCameraActivity() {
|
||||
try {
|
||||
|
||||
Log.i("MakeMachine", "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) {
|
||||
Log.e("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
|
||||
Log.e("TAG", "package name : " + list.get(n).packageName);
|
||||
|
||||
//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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//com.android.gallery3d
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
|
||||
intent.setPackage(defaultCameraPackage);
|
||||
startActivityForResult(intent, 0);
|
||||
} 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, 0);
|
||||
|
||||
} catch (Exception e) {
|
||||
Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString());
|
||||
Crashlytics.logException(e.getCause());
|
||||
Crashlytics.logException(new Exception(e.getCause()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
Log.i("MakeMachine", "resultCode: " + resultCode);
|
||||
switch (resultCode) {
|
||||
case 0:
|
||||
Log.i("MakeMachine", "User cancelled");
|
||||
break;
|
||||
|
||||
case -1:
|
||||
|
||||
if (_pathforcheck != null && !_pathforcheck.equals("")) {
|
||||
if (new File(str + _pathforcheck).exists()) {
|
||||
|
||||
img_cam.setImageDrawable(getResources().getDrawable(R.mipmap.camera_green));
|
||||
|
||||
image_name = _pathforcheck;
|
||||
|
||||
_pathforcheck = "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@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) {
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_back_in, R.anim.activity_back_out);
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@@ -362,7 +362,6 @@ public class NonWorkingReason extends AppCompatActivity implements
|
||||
|
||||
camera.setImageDrawable(getResources().getDrawable(R.mipmap.camera_green));
|
||||
|
||||
|
||||
image1 = _pathforcheck;
|
||||
|
||||
_pathforcheck = "";
|
||||
|
||||
@@ -70,6 +70,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGroupMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SupervisorListGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
|
||||
import cpm.com.gskmtorange.xmlHandlers.XMLHandlers;
|
||||
|
||||
@@ -109,6 +110,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
NoCameraLastVisitGetterSetter noCameraLastVisitGetterSetter;
|
||||
GeoFencingGetterSetter geoFencingGetterSetter;
|
||||
NonWorkingSubReasonGetterSetter nonWorkingSubReasonGetterSetter;
|
||||
SupervisorListGetterSetter supervisorListGetterSetter;
|
||||
|
||||
private Dialog dialog;
|
||||
private ProgressBar pb;
|
||||
@@ -1226,6 +1228,40 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
//SUPERVISOR_LIST
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
request.addProperty("UserName", userId);
|
||||
request.addProperty("Type", "SUPERVISOR_LIST");
|
||||
request.addProperty("cultureid", culture_id);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION_UNIVERSAL, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
if (result.toString() != null) {
|
||||
xpp.setInput(new StringReader(result.toString()));
|
||||
xpp.next();
|
||||
eventType = xpp.getEventType();
|
||||
supervisorListGetterSetter = XMLHandlers.supervisorListXMLHandler(xpp, eventType);
|
||||
|
||||
String table_sup_list = supervisorListGetterSetter.getTable_SUPERVISOR_LIST();
|
||||
if (table_sup_list != null) {
|
||||
resultHttp = CommonString.KEY_SUCCESS;
|
||||
TableBean.setTable_SUPERVISOR_LIST(table_sup_list);
|
||||
}
|
||||
|
||||
if (supervisorListGetterSetter.getEMP_ID().size() > 0) {
|
||||
data.value = 97;
|
||||
data.name = "SUPERVISOR LIST DATA" + getResources().getString(R.string.download_data);
|
||||
}
|
||||
}
|
||||
publishProgress(data);
|
||||
|
||||
|
||||
/* //MAPPING_COUNTRYWISE_PLANOGRAM
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_NAME_UNIVERSAL_DOWNLOAD);
|
||||
@@ -1529,6 +1565,7 @@ public class DownloadActivity extends AppCompatActivity {
|
||||
db.InsertNON_T2P_REASON(nonT2pReasonGetterSetter);
|
||||
db.InsertCONFIGURATION_COUNTRY_WISE(configurationContrywiseGetterSetter);
|
||||
db.InsertNO_CAMERA_LAST_VISIT_DATA(noCameraLastVisitGetterSetter);
|
||||
db.insertSUPERVISOR_LIST_DATA(supervisorListGetterSetter);
|
||||
db.InsertGeoTag_DATA(geoFencingGetterSetter);
|
||||
|
||||
} catch (MalformedURLException e) {
|
||||
|
||||
+3
-1
@@ -28,6 +28,7 @@ import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||
import cpm.com.gskmtorange.R;
|
||||
import cpm.com.gskmtorange.constant.CommonFunctions;
|
||||
import cpm.com.gskmtorange.constant.CommonString;
|
||||
import cpm.com.gskmtorange.dailyentry.CoachingVisitActivity;
|
||||
import cpm.com.gskmtorange.dailyentry.MessageActivity;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.CategoryWisePerformaceGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.StoreWisePerformaceGetterSetter;
|
||||
@@ -78,7 +79,8 @@ public class StoreWisePerformanceActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
//Intent intent = new Intent(StoreWisePerformanceActivity.this, CategoryListActivity.class);
|
||||
Intent intent = new Intent(StoreWisePerformanceActivity.this, MessageActivity.class);
|
||||
//Intent intent = new Intent(StoreWisePerformanceActivity.this, MessageActivity.class);
|
||||
Intent intent = new Intent(StoreWisePerformanceActivity.this, CoachingVisitActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||
|
||||
@@ -54,6 +54,7 @@ import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoachingVisitGetterSetter;
|
||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||
import cpm.com.gskmtorange.R;
|
||||
@@ -1167,6 +1168,55 @@ public class UploadActivity extends AppCompatActivity {
|
||||
data.name = getString(R.string.pog);
|
||||
publishProgress(data);
|
||||
|
||||
//Coaching visit data
|
||||
db.open();
|
||||
CoachingVisitGetterSetter coachingVisitData = db.getCoachingVisitData(coverageList.get(i).getStoreId());
|
||||
|
||||
if (coachingVisitData!=null && coachingVisitData.getEmp_id()!=null) {
|
||||
|
||||
String onXml_coaching_data = "";
|
||||
|
||||
String exist;
|
||||
|
||||
if(coachingVisitData.isExists()){
|
||||
exist = "1";
|
||||
}
|
||||
else {
|
||||
exist = "0";
|
||||
}
|
||||
|
||||
onXml_coaching_data = "[COACHING_VISIT_DATA]"
|
||||
+ "[MID]" + mid + "[/MID]"
|
||||
+ "[USER_ID]" + userId + "[/USER_ID]"
|
||||
+ "[EMP_ID]" + coachingVisitData.getEmp_id() + "[/EMP_ID]"
|
||||
+ "[IMAGE]" + coachingVisitData.getImg_path() + "[/IMAGE]"
|
||||
+ "[IS_EXIST]" + exist + "[/IS_EXIST]"
|
||||
+ "[/COACHING_VISIT_DATA]";
|
||||
|
||||
final String sos_xml = "[DATA]" + onXml_coaching_data + "[/DATA]";
|
||||
|
||||
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||
request.addProperty("XMLDATA", sos_xml);
|
||||
request.addProperty("KEYS", "COACHING_VISIT_DATA");
|
||||
request.addProperty("USERNAME", userId);
|
||||
request.addProperty("MID", mid);
|
||||
|
||||
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.dotNet = true;
|
||||
envelope.setOutputSoapObject(request);
|
||||
|
||||
androidHttpTransport = new HttpTransportSE(CommonString.URL);
|
||||
androidHttpTransport.call(CommonString.SOAP_ACTION + CommonString.METHOD_UPLOAD_STOCK_XML_DATA, envelope);
|
||||
|
||||
result = envelope.getResponse();
|
||||
|
||||
data.value = 64;
|
||||
data.name = getString(R.string.coaching_visit);
|
||||
publishProgress(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SET COVERAGE STATUS
|
||||
String final_xml = "";
|
||||
onXML = "";
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package cpm.com.gskmtorange.xmlGetterSetter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SupervisorListGetterSetter {
|
||||
|
||||
String table_SUPERVISOR_LIST;
|
||||
|
||||
ArrayList<String> EMP_ID = new ArrayList<>();
|
||||
ArrayList<String> SUPERVISOR = new ArrayList<>();
|
||||
ArrayList<String> COUNTRY_ID = new ArrayList<>();
|
||||
|
||||
public String getTable_SUPERVISOR_LIST() {
|
||||
return table_SUPERVISOR_LIST;
|
||||
}
|
||||
|
||||
public void setTable_SUPERVISOR_LIST(String table_SUPERVISOR_LIST) {
|
||||
this.table_SUPERVISOR_LIST = table_SUPERVISOR_LIST;
|
||||
}
|
||||
|
||||
public ArrayList<String> getEMP_ID() {
|
||||
return EMP_ID;
|
||||
}
|
||||
|
||||
public void setEMP_ID(String EMP_ID) {
|
||||
this.EMP_ID.add(EMP_ID);
|
||||
}
|
||||
|
||||
public ArrayList<String> getSUPERVISOR() {
|
||||
return SUPERVISOR;
|
||||
}
|
||||
|
||||
public void setSUPERVISOR(String SUPERVISOR) {
|
||||
this.SUPERVISOR.add(SUPERVISOR);
|
||||
}
|
||||
|
||||
public ArrayList<String> getCOUNTRY_ID() {
|
||||
return COUNTRY_ID;
|
||||
}
|
||||
|
||||
public void setCOUNTRY_ID(String COUNTRY_ID) {
|
||||
this.COUNTRY_ID.add(COUNTRY_ID);
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ public class TableBean {
|
||||
public static String Table_NO_CAMERA_LAST_VISIT_DATA;
|
||||
public static String Table_GEO_FENCING;
|
||||
public static String Table_NON_WORKING_SUB_REASON;
|
||||
public static String Table_SUPERVISOR_LIST;
|
||||
|
||||
public static String getTable_NON_WORKING_SUB_REASON() {
|
||||
return Table_NON_WORKING_SUB_REASON;
|
||||
@@ -288,4 +289,12 @@ public class TableBean {
|
||||
public static void setTable_GEO_FENCING(String table_GEO_FENCING) {
|
||||
Table_GEO_FENCING = table_GEO_FENCING;
|
||||
}
|
||||
|
||||
public static String getTable_SUPERVISOR_LIST() {
|
||||
return Table_SUPERVISOR_LIST;
|
||||
}
|
||||
|
||||
public static void setTable_SUPERVISOR_LIST(String table_SUPERVISOR_LIST) {
|
||||
Table_SUPERVISOR_LIST = table_SUPERVISOR_LIST;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.ShelfMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuGroupMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SkuMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SubCategoryMasterGetterSetter;
|
||||
import cpm.com.gskmtorange.xmlGetterSetter.SupervisorListGetterSetter;
|
||||
|
||||
/**
|
||||
* Created by yadavendras on 21-12-2016.
|
||||
@@ -1347,4 +1348,36 @@ public class XMLHandlers {
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
||||
//SUPERVISOR_LIST
|
||||
public static SupervisorListGetterSetter supervisorListXMLHandler(XmlPullParser xpp, int eventType) {
|
||||
SupervisorListGetterSetter st = new SupervisorListGetterSetter();
|
||||
|
||||
try {
|
||||
while (xpp.getEventType() != XmlPullParser.END_DOCUMENT) {
|
||||
if (xpp.getEventType() == XmlPullParser.START_TAG) {
|
||||
|
||||
if (xpp.getName().equals("META_DATA")) {
|
||||
st.setTable_SUPERVISOR_LIST(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("COUNTRY_ID")) {
|
||||
st.setCOUNTRY_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("EMP_ID")) {
|
||||
st.setEMP_ID(xpp.nextText());
|
||||
}
|
||||
if (xpp.getName().equals("SUPERVISOR")) {
|
||||
st.setSUPERVISOR(xpp.nextText());
|
||||
}
|
||||
}
|
||||
|
||||
xpp.next();
|
||||
}
|
||||
} catch (XmlPullParserException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return st;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".dailyentry.CoachingVisitActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_coaching_visit" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/right_arrow"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|left"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/save_icon" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context=".dailyentry.CoachingVisitActivity"
|
||||
tools:showIn="@layout/activity_coaching_visit"
|
||||
android:background="@color/grey_background"
|
||||
>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="10dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
android:layout_margin="10dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/coaching_visit"
|
||||
android:textSize="@dimen/text_size_normal"
|
||||
android:textColor="@color/black"
|
||||
android:layout_marginRight="10dp"/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_coaching_visit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"></Spinner>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_supervisor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_supervisor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_cam"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/camera_orange"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -370,7 +370,11 @@
|
||||
|
||||
<!--Geofencing-->
|
||||
<string name="you_need_to_be_in_the_store">You need to be in the store to Checkin/Checkout</string>
|
||||
<string name="distance_from_the_store">Distance from Store - </string>
|
||||
<string name="distance_from_the_store">Distance from Store</string>
|
||||
<string name="meters">meters</string>
|
||||
<string name="title_activity_coaching_visit">Coaching Visit</string>
|
||||
<string name="select_supervisor">Select Supervisor</string>
|
||||
<string name="coaching_visit">Coaching Visit</string>
|
||||
<string name="please_save_data">Please save data</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user