Commit 395af69d authored by Chamod Ishankha's avatar Chamod Ishankha

email status view

parent 430da406
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> <option name="gradleJvm" value="jbr-17" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="" vcs="Git" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -21,6 +21,7 @@ import android.view.MenuItem; ...@@ -21,6 +21,7 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
...@@ -54,6 +55,7 @@ public class UserProfileActivity extends AppCompatActivity { ...@@ -54,6 +55,7 @@ public class UserProfileActivity extends AppCompatActivity {
private final static String TAG = "UserProfileActivity"; private final static String TAG = "UserProfileActivity";
private EditText etFirstName, etLastName, etType, etEmail, etMobile, etDob; private EditText etFirstName, etLastName, etType, etEmail, etMobile, etDob;
private ImageView imVerifiedStatus;
private Button btnEdit, btnCancel; private Button btnEdit, btnCancel;
private SpinKitView progressBar; private SpinKitView progressBar;
private View overlay; private View overlay;
...@@ -86,6 +88,7 @@ public class UserProfileActivity extends AppCompatActivity { ...@@ -86,6 +88,7 @@ public class UserProfileActivity extends AppCompatActivity {
etEmail = findViewById(R.id.up_et_email); etEmail = findViewById(R.id.up_et_email);
etMobile = findViewById(R.id.up_et_mobile); etMobile = findViewById(R.id.up_et_mobile);
etDob = findViewById(R.id.up_et_dob); etDob = findViewById(R.id.up_et_dob);
imVerifiedStatus = findViewById(R.id.up_im_email_verification_status);
// buttons // buttons
btnEdit = findViewById(R.id.l_btn_edit); btnEdit = findViewById(R.id.l_btn_edit);
btnCancel = findViewById(R.id.l_btn_cancel); btnCancel = findViewById(R.id.l_btn_cancel);
...@@ -215,6 +218,7 @@ public class UserProfileActivity extends AppCompatActivity { ...@@ -215,6 +218,7 @@ public class UserProfileActivity extends AppCompatActivity {
etLastName.setText(user.getLastName()); etLastName.setText(user.getLastName());
etType.setText(!Objects.equals(user.getRole(), "USER") ? user.getRole():"PARENT"); etType.setText(!Objects.equals(user.getRole(), "USER") ? user.getRole():"PARENT");
etEmail.setText(user.getEmail()); etEmail.setText(user.getEmail());
imVerifiedStatus.setImageDrawable(user.getStatus().equals("NEW")?getDrawable(R.drawable.ico_unverified) : getDrawable(R.drawable.ico_verified));
etMobile.setText(user.getPhone()); etMobile.setText(user.getPhone());
if (user.getDob() != null) { if (user.getDob() != null) {
LocalDate localDate = Utils.getLocalDate(user.getDob()); LocalDate localDate = Utils.getLocalDate(user.getDob());
......
...@@ -11,7 +11,7 @@ import retrofit2.Retrofit; ...@@ -11,7 +11,7 @@ import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.gson.GsonConverterFactory;
public class ApiConfig { public class ApiConfig {
private static final String BASE_URL = "http://192.168.1.2:8080/api/v1/baby-care/"; private static final String BASE_URL = "http://192.168.1.6:8080/api/v1/baby-care/";
private static ApiConfig instance; private static ApiConfig instance;
private static Retrofit retrofitAuth = null; private static Retrofit retrofitAuth = null;
private static Retrofit retrofitOther = null; private static Retrofit retrofitOther = null;
......
...@@ -178,13 +178,26 @@ ...@@ -178,13 +178,26 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<TextView <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/inknut_antiqua_regular" android:fontFamily="@font/inknut_antiqua_regular"
android:text="Email Address" android:text="Email Address"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="15sp" /> android:textSize="15sp" />
<ImageView
android:id="@+id/up_im_email_verification_status"
android:layout_width="100dp"
android:layout_height="match_parent"
android:layout_marginLeft="8dp"
android:contentDescription="Email Verification Status" />
</LinearLayout>
<EditText <EditText
android:id="@+id/up_et_email" android:id="@+id/up_et_email"
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
<network-security-config> <network-security-config>
<domain-config cleartextTrafficPermitted="true"> <domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.1.2</domain> <domain includeSubdomains="true">192.168.1.2</domain>
<domain includeSubdomains="true">192.168.1.6</domain>
</domain-config> </domain-config>
</network-security-config> </network-security-config>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment