category_id_added

This commit is contained in:
CPM
2021-01-28 19:18:34 +05:30
parent a3be6bc8cc
commit 4fed5b0c28
16 changed files with 57 additions and 44 deletions
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>
+1
View File
@@ -16,6 +16,7 @@
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" /> <option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>
+1 -1
View File
@@ -46,7 +46,7 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="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">
+3 -6
View File
@@ -2,12 +2,9 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/AndroidProject-GSKORANGEV2.iml" filepath="$PROJECT_DIR$/.idea/modules/AndroidProject-GSKORANGEV2.iml" group="GSKORANGEV2" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/GSKORANGEV2.iml" filepath="$PROJECT_DIR$/.idea/modules/GSKORANGEV2.iml" />
<module fileurl="file://$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" filepath="$PROJECT_DIR$/GSKMTOrange/GSKMTOrange.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/GSKMTOrange/GSKORANGEV2.GSKMTOrange.iml" filepath="$PROJECT_DIR$/.idea/modules/GSKMTOrange/GSKORANGEV2.GSKMTOrange.iml" />
<module fileurl="file://$PROJECT_DIR$/GSKORANGEV2.iml" filepath="$PROJECT_DIR$/GSKORANGEV2.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/library/GSKORANGEV2.library.iml" filepath="$PROJECT_DIR$/.idea/modules/library/GSKORANGEV2.library.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/GSKMTOrange/GSKORANGEV2-GSKMTOrange.iml" filepath="$PROJECT_DIR$/.idea/modules/GSKMTOrange/GSKORANGEV2-GSKMTOrange.iml" group="GSKORANGEV2/GSKMTOrange" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/library/GSKORANGEV2-library.iml" filepath="$PROJECT_DIR$/.idea/modules/library/GSKORANGEV2-library.iml" group="GSKORANGEV2/library" />
<module fileurl="file://$PROJECT_DIR$/library/library.iml" filepath="$PROJECT_DIR$/library/library.iml" />
</modules> </modules>
</component> </component>
</project> </project>
+6 -6
View File
@@ -27,9 +27,9 @@ android {
versionCode 31 versionCode 31
versionName "4.3"*/ versionName "4.3"*/
/* //For UAE //For UAE
versionCode 26 versionCode 25
versionName "3.8"*/ versionName "3.7"
//For Turkey //For Turkey
@@ -39,8 +39,8 @@ android {
//For KSA //For KSA
/* versionCode 28 /* versionCode 28
versionName "4.0"*/ versionName "4.0"*/
versionCode 27 /* versionCode 27
versionName "3.8" versionName "3.8"*/
//For SA //For SA
/* versionCode 28 /* versionCode 28
@@ -51,7 +51,7 @@ android {
versionName "3.4"*/ versionName "3.4"*/
//Kenya //Kenya
/* versionCode 2 /* versionCode 2
versionName "1.1"*/ versionName "1.1"*/
multiDexEnabled true multiDexEnabled true
@@ -95,7 +95,7 @@ import cpm.com.gskmtorange.xmlGetterSetter.TableBean;
*/ */
public class GSKOrangeDB extends SQLiteOpenHelper { public class GSKOrangeDB extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "GSK_ORANGE_DB66"; public static final String DATABASE_NAME = "GSK_ORANGE_DB67";
public static final int DATABASE_VERSION = 15; public static final int DATABASE_VERSION = 15;
TableBean tableBean; TableBean tableBean;
private SQLiteDatabase db; private SQLiteDatabase db;
@@ -144,7 +144,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
Button museridSignInButton; Button museridSignInButton;
// Trace myTrace; // Trace myTrace;
GoogleApiClient mGoogleApiClient; GoogleApiClient mGoogleApiClient;
private static int UPDATE_INTERVAL = 200; // 5 sec private static int UPDATE_INTERVAL = 200; // 5 sec
@@ -163,9 +163,9 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
setContentView(R.layout.activity_login); setContentView(R.layout.activity_login);
context = this; context = this;
// Obtain the FirebaseAnalytics instance. // Obtain the FirebaseAnalytics instance.
// mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); // mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
// Fabric.with(this, new Crashlytics()); // Fabric.with(this, new Crashlytics());
TextView tv_version = (TextView) findViewById(R.id.tv_version_code); TextView tv_version = (TextView) findViewById(R.id.tv_version_code);
@@ -201,29 +201,31 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
/* museridView.setText("mini_ka_84_1"); /* museridView.setText("mini_ka_84_1");
mPasswordView.setText("cpm123");*/ mPasswordView.setText("cpm123");*/
//UAE //UAE
/* museridView.setText("testuae"); museridView.setText("testuae");
mPasswordView.setText("cpm123");*/ mPasswordView.setText("cpm123");
//KSA //KSA
museridView.setText("Esmail.d"); /* museridView.setText("Esmail.d");
mPasswordView.setText("cpm@123"); mPasswordView.setText("cpm@123");*/
/* museridView.setText("testksa"); /* museridView.setText("testksa");
mPasswordView.setText("cpm123");*/ mPasswordView.setText("cpm123");*/
/* museridView.setText("Ahmed.saied");
mPasswordView.setText("cpm@123");*/
//turkey //turkey
/* museridView.setText("testmer"); /* museridView.setText("testmer");
mPasswordView.setText("cpm123"); mPasswordView.setText("cpm123");
*/ */
//sa //sa
/* museridView.setText("testsa"); /* museridView.setText("testsa");
mPasswordView.setText("cpm123"); mPasswordView.setText("cpm123");
*/ */
//Kenya //Kenya
// museridView.setText("test.Kenya"); // museridView.setText("test.Kenya");
/* museridView.setText("testkenya"); /* museridView.setText("testkenya");
mPasswordView.setText("cpm123");*/ mPasswordView.setText("cpm123");*/
mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override @Override
@@ -640,9 +642,9 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, CommonString.KEY_LOGIN_DATA); bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, CommonString.KEY_LOGIN_DATA);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "Data"); bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "Data");
bundle.putString(CommonString.KEY_LANGUAGE, preferences.getString(CommonString.KEY_LANGUAGE, "")); bundle.putString(CommonString.KEY_LANGUAGE, preferences.getString(CommonString.KEY_LANGUAGE, ""));
// mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle); // mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
// Crashlytics.setUserIdentifier(userid); // Crashlytics.setUserIdentifier(userid);
return CommonString.KEY_SUCCESS; return CommonString.KEY_SUCCESS;
@@ -689,9 +691,9 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
/* final AlertMessage message = new AlertMessage( /* final AlertMessage message = new AlertMessage(
LoginActivity.this, AlertMessage.MESSAGE_EXCEPTION, LoginActivity.this, AlertMessage.MESSAGE_EXCEPTION,
"acra_login", e);*/ "acra_login", e);*/
// Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString()); // Crashlytics.log(7, CommonString.MESSAGE_EXCEPTION, e.toString());
// Crashlytics.logException(e.getCause()); // Crashlytics.logException(e.getCause());
// Crashlytics.logException(new Exception("My custom login Exception")); // Crashlytics.logException(new Exception("My custom login Exception"));
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
@@ -710,7 +712,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
super.onPostExecute(result); super.onPostExecute(result);
//Stop performance trace //Stop performance trace
/// myTrace.stop(); /// myTrace.stop();
if (result.equals(CommonString.KEY_SUCCESS)) { if (result.equals(CommonString.KEY_SUCCESS)) {
@@ -718,7 +720,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
boolean forSA = false; boolean forSA = false;
// database.open(); // database.open();
if(forSA){ if (forSA) {
//For SA Only //For SA Only
if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) { if (preferences.getString(CommonString.KEY_LANGUAGE, "").equals("")) {
@@ -742,8 +744,7 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
//uploadPreviousImages(); //uploadPreviousImages();
} }
} } else {
else {
//for other than SA //for other than SA
if (preferences.getString(CommonString.KEY_VERSION, "").equals( if (preferences.getString(CommonString.KEY_VERSION, "").equals(
Integer.toString(versionCode))) { Integer.toString(versionCode))) {
@@ -1257,13 +1258,14 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
LoginGetterSetter login_data; LoginGetterSetter login_data;
private void setLanguageDataFromSharedPreferences(){ private void setLanguageDataFromSharedPreferences() {
Gson gson = new Gson(); Gson gson = new Gson();
login_data = new LoginGetterSetter(); login_data = new LoginGetterSetter();
String jsonPreferences = preferences.getString(CommonString.KEY_LOOGIN_PREF, ""); String jsonPreferences = preferences.getString(CommonString.KEY_LOOGIN_PREF, "");
Type type = new TypeToken<LoginGetterSetter>() {}.getType(); Type type = new TypeToken<LoginGetterSetter>() {
}.getType();
login_data = gson.fromJson(jsonPreferences, type); login_data = gson.fromJson(jsonPreferences, type);
language = login_data.getCULTURE_NAME(); language = login_data.getCULTURE_NAME();
@@ -1272,9 +1274,9 @@ public class LoginActivity extends AppCompatActivity implements GoogleApiClient.
String lang = preferences.getString(CommonString.KEY_LANGUAGE, ""); String lang = preferences.getString(CommonString.KEY_LANGUAGE, "");
if(language.size()>0){ if (language.size() > 0) {
for(int i=0; i<language.size();i++){ for (int i = 0; i < language.size(); i++) {
if(lang.equals(language.get(i))){ if (lang.equals(language.get(i))) {
editor.putString(CommonString.KEY_LANGUAGE, language.get(i)); editor.putString(CommonString.KEY_LANGUAGE, language.get(i));
editor.putString(CommonString.KEY_CULTURE_ID, culture_id.get(i)); editor.putString(CommonString.KEY_CULTURE_ID, culture_id.get(i));
editor.putString(CommonString.KEY_NOTICE_BOARD_LINK, notice_url.get(i)); editor.putString(CommonString.KEY_NOTICE_BOARD_LINK, notice_url.get(i));
@@ -306,6 +306,10 @@ public class CategoryListActivity extends AppCompatActivity {
categoryList.get(i).setCategory_img(R.mipmap.analgesics_tick); categoryList.get(i).setCategory_img(R.mipmap.analgesics_tick);
}else if (category_id.equals("8")) { }else if (category_id.equals("8")) {
categoryList.get(i).setCategory_img(R.mipmap.first_aid_tick); categoryList.get(i).setCategory_img(R.mipmap.first_aid_tick);
}else if (category_id.equals("9")) {
categoryList.get(i).setCategory_img(R.mipmap.pain_relief_tick);
} else if (category_id.equals("10")) {
categoryList.get(i).setCategory_img(R.mipmap.respiratory_health_tick);
} }
} else { } else {
if (category_id.equals("1")) { if (category_id.equals("1")) {
@@ -324,6 +328,10 @@ public class CategoryListActivity extends AppCompatActivity {
categoryList.get(i).setCategory_img(R.mipmap.analgesics); categoryList.get(i).setCategory_img(R.mipmap.analgesics);
}else if (category_id.equals("8")) { }else if (category_id.equals("8")) {
categoryList.get(i).setCategory_img(R.mipmap.first_aid); categoryList.get(i).setCategory_img(R.mipmap.first_aid);
}else if (category_id.equals("9")) {
categoryList.get(i).setCategory_img(R.mipmap.pain_relief);
} else if (category_id.equals("10")) {
categoryList.get(i).setCategory_img(R.mipmap.respiratory_health);
} }
} }
} }
@@ -30,8 +30,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical">
>
<TextView <TextView
android:id="@+id/categoryName" android:id="@+id/categoryName"
@@ -94,7 +94,7 @@
android:layout_weight="4" android:layout_weight="4"
android:gravity="center" android:gravity="center"
android:padding="5dp" android:padding="5dp"
android:text="@string/category_performance_t2p" android:text="@string/title_posm"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" /> android:textColor="#000" />
@@ -94,7 +94,7 @@
android:layout_weight="4" android:layout_weight="4"
android:gravity="center" android:gravity="center"
android:padding="5dp" android:padding="5dp"
android:text="@string/category_performance_t2p" android:text="@string/title_posm"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000" /> android:textColor="#000" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB