review
This commit is contained in:
Generated
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</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" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@@ -171,17 +171,21 @@
|
|||||||
android:label="@string/title_activity_upload"
|
android:label="@string/title_activity_upload"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
|
|
||||||
android:name=".dailyentry.T2pBrand_Avaibility"
|
android:name=".dailyentry.T2pBrand_Avaibility"
|
||||||
android:label="@string/title_activity_t2p_brand__avaibility"
|
android:label="@string/title_activity_t2p_brand__avaibility"
|
||||||
android:theme="@style/AppTheme.NoActionBar"></activity>
|
android:theme="@style/AppTheme.NoActionBar" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gsk_dailyentry.StockFacing_PlanogramTrackerActivity"
|
android:name=".gsk_dailyentry.StockFacing_PlanogramTrackerActivity"
|
||||||
android:configChanges="screenSize|orientation|keyboardHidden"
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
android:label="@string/title_activity_stock_facing__planogram_tracker"
|
android:label="@string/title_activity_stock_facing__planogram_tracker"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppTheme.NoActionBar" />
|
android:theme="@style/AppTheme.NoActionBar" />
|
||||||
|
<activity
|
||||||
|
android:name=".dailyentry.CategoryPicture"
|
||||||
|
android:label="@string/title_activity_category_picture"
|
||||||
|
android:configChanges="screenSize|orientation|keyboardHidden"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/AppTheme.NoActionBar"></activity>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -15,6 +15,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||||
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
import cpm.com.gskmtorange.GetterSetter.GeotaggingBeans;
|
||||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||||
@@ -142,6 +143,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD);
|
||||||
|
|
||||||
db.execSQL(CommonString.CREATE_TABLE_INSERT_STORE_CAMERA);
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_STORE_CAMERA);
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE_LIST);
|
||||||
|
|
||||||
|
db.execSQL(CommonString.CREATE_TABLE_INSERT_CATEGORY_PICTURE);
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -182,6 +186,11 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, "STORE_ID='" + storeid + "'", null);
|
db.delete(CommonString.TABLE_INSERT_T2P_COMPLIANCE, "STORE_ID='" + storeid + "'", null);
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_CATEGORY_PICTURE, "Store_Id='" + storeid + "'", null);
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_CATEGORY_PICTURE_LIST, "Store_Id='" + storeid + "'", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteAllTables() {
|
public void deleteAllTables() {
|
||||||
@@ -210,6 +219,8 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER, null, null);
|
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_HEADER, null, null);
|
||||||
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD, null, null);
|
db.delete(CommonString.TABLE_INSERT_STOCK_FACING_PLANOGRAM_TRACKER_CHILD, null, null);
|
||||||
|
|
||||||
|
db.delete(CommonString.TABLE_INSERT_CATEGORY_PICTURE, null, null);
|
||||||
|
db.delete(CommonString.TABLE_INSERT_CATEGORY_PICTURE_LIST, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InsertJCP(JourneyPlanGetterSetter data) {
|
public void InsertJCP(JourneyPlanGetterSetter data) {
|
||||||
@@ -4132,4 +4143,317 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// get CATEGORY PICTURE data
|
||||||
|
public ArrayList<CategoryPictureGetterSetter> getCategoryPicturedata(String categoryId, String key_account_id, String store_type_id, String class_id) {
|
||||||
|
|
||||||
|
ArrayList<CategoryPictureGetterSetter> list = new ArrayList<>();
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
dbcursor = db.rawQuery("SELECT DISTINCT SB.SUB_CATEGORY_ID, SB.SUB_CATEGORY FROM MAPPING_STOCK M INNER JOIN SKU_MASTER SK ON M.SKU_ID = SK.SKU_ID" +
|
||||||
|
" INNER JOIN BRAND_MASTER BR ON SK.BRAND_ID = BR.BRAND_ID" +
|
||||||
|
" INNER JOIN SUB_CATEGORY_MASTER SB ON BR.SUB_CATEGORY_ID = SB.SUB_CATEGORY_ID" +
|
||||||
|
" INNER JOIN CATEGORY_MASTER CA ON SB.CATEGORY_ID = CA.CATEGORY_ID" +
|
||||||
|
" WHERE M.KEYACCOUNT_ID = '" + key_account_id + " 'AND M.STORETYPE_ID = '" + store_type_id + "' AND M.CLASS_ID = '" + class_id + "' AND CA.CATEGORY_ID = '" + categoryId+"'", null);
|
||||||
|
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
while (!dbcursor.isAfterLast()) {
|
||||||
|
CategoryPictureGetterSetter CPGS = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
CPGS.setSUB_CATEGORY(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY")));
|
||||||
|
CPGS.setSUB_CATEGORY_ID(dbcursor.getString(dbcursor.getColumnIndexOrThrow("SUB_CATEGORY_ID")));
|
||||||
|
|
||||||
|
CPGS.setSubCategoryCamera1("");
|
||||||
|
CPGS.setSubCategoryCamera2("");
|
||||||
|
|
||||||
|
list.add(CPGS);
|
||||||
|
|
||||||
|
dbcursor.moveToNext();
|
||||||
|
}
|
||||||
|
dbcursor.close();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
Log.d("Exception ", "get MSL_AvailabilityHeader!" + e.toString());
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void InsertCategoryPictureData(CategoryPictureGetterSetter gettersetter, ArrayList<CategoryPictureGetterSetter> skulist, String categoryId) {
|
||||||
|
ContentValues values = new ContentValues();
|
||||||
|
ContentValues values1 = new ContentValues();
|
||||||
|
try {
|
||||||
|
|
||||||
|
values.put("Store_Id", gettersetter.getStore_ID());
|
||||||
|
values.put("categoryId", categoryId);
|
||||||
|
values.put("CategoryImage1", gettersetter.getCategoryImage1());
|
||||||
|
values.put("CategoryImage2", gettersetter.getCategoryImage2());
|
||||||
|
values.put("CategoryImage3", gettersetter.getCategoryImage3());
|
||||||
|
values.put("CategoryImage4", gettersetter.getCategoryImage4());
|
||||||
|
values.put("camera_allow", gettersetter.getCamera_allow());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
long key_id = db.insert(CommonString.TABLE_INSERT_CATEGORY_PICTURE, null, values);
|
||||||
|
|
||||||
|
if (skulist != null) {
|
||||||
|
|
||||||
|
for (int j = 0; j < skulist.size(); j++) {
|
||||||
|
values1.put(CommonString.KEY_Common_ID, key_id);
|
||||||
|
values1.put("Store_Id", gettersetter.getStore_ID());
|
||||||
|
values1.put("categoryId", categoryId);
|
||||||
|
values1.put("SUB_CategoryImage1", skulist.get(j).getSubCategoryCamera1());
|
||||||
|
values1.put("SUB_CategoryImage2", skulist.get(j).getSubCategoryCamera2());
|
||||||
|
values1.put("SUB_Category", skulist.get(j).getSUB_CATEGORY());
|
||||||
|
values1.put("SUB_Category_ID", skulist.get(j).getSUB_CATEGORY_ID());
|
||||||
|
|
||||||
|
|
||||||
|
db.insert(CommonString.TABLE_INSERT_CATEGORY_PICTURE_LIST, null, values1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Log.d("Database Exception ", ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList<CategoryPictureGetterSetter> getCategoryPictureData(String store_id, String categoryId) {
|
||||||
|
Cursor cursordata = null;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> productData = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE " + "where categoryId='" + categoryId + "' and Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (cursordata != null) {
|
||||||
|
cursordata.moveToFirst();
|
||||||
|
while (!cursordata.isAfterLast()) {
|
||||||
|
CategoryPictureGetterSetter sb = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
|
||||||
|
sb.setKEY_ID(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("KEY_ID")));
|
||||||
|
|
||||||
|
sb.setCamera_allow(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("camera_allow")));
|
||||||
|
|
||||||
|
sb.setCategoryImage1(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage1")));
|
||||||
|
|
||||||
|
sb.setCategoryImage2(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage2")));
|
||||||
|
|
||||||
|
sb.setCategoryImage3(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage3")));
|
||||||
|
|
||||||
|
|
||||||
|
sb.setCategoryImage4(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage4")));
|
||||||
|
|
||||||
|
|
||||||
|
productData.add(sb);
|
||||||
|
cursordata.moveToNext();
|
||||||
|
}
|
||||||
|
cursordata.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return productData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList<CategoryPictureGetterSetter> getCategoryPictureListData(String store_id, String categoryId,String key_id) {
|
||||||
|
Cursor cursordata = null;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> productData = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE_LIST " + "where categoryId = '" + categoryId + "' and Store_Id = '" + store_id + "' and COMMON_ID = '" + key_id + "'", null);
|
||||||
|
|
||||||
|
if (cursordata != null) {
|
||||||
|
cursordata.moveToFirst();
|
||||||
|
while (!cursordata.isAfterLast()) {
|
||||||
|
CategoryPictureGetterSetter sb = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
|
||||||
|
sb.setSubCategoryCamera1(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_CategoryImage1")));
|
||||||
|
|
||||||
|
sb.setSubCategoryCamera2(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_CategoryImage2")));
|
||||||
|
|
||||||
|
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_Category_ID")));
|
||||||
|
|
||||||
|
sb.setSUB_CATEGORY(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_Category")));
|
||||||
|
|
||||||
|
productData.add(sb);
|
||||||
|
cursordata.moveToNext();
|
||||||
|
}
|
||||||
|
cursordata.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return productData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList<CategoryPictureGetterSetter> getCategoryPictureUpload(String store_id) {
|
||||||
|
Cursor cursordata = null;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> productData = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE " + "where Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
if (cursordata != null) {
|
||||||
|
cursordata.moveToFirst();
|
||||||
|
while (!cursordata.isAfterLast()) {
|
||||||
|
CategoryPictureGetterSetter sb = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
|
||||||
|
sb.setKEY_ID(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("KEY_ID")));
|
||||||
|
|
||||||
|
sb.setCamera_allow(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("camera_allow")));
|
||||||
|
|
||||||
|
sb.setCategoryId(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("categoryId")));
|
||||||
|
|
||||||
|
|
||||||
|
sb.setCategoryImage1(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage1")));
|
||||||
|
|
||||||
|
sb.setCategoryImage2(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage2")));
|
||||||
|
|
||||||
|
sb.setCategoryImage3(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage3")));
|
||||||
|
|
||||||
|
|
||||||
|
sb.setCategoryImage4(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("CategoryImage4")));
|
||||||
|
|
||||||
|
|
||||||
|
productData.add(sb);
|
||||||
|
cursordata.moveToNext();
|
||||||
|
}
|
||||||
|
cursordata.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return productData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList<CategoryPictureGetterSetter> getCategoryPictureListUploaded(String key_id) {
|
||||||
|
Cursor cursordata = null;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> productData = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
cursordata = db.rawQuery("Select * from Stock_CATEGORY_PICTURE_LIST " + "where COMMON_ID = '" + key_id + "'", null);
|
||||||
|
|
||||||
|
if (cursordata != null) {
|
||||||
|
cursordata.moveToFirst();
|
||||||
|
while (!cursordata.isAfterLast()) {
|
||||||
|
CategoryPictureGetterSetter sb = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
sb.setCOMMON_ID(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("COMMON_ID")));
|
||||||
|
|
||||||
|
sb.setSubCategoryCamera1(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_CategoryImage1")));
|
||||||
|
|
||||||
|
sb.setSubCategoryCamera2(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_CategoryImage2")));
|
||||||
|
|
||||||
|
sb.setSUB_CATEGORY_ID(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_Category_ID")));
|
||||||
|
|
||||||
|
sb.setSUB_CATEGORY(cursordata.getString(cursordata
|
||||||
|
.getColumnIndexOrThrow("SUB_Category")));
|
||||||
|
|
||||||
|
productData.add(sb);
|
||||||
|
cursordata.moveToNext();
|
||||||
|
}
|
||||||
|
cursordata.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return productData;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isCategoryPictureData(String store_id, String category_id) {
|
||||||
|
boolean filled = false;
|
||||||
|
Cursor dbcursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
dbcursor = db.rawQuery("Select * from Stock_CATEGORY_PICTURE " + "where categoryId='" + category_id + "' and Store_Id='" + store_id + "'", null);
|
||||||
|
|
||||||
|
|
||||||
|
if (dbcursor != null) {
|
||||||
|
dbcursor.moveToFirst();
|
||||||
|
int icount = dbcursor.getInt(0);
|
||||||
|
dbcursor.close();
|
||||||
|
if (icount > 0) {
|
||||||
|
filled = true;
|
||||||
|
} else {
|
||||||
|
filled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.d("Exception ", " when fetching Records!!!!!!!!!!!!!!!!!!!!! " + e.toString());
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -54,10 +54,10 @@ public class AddittionalGetterSetter {
|
|||||||
Image = image;
|
Image = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
String Brand,Brand_id,Sku,Sku_id,Store_id,Image;
|
String Brand,Brand_id,Sku,Sku_id,Store_id,Image="";
|
||||||
|
|
||||||
|
|
||||||
String Image2;
|
String Image2="";
|
||||||
|
|
||||||
public String getImage3() {
|
public String getImage3() {
|
||||||
return Image3;
|
return Image3;
|
||||||
@@ -75,7 +75,7 @@ public class AddittionalGetterSetter {
|
|||||||
Image2 = image2;
|
Image2 = image2;
|
||||||
}
|
}
|
||||||
|
|
||||||
String Image3;
|
String Image3="";
|
||||||
|
|
||||||
public String getKey_id() {
|
public String getKey_id() {
|
||||||
return key_id;
|
return key_id;
|
||||||
|
|||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
package cpm.com.gskmtorange.GetterSetter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by ashishc on 20-02-2017.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class CategoryPictureGetterSetter {
|
||||||
|
|
||||||
|
String CategoryImage1="";
|
||||||
|
String CategoryImage2="";
|
||||||
|
String CategoryImage3="";
|
||||||
|
String CategoryImage4="";
|
||||||
|
|
||||||
|
public String getCategoryId() {
|
||||||
|
return categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryId(String categoryId) {
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
String categoryId;
|
||||||
|
|
||||||
|
public String getCOMMON_ID() {
|
||||||
|
return COMMON_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCOMMON_ID(String COMMON_ID) {
|
||||||
|
this.COMMON_ID = COMMON_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
String COMMON_ID;
|
||||||
|
|
||||||
|
|
||||||
|
public String getKEY_ID() {
|
||||||
|
return KEY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKEY_ID(String KEY_ID) {
|
||||||
|
this.KEY_ID = KEY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
String KEY_ID;
|
||||||
|
|
||||||
|
public String getCamera_allow() {
|
||||||
|
return camera_allow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCamera_allow(String camera_allow) {
|
||||||
|
this.camera_allow = camera_allow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClass_id() {
|
||||||
|
return class_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClass_id(String class_id) {
|
||||||
|
this.class_id = class_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStore_type_id() {
|
||||||
|
return store_type_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStore_type_id(String store_type_id) {
|
||||||
|
this.store_type_id = store_type_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey_account_id() {
|
||||||
|
return key_account_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey_account_id(String key_account_id) {
|
||||||
|
this.key_account_id = key_account_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
String camera_allow,class_id,store_type_id,key_account_id;
|
||||||
|
|
||||||
|
|
||||||
|
public String getStore_ID() {
|
||||||
|
return Store_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStore_ID(String store_ID) {
|
||||||
|
Store_ID = store_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
String Store_ID;
|
||||||
|
|
||||||
|
String SubCategoryCamera1;
|
||||||
|
|
||||||
|
String SUB_CATEGORY_ID;
|
||||||
|
|
||||||
|
public String getSUB_CATEGORY() {
|
||||||
|
return SUB_CATEGORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY(String SUB_CATEGORY) {
|
||||||
|
this.SUB_CATEGORY = SUB_CATEGORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSUB_CATEGORY_ID() {
|
||||||
|
return SUB_CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSUB_CATEGORY_ID(String SUB_CATEGORY_ID) {
|
||||||
|
this.SUB_CATEGORY_ID = SUB_CATEGORY_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
String SUB_CATEGORY;
|
||||||
|
|
||||||
|
|
||||||
|
public String getSubCategoryCamera1() {
|
||||||
|
return SubCategoryCamera1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubCategoryCamera1(String subCategoryCamera1) {
|
||||||
|
SubCategoryCamera1 = subCategoryCamera1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubCategoryCamera2() {
|
||||||
|
return SubCategoryCamera2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubCategoryCamera2(String subCategoryCamera2) {
|
||||||
|
SubCategoryCamera2 = subCategoryCamera2;
|
||||||
|
}
|
||||||
|
|
||||||
|
String SubCategoryCamera2;
|
||||||
|
|
||||||
|
public String getCategoryImage2() {
|
||||||
|
return CategoryImage2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryImage2(String categoryImage2) {
|
||||||
|
CategoryImage2 = categoryImage2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryImage1() {
|
||||||
|
return CategoryImage1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryImage1(String categoryImage1) {
|
||||||
|
CategoryImage1 = categoryImage1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryImage3() {
|
||||||
|
return CategoryImage3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryImage3(String categoryImage3) {
|
||||||
|
CategoryImage3 = categoryImage3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoryImage4() {
|
||||||
|
return CategoryImage4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryImage4(String categoryImage4) {
|
||||||
|
CategoryImage4 = categoryImage4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -668,4 +668,73 @@ public class CommonString {
|
|||||||
+ ")";
|
+ ")";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_CATEGORY_PICTURE = "Stock_CATEGORY_PICTURE";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_CATEGORY_PICTURE = "CREATE TABLE IF NOT EXISTS "
|
||||||
|
+ TABLE_INSERT_CATEGORY_PICTURE
|
||||||
|
+ "("
|
||||||
|
+ "KEY_ID"
|
||||||
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
|
||||||
|
+ "Store_Id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "categoryId"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "CategoryImage1"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "CategoryImage2"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
+ "CategoryImage3"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
+ "CategoryImage4"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "camera_allow"
|
||||||
|
+ " VARCHAR"
|
||||||
|
|
||||||
|
+ ")";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static final String TABLE_INSERT_CATEGORY_PICTURE_LIST = "Stock_CATEGORY_PICTURE_LIST";
|
||||||
|
|
||||||
|
public static final String CREATE_TABLE_INSERT_CATEGORY_PICTURE_LIST = "CREATE TABLE IF NOT EXISTS "
|
||||||
|
+ TABLE_INSERT_CATEGORY_PICTURE_LIST
|
||||||
|
+ "("
|
||||||
|
+ "KEY_ID"
|
||||||
|
+ " INTEGER PRIMARY KEY AUTOINCREMENT ,"
|
||||||
|
|
||||||
|
+ "COMMON_ID"
|
||||||
|
+ " INTEGER,"
|
||||||
|
|
||||||
|
+ "Store_Id"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "categoryId"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "SUB_CategoryImage1"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
+ "SUB_CategoryImage2"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
+ "SUB_Category"
|
||||||
|
+ " VARCHAR,"
|
||||||
|
|
||||||
|
+ "SUB_Category_ID"
|
||||||
|
+ " INTEGER"
|
||||||
|
|
||||||
|
+ ")";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,575 @@
|
|||||||
|
package cpm.com.gskmtorange.dailyentry;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.R;
|
||||||
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
|
import cpm.com.gskmtorange.xmlGetterSetter.Stock_FacingGetterSetter;
|
||||||
|
|
||||||
|
public class CategoryPicture extends AppCompatActivity {
|
||||||
|
String _pathforcheck1, _pathforcheck2, _pathforcheck3, _pathforcheck4, Camerapath1, Camerapath2, _path, CaMpath, str, msg, categoryName, categoryId;
|
||||||
|
ImageView im1, im2, im3, im4;
|
||||||
|
ListView listview;
|
||||||
|
String store_id, date, intime, img_str1, img_str2, img_str3, img_str4, togglevalue = "1", CATEGORY_ID, camera_allow, store_type_id, class_id, key_account_id;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
Uri outputFileUri;
|
||||||
|
String gallery_package = "";
|
||||||
|
GSKOrangeDB db;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> adddata = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
int Adapterposition;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> listdat = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
CategoryAdapter adapteradditional;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_category_picture);
|
||||||
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
|
||||||
|
preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
|
||||||
|
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||||
|
store_type_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
|
key_account_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
|
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
|
||||||
|
|
||||||
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
|
|
||||||
|
//store_id = "2";
|
||||||
|
date = preferences.getString(CommonString.KEY_DATE, null);
|
||||||
|
intime = preferences.getString(CommonString.KEY_STORE_IN_TIME, "");
|
||||||
|
str = CommonString.FILE_PATH;
|
||||||
|
db = new GSKOrangeDB(CategoryPicture.this);
|
||||||
|
db.open();
|
||||||
|
|
||||||
|
im1 = (ImageView) findViewById(R.id.image1);
|
||||||
|
im2 = (ImageView) findViewById(R.id.image2);
|
||||||
|
im3 = (ImageView) findViewById(R.id.image3);
|
||||||
|
im4 = (ImageView) findViewById(R.id.image4);
|
||||||
|
listview = (ListView) findViewById(R.id.listview);
|
||||||
|
|
||||||
|
|
||||||
|
adddata = db.getCategoryPictureData(store_id, categoryId);
|
||||||
|
|
||||||
|
if (adddata.size() != 0) {
|
||||||
|
|
||||||
|
for (int k = 0; k < adddata.size(); k++) {
|
||||||
|
String key_id = adddata.get(k).getKEY_ID();
|
||||||
|
|
||||||
|
|
||||||
|
listdat = db.getCategoryPictureListData(store_id, categoryId, key_id);
|
||||||
|
|
||||||
|
String image1 = adddata.get(k).getCategoryImage1();
|
||||||
|
String image2 = adddata.get(k).getCategoryImage2();
|
||||||
|
String image3 = adddata.get(k).getCategoryImage3();
|
||||||
|
String image4 = adddata.get(k).getCategoryImage4();
|
||||||
|
|
||||||
|
if(image1 !=null)
|
||||||
|
{
|
||||||
|
im1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str1=image1;
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
im1.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(image2 !=null)
|
||||||
|
{
|
||||||
|
im2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str2=image2;
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
im2.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
if(image3 !=null)
|
||||||
|
{
|
||||||
|
im3.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
img_str3=image3;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
im3.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
if(image4 !=null)
|
||||||
|
{
|
||||||
|
im4.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str4=image4;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
im4.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
listdat = db.getCategoryPicturedata(categoryId, key_account_id, store_type_id, class_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
adapteradditional = new CategoryPicture.CategoryAdapter(CategoryPicture.this, listdat);
|
||||||
|
listview.setAdapter(adapteradditional);
|
||||||
|
|
||||||
|
|
||||||
|
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||||
|
fab.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
CategoryPictureGetterSetter CP = new CategoryPictureGetterSetter();
|
||||||
|
|
||||||
|
CP.setCategoryImage1(img_str1);
|
||||||
|
CP.setCategoryImage2(img_str2);
|
||||||
|
CP.setCategoryImage3(img_str3);
|
||||||
|
CP.setCategoryImage4(img_str4);
|
||||||
|
CP.setStore_ID(store_id);
|
||||||
|
CP.setCamera_allow(camera_allow);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (validateData(CP, listdat)) {
|
||||||
|
|
||||||
|
db.InsertCategoryPictureData(CP, listdat, categoryId);
|
||||||
|
|
||||||
|
finish();
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Snackbar.make(view, "Please take image", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
im1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
|
||||||
|
_pathforcheck1 = store_id + "CategoryPicture1" + categoryId + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
|
||||||
|
_path = CommonString.FILE_PATH + _pathforcheck1;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
im2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
_pathforcheck2 = store_id + "CategoryPicture2" + categoryId + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
|
||||||
|
_path = CommonString.FILE_PATH + _pathforcheck2;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
im3.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
_pathforcheck3 = store_id + "CategoryPicture3" + categoryId + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
|
||||||
|
_path = CommonString.FILE_PATH + _pathforcheck3;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
im4.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
_pathforcheck4 = store_id + "CategoryPicture4" + categoryId + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
|
||||||
|
_path = CommonString.FILE_PATH + _pathforcheck4;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getCurrentTime() {
|
||||||
|
|
||||||
|
Calendar m_cal = Calendar.getInstance();
|
||||||
|
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss:mmm");
|
||||||
|
String cdate = formatter.format(m_cal.getTime());
|
||||||
|
|
||||||
|
/* String intime = m_cal.get(Calendar.HOUR_OF_DAY) + ":"
|
||||||
|
+ m_cal.get(Calendar.MINUTE) + ":" + m_cal.get(Calendar.SECOND);*/
|
||||||
|
|
||||||
|
return cdate;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean updateResources(Context context, String language) {
|
||||||
|
|
||||||
|
String lang;
|
||||||
|
|
||||||
|
if (language.equalsIgnoreCase("English")) {
|
||||||
|
lang = "EN";
|
||||||
|
} else if (language.equalsIgnoreCase("UAE")) {
|
||||||
|
lang = "AR";
|
||||||
|
} else {
|
||||||
|
lang = "TR";
|
||||||
|
}
|
||||||
|
|
||||||
|
Locale locale = new Locale(lang);
|
||||||
|
Locale.setDefault(locale);
|
||||||
|
|
||||||
|
Resources resources = context.getResources();
|
||||||
|
|
||||||
|
Configuration configuration = resources.getConfiguration();
|
||||||
|
configuration.locale = locale;
|
||||||
|
|
||||||
|
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
|
||||||
|
String packag = list.get(n).loadLabel(packageManager).toString();
|
||||||
|
if (packag.equalsIgnoreCase("Gallery") || packag.equalsIgnoreCase("Galeri")) {
|
||||||
|
gallery_package = list.get(n).packageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
|
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera")) {
|
||||||
|
defaultCameraPackage = list.get(n).packageName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (packag.equalsIgnoreCase("Camera") || packag.equalsIgnoreCase("Kamera")) {
|
||||||
|
|
||||||
|
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) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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 (_pathforcheck1 != null && !_pathforcheck1.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck1).exists()) {
|
||||||
|
|
||||||
|
im1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str1 = _pathforcheck1;
|
||||||
|
_pathforcheck1 = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_pathforcheck2 != null && !_pathforcheck2.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck2).exists()) {
|
||||||
|
|
||||||
|
im2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str2 = _pathforcheck2;
|
||||||
|
_pathforcheck2 = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_pathforcheck3 != null && !_pathforcheck3.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck3).exists()) {
|
||||||
|
|
||||||
|
im3.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str3 = _pathforcheck3;
|
||||||
|
_pathforcheck3 = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_pathforcheck4 != null && !_pathforcheck4.equals("")) {
|
||||||
|
if (new File(str + _pathforcheck4).exists()) {
|
||||||
|
|
||||||
|
im4.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
img_str4 = _pathforcheck4;
|
||||||
|
_pathforcheck4 = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (Camerapath1 != null && !Camerapath1.equals("")) {
|
||||||
|
if (new File(str + Camerapath1).exists()) {
|
||||||
|
|
||||||
|
|
||||||
|
listdat.get(Adapterposition).setSubCategoryCamera1(Camerapath1);
|
||||||
|
|
||||||
|
Camerapath1 = "";
|
||||||
|
listview.invalidateViews();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Camerapath2 != null && !Camerapath2.equals("")) {
|
||||||
|
if (new File(str + Camerapath2).exists()) {
|
||||||
|
|
||||||
|
listdat.get(Adapterposition).setSubCategoryCamera2(Camerapath2);
|
||||||
|
|
||||||
|
Camerapath2 = "";
|
||||||
|
listview.invalidateViews();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class CategoryAdapter extends BaseAdapter {
|
||||||
|
|
||||||
|
private LayoutInflater mInflater;
|
||||||
|
private Context mcontext;
|
||||||
|
private ArrayList<CategoryPictureGetterSetter> list;
|
||||||
|
|
||||||
|
public CategoryAdapter(Activity activity, ArrayList<CategoryPictureGetterSetter> list1) {
|
||||||
|
|
||||||
|
mInflater = LayoutInflater.from(getBaseContext());
|
||||||
|
mcontext = activity;
|
||||||
|
list = list1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position1) {
|
||||||
|
|
||||||
|
return position1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position1) {
|
||||||
|
|
||||||
|
return position1;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ViewHolder {
|
||||||
|
TextView brand, qty_bought, display;
|
||||||
|
Button camera1, camera2, delete;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(final int position1, View convertView, ViewGroup parent) {
|
||||||
|
|
||||||
|
final CategoryPicture.CategoryAdapter.ViewHolder holder;
|
||||||
|
|
||||||
|
if (convertView == null) {
|
||||||
|
|
||||||
|
convertView = mInflater
|
||||||
|
.inflate(R.layout.contentcatgoryadpterlayout, null);
|
||||||
|
holder = new CategoryPicture.CategoryAdapter.ViewHolder();
|
||||||
|
|
||||||
|
holder.brand = (TextView) convertView.findViewById(R.id.textviewname);
|
||||||
|
|
||||||
|
|
||||||
|
holder.camera1 = (Button) convertView.findViewById(R.id.button3);
|
||||||
|
holder.camera2 = (Button) convertView.findViewById(R.id.cameranew);
|
||||||
|
convertView.setTag(holder);
|
||||||
|
} else {
|
||||||
|
holder = (CategoryPicture.CategoryAdapter.ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
holder.camera1.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
Camerapath1 = store_id + "CategoryPicture" + list.get(position1).getSUB_CATEGORY_ID().toString() + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
Adapterposition = position1;
|
||||||
|
|
||||||
|
_path = CommonString.FILE_PATH + Camerapath1;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
|
||||||
|
listview.invalidateViews();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.camera2.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
|
||||||
|
Camerapath2 = store_id + "CategoryPicture" + list.get(position1).getSUB_CATEGORY_ID().toString() + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
|
||||||
|
Adapterposition = position1;
|
||||||
|
_path = CommonString.FILE_PATH + Camerapath2;
|
||||||
|
intime = getCurrentTime();
|
||||||
|
startCameraActivity();
|
||||||
|
listview.invalidateViews();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.brand.setText(list.get(position1).getSUB_CATEGORY().toString());
|
||||||
|
|
||||||
|
|
||||||
|
if (!listdat.get(position1).getSubCategoryCamera1().equalsIgnoreCase("")) {
|
||||||
|
|
||||||
|
holder.camera1.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
holder.camera1.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!listdat.get(position1).getSubCategoryCamera2().equalsIgnoreCase("")) {
|
||||||
|
|
||||||
|
|
||||||
|
holder.camera2.setBackgroundResource(R.mipmap.camera_green);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
holder.camera2.setBackgroundResource(R.mipmap.camera_orange);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
holder.brand.setId(position1);
|
||||||
|
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
boolean validateData(CategoryPictureGetterSetter data, ArrayList<CategoryPictureGetterSetter> list) {
|
||||||
|
boolean flag = true;
|
||||||
|
|
||||||
|
String cameraImage1 = data.getCategoryImage1();
|
||||||
|
|
||||||
|
|
||||||
|
if (cameraImage1 == null) {
|
||||||
|
flag = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
|
||||||
|
String imageu = list.get(i).getSubCategoryCamera1();
|
||||||
|
|
||||||
|
if (imageu.equalsIgnoreCase("")) {
|
||||||
|
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+52
-2
@@ -29,6 +29,7 @@ import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
|||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
import cpm.com.gskmtorange.constant.CommonString;
|
import cpm.com.gskmtorange.constant.CommonString;
|
||||||
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
import cpm.com.gskmtorange.dailyentry.AdditionalVisibility;
|
||||||
|
import cpm.com.gskmtorange.dailyentry.CategoryPicture;
|
||||||
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
import cpm.com.gskmtorange.dailyentry.T2PComplianceActivity;
|
||||||
import cpm.com.gskmtorange.xmlGetterSetter.DailyDataMenuGetterSetter;
|
import cpm.com.gskmtorange.xmlGetterSetter.DailyDataMenuGetterSetter;
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
GSKOrangeDB db;
|
GSKOrangeDB db;
|
||||||
String categoryName = "", categoryId;
|
String categoryName = "", categoryId;
|
||||||
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id;
|
String store_id, visit_date, username, intime, date, keyAccount_id, class_id, storeType_id,camera_allow;
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -70,7 +71,7 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
keyAccount_id = preferences.getString(CommonString.KEY_KEYACCOUNT_ID, "");
|
||||||
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
class_id = preferences.getString(CommonString.KEY_CLASS_ID, "");
|
||||||
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
storeType_id = preferences.getString(CommonString.KEY_STORETYPE_ID, "");
|
||||||
|
camera_allow = preferences.getString(CommonString.KEY_CAMERA_ALLOW, "");
|
||||||
//Intent data
|
//Intent data
|
||||||
categoryName = getIntent().getStringExtra("categoryName");
|
categoryName = getIntent().getStringExtra("categoryName");
|
||||||
categoryId = getIntent().getStringExtra("categoryId");
|
categoryId = getIntent().getStringExtra("categoryId");
|
||||||
@@ -175,6 +176,28 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
categoryList.add(data);
|
categoryList.add(data);
|
||||||
|
|
||||||
|
|
||||||
|
//Category Pictures
|
||||||
|
|
||||||
|
data = new DailyDataMenuGetterSetter();
|
||||||
|
//data.setCategory_name("Additional Visibility");
|
||||||
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_category_picture));
|
||||||
|
|
||||||
|
if(camera_allow.equalsIgnoreCase("1")){
|
||||||
|
|
||||||
|
if (db.isCategoryPictureData(store_id, categoryId)) {
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory_done);
|
||||||
|
} else {
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
data.setCategory_img(R.mipmap.picturecatogory_grey);
|
||||||
|
}
|
||||||
|
|
||||||
|
categoryList.add(data);
|
||||||
|
|
||||||
|
|
||||||
/*data = new DailyDataMenuGetterSetter();
|
/*data = new DailyDataMenuGetterSetter();
|
||||||
data.setCategory_name(getResources().getString(R.string.daily_data_menu_competition_tracking));
|
data.setCategory_name(getResources().getString(R.string.daily_data_menu_competition_tracking));
|
||||||
//data.setCategory_name("Competition Tracking");
|
//data.setCategory_name("Competition Tracking");
|
||||||
@@ -271,8 +294,19 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_category_picture)))) {
|
||||||
|
if(camera_allow.equalsIgnoreCase("1")){
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
|
||||||
|
} else {
|
||||||
|
holder.categoryName.setTextColor(getResources().getColor(R.color.grey_background));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
holder.lay_menu.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
@@ -314,7 +348,23 @@ public class DailyDataMenuActivity extends AppCompatActivity {
|
|||||||
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (dailyData.getCategory_name().equalsIgnoreCase((getResources().getString(R.string.daily_data_menu_category_picture)))) {
|
||||||
|
|
||||||
|
if(camera_allow.equalsIgnoreCase("1")){
|
||||||
|
|
||||||
|
Intent intent = new Intent(DailyDataMenuActivity.this, CategoryPicture.class);
|
||||||
|
intent.putExtra("categoryName", dailyData.getCategory_name());
|
||||||
|
intent.putExtra("categoryId", categoryId);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+2
-2
@@ -438,7 +438,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
camera1.setBackgroundResource(R.mipmap.camera_grey);
|
camera1.setBackgroundResource(R.mipmap.camera_grey);
|
||||||
|
|
||||||
lin_camera1.setOnClickListener(new View.OnClickListener() {
|
/* lin_camera1.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Intent intent = new Intent(Stock_FacingActivity.this, StockFacing_PlanogramTrackerActivity.class);
|
Intent intent = new Intent(Stock_FacingActivity.this, StockFacing_PlanogramTrackerActivity.class);
|
||||||
@@ -452,7 +452,7 @@ public class Stock_FacingActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import cpm.com.gskmtorange.Database.GSKOrangeDB;
|
|||||||
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.AdditionalDialogGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
import cpm.com.gskmtorange.GetterSetter.BrandAvabilityGetterSetter;
|
||||||
|
import cpm.com.gskmtorange.GetterSetter.CategoryPictureGetterSetter;
|
||||||
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
import cpm.com.gskmtorange.GetterSetter.CoverageBean;
|
||||||
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
import cpm.com.gskmtorange.GetterSetter.StoreBean;
|
||||||
import cpm.com.gskmtorange.R;
|
import cpm.com.gskmtorange.R;
|
||||||
@@ -83,7 +84,8 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
private int factor, k = 0;
|
private int factor, k = 0;
|
||||||
Object result = "";
|
Object result = "";
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
|
ArrayList<CategoryPictureGetterSetter> adddata = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
|
ArrayList<CategoryPictureGetterSetter> listdat = new ArrayList<CategoryPictureGetterSetter>();
|
||||||
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
ArrayList<StockFacing_PlanogramTrackerDataGetterSetter> stockFacingPlanogramDataList;
|
||||||
|
|
||||||
ArrayList<Store_wise_camera_DataGetterSetter> storeWiseCameraDataGetterSetters;
|
ArrayList<Store_wise_camera_DataGetterSetter> storeWiseCameraDataGetterSetters;
|
||||||
@@ -605,11 +607,42 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
String additional_visibility_dialog_xml = "";
|
String additional_visibility_dialog_xml = "";
|
||||||
onXML = "";
|
onXML = "";
|
||||||
String onXMLdIALOG = "";
|
String onXMLdIALOG = "";
|
||||||
|
|
||||||
|
String imageV1,imageV2,imageV3;
|
||||||
|
|
||||||
additionalVisibilityList = db.getAdditionalStockUpload(coverageList.get(i).getStoreId());
|
additionalVisibilityList = db.getAdditionalStockUpload(coverageList.get(i).getStoreId());
|
||||||
|
|
||||||
if (additionalVisibilityList.size() > 0) {
|
if (additionalVisibilityList.size() > 0) {
|
||||||
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
for (int J = 0; J < additionalVisibilityList.size(); J++) {
|
||||||
|
|
||||||
|
if(additionalVisibilityList.get(J).getImage()==null)
|
||||||
|
{
|
||||||
|
imageV1="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
imageV1=additionalVisibilityList.get(J).getImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(additionalVisibilityList.get(J).getImage2()==null)
|
||||||
|
{
|
||||||
|
imageV2="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
imageV2=additionalVisibilityList.get(J).getImage2();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(additionalVisibilityList.get(J).getImage3()==null)
|
||||||
|
{
|
||||||
|
imageV3="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
imageV3=additionalVisibilityList.get(J).getImage3();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
String KeyID = additionalVisibilityList.get(J).getKey_id();
|
||||||
|
|
||||||
additionalVisibilitySkuList = db.getDialogStockUpload(KeyID);
|
additionalVisibilitySkuList = db.getDialogStockUpload(KeyID);
|
||||||
@@ -660,13 +693,13 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
+ additionalVisibilityList.get(J).getBrand_id()
|
+ additionalVisibilityList.get(J).getBrand_id()
|
||||||
+ "[/BRAND_ID]"*/
|
+ "[/BRAND_ID]"*/
|
||||||
+ "[IMAGE_URL]"
|
+ "[IMAGE_URL]"
|
||||||
+ additionalVisibilityList.get(J).getImage()
|
+ imageV1 /*additionalVisibilityList.get(J).getImage()*/
|
||||||
+ "[/IMAGE_URL]"
|
+ "[/IMAGE_URL]"
|
||||||
+ "[IMAGE_URL1]"
|
+ "[IMAGE_URL1]"
|
||||||
+ additionalVisibilityList.get(J).getImage2()
|
+ imageV2 /*additionalVisibilityList.get(J).getImage2()*/
|
||||||
+ "[/IMAGE_URL1]"
|
+ "[/IMAGE_URL1]"
|
||||||
+ "[IMAGE_URL2]"
|
+ "[IMAGE_URL2]"
|
||||||
+ additionalVisibilityList.get(J).getImage3()
|
+ imageV3 /*additionalVisibilityList.get(J).getImage3()*/
|
||||||
+ "[/IMAGE_URL2]"
|
+ "[/IMAGE_URL2]"
|
||||||
+ "[DISPLAY_ID]"
|
+ "[DISPLAY_ID]"
|
||||||
+ additionalVisibilityList.get(J).getSku_id()
|
+ additionalVisibilityList.get(J).getSku_id()
|
||||||
@@ -1105,6 +1138,165 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Category Picture Data
|
||||||
|
String Category_xml = "";
|
||||||
|
|
||||||
|
onXML = "";
|
||||||
|
String onCategoryList = "";
|
||||||
|
String CategoryLISTDATA = "";
|
||||||
|
String image1,image2,image3,image4;
|
||||||
|
|
||||||
|
|
||||||
|
adddata = db.getCategoryPictureUpload(coverageList.get(i).getStoreId());
|
||||||
|
|
||||||
|
if (adddata.size() > 0) {
|
||||||
|
for (int J = 0; J < adddata.size(); J++) {
|
||||||
|
|
||||||
|
|
||||||
|
if(adddata.get(J).getCategoryImage1()==null)
|
||||||
|
{
|
||||||
|
image1="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
image1=adddata.get(J).getCategoryImage1();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(adddata.get(J).getCategoryImage2()==null)
|
||||||
|
{
|
||||||
|
image2="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
image2=adddata.get(J).getCategoryImage2();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(adddata.get(J).getCategoryImage3()==null)
|
||||||
|
{
|
||||||
|
image3="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
image3=adddata.get(J).getCategoryImage3();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(adddata.get(J).getCategoryImage4()==null)
|
||||||
|
{
|
||||||
|
image4="";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
image4=adddata.get(J).getCategoryImage4();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
String KeyID = adddata.get(J).getKEY_ID();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
listdat = db.getCategoryPictureListUploaded(KeyID);
|
||||||
|
|
||||||
|
if (listdat.size() > 0) {
|
||||||
|
|
||||||
|
for (int k = 0; k < listdat.size(); k++) {
|
||||||
|
|
||||||
|
onCategoryList = "[SUB_CATEGORY_LIST]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]"
|
||||||
|
+ userId
|
||||||
|
+ "[/USER_ID]"
|
||||||
|
+ "[KEY_ID]"
|
||||||
|
+ listdat.get(k).getCOMMON_ID()
|
||||||
|
+ "[/KEY_ID]"
|
||||||
|
+ "[SUB_CATEGORY_ID]"
|
||||||
|
+ listdat.get(k).getSUB_CATEGORY_ID()
|
||||||
|
+ "[/SUB_CATEGORY_ID]"
|
||||||
|
+ "[SUB_CategoryImage1]"
|
||||||
|
+ listdat.get(k).getSubCategoryCamera1()
|
||||||
|
+ "[/SUB_CategoryImage1]"
|
||||||
|
+ "[SUB_CategoryImage2]"
|
||||||
|
+ listdat.get(k).getSubCategoryCamera2()
|
||||||
|
+ "[/SUB_CategoryImage2]"
|
||||||
|
+ "[/SUB_CATEGORY_LIST]";
|
||||||
|
|
||||||
|
CategoryLISTDATA = CategoryLISTDATA + onCategoryList;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onXML = "[CATEGORY_LIST]"
|
||||||
|
+ "[MID]" + mid + "[/MID]"
|
||||||
|
+ "[USER_ID]"
|
||||||
|
+ userId
|
||||||
|
+ "[/USER_ID]"
|
||||||
|
+ "[KEY_ID]"
|
||||||
|
+ adddata.get(J).getKEY_ID()
|
||||||
|
+ "[/KEY_ID]"
|
||||||
|
+ "[CATEGORY_ID]"
|
||||||
|
+ adddata.get(J).getCategoryId()
|
||||||
|
+ "[/CATEGORY_ID]"
|
||||||
|
+ "[CAMERA_ALLOW]"
|
||||||
|
+ adddata.get(J).getCamera_allow()
|
||||||
|
+ "[/CAMERA_ALLOW]"
|
||||||
|
|
||||||
|
+ "[IMAGE_URL_1]"
|
||||||
|
+ image1 /*adddata.get(J).getCategoryImage1()*/
|
||||||
|
+ "[/IMAGE_URL_1]"
|
||||||
|
+ "[IMAGE_URL_2]"
|
||||||
|
+ image2 /*adddata.get(J).getCategoryImage2()*/
|
||||||
|
+ "[/IMAGE_URL_2]"
|
||||||
|
+ "[IMAGE_URL_3]"
|
||||||
|
+ image3 /*adddata.get(J).getCategoryImage3()*/
|
||||||
|
+ "[/IMAGE_URL_3]"
|
||||||
|
+ "[IMAGE_URL_4]"
|
||||||
|
+ image4 /*adddata.get(J).getCategoryImage4()*/
|
||||||
|
+ "[/IMAGE_URL_4]"
|
||||||
|
+ "[SUB_LIST]"
|
||||||
|
+ CategoryLISTDATA
|
||||||
|
+ "[/SUB_LIST]"
|
||||||
|
+ "[/CATEGORY_LIST]";
|
||||||
|
|
||||||
|
|
||||||
|
Category_xml = Category_xml + onXML;
|
||||||
|
|
||||||
|
CategoryLISTDATA = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
final String sos_xml = "[DATA]" + Category_xml + "[/DATA]";
|
||||||
|
|
||||||
|
request = new SoapObject(CommonString.NAMESPACE, CommonString.METHOD_UPLOAD_STOCK_XML_DATA);
|
||||||
|
request.addProperty("XMLDATA", sos_xml);
|
||||||
|
request.addProperty("KEYS", "CATEGORY_PICTURE");
|
||||||
|
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();
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_NO_DATA)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.toString().equalsIgnoreCase(CommonString.KEY_FAILURE)) {
|
||||||
|
return CommonString.METHOD_UPLOAD_STOCK_XML_DATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data.value = 35;
|
||||||
|
data.name = getString(R.string.additional_data_uploading);
|
||||||
|
publishProgress(data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ashish visibility image start
|
// ashish visibility image start
|
||||||
if (additionalVisibilityList.size() > 0) {
|
if (additionalVisibilityList.size() > 0) {
|
||||||
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
for (int i1 = 0; i1 < additionalVisibilityList.size(); i1++) {
|
||||||
@@ -1179,6 +1371,151 @@ public class UploadActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
//// ashish close image
|
//// ashish close image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ashish SUB_CATEGORY_PICTURE start
|
||||||
|
if (listdat.size() > 0) {
|
||||||
|
for (int i1 = 0; i1 < listdat.size(); i1++) {
|
||||||
|
|
||||||
|
if (listdat.get(i1).getSubCategoryCamera1() != null && !listdat.get(i1).getSubCategoryCamera1().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera1()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(listdat.get(i1).getSubCategoryCamera1(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listdat.get(i1).getSubCategoryCamera2() != null && !listdat.get(i1).getSubCategoryCamera2().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + listdat.get(i1).getSubCategoryCamera2()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(listdat.get(i1).getSubCategoryCamera2(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ashish CATEGORY_PICTURE start
|
||||||
|
if (adddata.size() > 0) {
|
||||||
|
for (int i1 = 0; i1 < adddata.size(); i1++) {
|
||||||
|
|
||||||
|
if (adddata.get(i1).getCategoryImage1() != null && !adddata.get(i1).getCategoryImage1().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage1()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(adddata.get(i1).getCategoryImage1(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adddata.get(i1).getCategoryImage2() != null && !adddata.get(i1).getCategoryImage2().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage2()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(adddata.get(i1).getCategoryImage2(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adddata.get(i1).getCategoryImage3() != null && !adddata.get(i1).getCategoryImage3().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage3()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(adddata.get(i1).getCategoryImage3(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (adddata.get(i1).getCategoryImage4() != null && !adddata.get(i1).getCategoryImage4().equals("")) {
|
||||||
|
if (new File(CommonString.FILE_PATH + adddata.get(i1).getCategoryImage4()).exists()) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
result = UploadImage(adddata.get(i1).getCategoryImage4(), "CategoryImages");
|
||||||
|
|
||||||
|
if (!result.toString().equalsIgnoreCase(CommonString.KEY_SUCCESS)) {
|
||||||
|
return "CategoryImages";
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
message.setText("CategoryImages Uploaded");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////Start store images
|
///////Start store images
|
||||||
|
|
||||||
if (coverageList.size() > 0) {
|
if (coverageList.size() > 0) {
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?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"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
|
tools:context="cpm.com.gskmtorange.dailyentry.CategoryPicture">
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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/save_icon" />
|
||||||
|
|
||||||
|
<include layout="@layout/content_category_picture" />
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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:id="@+id/content_category_picture"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
|
android:weightSum="100"
|
||||||
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
|
tools:context="cpm.com.gskmtorange.dailyentry.CategoryPicture">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="10"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="100">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="25">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image1"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:background="@mipmap/camera_orange" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="25">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image2"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:background="@mipmap/camera_orange" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="25">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image3"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:background="@mipmap/camera_orange" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="25">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image4"
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:background="@mipmap/camera_orange" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="90">
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/listview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</ListView>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
android:id="@+id/card_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:layout_marginLeft="2dp"
|
||||||
|
android:layout_marginRight="2dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
card_view:cardBackgroundColor="@color/colorOrange"
|
||||||
|
card_view:cardCornerRadius="10dp">
|
||||||
|
|
||||||
|
<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:padding="10sp">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textviewname"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="6sp"
|
||||||
|
android:layout_marginTop="7dp"
|
||||||
|
android:text="Text View "
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/cameranew"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:background="@mipmap/camera_orange"
|
||||||
|
android:focusable="false" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button3"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginRight="80dp"
|
||||||
|
android:background="@mipmap/camera_orange" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
</RelativeLayout>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
@@ -275,5 +275,7 @@
|
|||||||
|
|
||||||
<!--Stock Facing Planogram Tracker-->
|
<!--Stock Facing Planogram Tracker-->
|
||||||
<string name="stock_planogram_data_uploading">Stock Planogram Data Uploading</string>
|
<string name="stock_planogram_data_uploading">Stock Planogram Data Uploading</string>
|
||||||
|
<string name="daily_data_menu_category_picture">Category Pictures</string>
|
||||||
|
<string name="title_activity_category_picture">CategoryPicture</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user