Skip to content

Commit 2d381d5

Browse files
authored
Merge pull request #61 from Y-Note-SAS/feature-36145
Fix Settings NPE and add RAR password visibility toggle
2 parents bed4b0b + 56761f5 commit 2d381d5

2 files changed

Lines changed: 15 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: 15 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"
@@ -34,6 +40,7 @@
3440
android:layout_width="0dp"
3541
android:layout_height="wrap_content"
3642
android:layout_weight="1"
43+
android:enabled="false"
3744
android:text="@string/SaveRarPassword"
3845
android:layout_marginBottom="10dp"/>
3946
</LinearLayout>
@@ -58,7 +65,8 @@
5865
android:layout_width="0dp"
5966
android:layout_height="wrap_content"
6067
android:layout_weight="1"
68+
android:enabled="false"
6169
android:text="@string/SaveRarPassword" />
6270
</LinearLayout>
6371

64-
</LinearLayout>
72+
</LinearLayout>

0 commit comments

Comments
 (0)