Skip to content

Commit 0d28af6

Browse files
committed
Fix Settings NPE and add RAR password visibility toggle
1 parent 48b6f26 commit 0d28af6

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

claimManagement/src/main/java/org/openimis/imisclaims/SettingsActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class SettingsActivity extends ImisActivity {
2020
EditText etRarPassword;
2121
private String salt, password;
2222
public static String generatedSalt;
23-
Global global;
2423

2524
@Override
2625
protected void onCreate(Bundle savedInstanceState) {

claimManagement/src/main/res/layout/settings.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
34
android:layout_width="match_parent"
45
android:layout_height="match_parent"
56
android:orientation="vertical">
@@ -14,15 +15,20 @@
1415
android:layout_marginTop="10dp"
1516
android:text="@string/RarPassword" />
1617

17-
<EditText
18-
android:id="@+id/rarPassword"
18+
<com.google.android.material.textfield.TextInputLayout
1919
android:layout_width="match_parent"
20-
android:layout_height="50dp"
21-
android:paddingLeft="10dp"
20+
android:layout_height="wrap_content"
2221
android:layout_marginLeft="20dp"
2322
android:layout_marginRight="20dp"
24-
android:inputType="textPassword">
25-
</EditText>
23+
app:endIconMode="password_toggle">
24+
25+
<com.google.android.material.textfield.TextInputEditText
26+
android:id="@+id/rarPassword"
27+
android:layout_width="match_parent"
28+
android:layout_height="50dp"
29+
android:paddingLeft="10dp"
30+
android:inputType="textPassword|textNoSuggestions" />
31+
</com.google.android.material.textfield.TextInputLayout>
2632

2733
<LinearLayout android:id="@+id/llSaveRarButton"
2834
android:layout_width="match_parent"
@@ -61,4 +67,4 @@
6167
android:text="@string/SaveRarPassword" />
6268
</LinearLayout>
6369

64-
</LinearLayout>
70+
</LinearLayout>

0 commit comments

Comments
 (0)