Browse Source

-Perbaikan layout (Padding, Margin, Color)

ilhamitubagoes 4 years ago
parent
commit
0b93ce85b8

+ 4 - 6
app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultActivity.java

@@ -9,7 +9,6 @@ import android.widget.Toast;
9 9
 
10 10
 import androidx.appcompat.widget.Toolbar;
11 11
 import androidx.recyclerview.widget.DefaultItemAnimator;
12
-import androidx.recyclerview.widget.DividerItemDecoration;
13 12
 import androidx.recyclerview.widget.LinearLayoutManager;
14 13
 
15 14
 import com.annimon.stream.Collectors;
@@ -105,7 +104,6 @@ public class ScanResultActivity extends BaseActivity implements ScanResultView {
105 104
         LinearLayoutManager layoutManager = new LinearLayoutManager(this);
106 105
         binding.rvGroupProblem.setLayoutManager(layoutManager);
107 106
         binding.rvGroupProblem.setItemAnimator(new DefaultItemAnimator());
108
-        binding.rvGroupProblem.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
109 107
         binding.rvGroupProblem.setAdapter(adapter);
110 108
     }
111 109
 
@@ -167,22 +165,22 @@ public class ScanResultActivity extends BaseActivity implements ScanResultView {
167 165
 
168 166
         if (dataResultRfid.getPassed()) {
169 167
             binding.tvProfileStatus.setText(R.string.label_status_passed);
170
-            binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
168
+            binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.greenPassed));
171 169
         } else {
172 170
             if (dataResultRfid.getAlertType() != null) {
173 171
                 if (dataResultRfid.getAlertType().equalsIgnoreCase("ERROR")) {
174 172
                     binding.tvProfileStatus.setText(R.string.label_status_not_passed);
175
-                    binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.colorRedDark));
173
+                    binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.redNotPassed));
176 174
                 }
177 175
 
178 176
                 if (dataResultRfid.getAlertType().equalsIgnoreCase("WARNING")) {
179 177
                     binding.tvProfileStatus.setText(R.string.label_status_not_valid);
180
-                    binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.colorRedDark));
178
+                    binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.redNotPassed));
181 179
                 }
182 180
 
183 181
             } else {
184 182
                 binding.tvProfileStatus.setText(R.string.label_status_not_passed);
185
-                binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.colorRedDark));
183
+                binding.llProfileStatus.setBackgroundColor(getResources().getColor(R.color.redNotPassed));
186 184
             }
187 185
         }
188 186
 

+ 1 - 1
app/src/main/res/layout/activity_scan_result_new.xml

@@ -124,7 +124,7 @@
124 124
                 android:layout_marginBottom="16dp"
125 125
                 android:layout_marginStart="100dp"
126 126
                 android:layout_marginEnd="100dp"
127
-                android:background="@color/colorPrimary">
127
+                android:background="@color/greenPassed">
128 128
 
129 129
                 <TextView
130 130
                     android:id="@+id/tv_profile_status"

+ 1 - 0
app/src/main/res/layout/row_group.xml

@@ -8,6 +8,7 @@
8 8
     <androidx.cardview.widget.CardView
9 9
         android:layout_width="match_parent"
10 10
         android:layout_height="wrap_content"
11
+        android:layout_marginBottom="8dp"
11 12
         app:cardBackgroundColor="@color/backgroundLayoutGrey">
12 13
 
13 14
         <RelativeLayout

+ 3 - 0
app/src/main/res/values/colors.xml

@@ -7,6 +7,8 @@
7 7
     <color name="colorRedDark">#C51616</color>
8 8
     <color name="colorGreenDark">#19771D</color>
9 9
     <color name="colorBlueDark">#195677</color>
10
+    <color name="redNotPassed">#E15555</color>
11
+    <color name="greenPassed">#54BC5A</color>
10 12
     <color name="greenSoft">#27AE5D</color>
11 13
     <color name="greenDark">#249852</color>
12 14
 
@@ -18,6 +20,7 @@
18 20
     <color name="backgroundCanvas">#f2f2f9</color>
19 21
     <color name="backgroundLayoutGrey">#E3E3E9</color>
20 22
     <color name="backgroundLayoutGreyDark">#B4B4B8</color>
23
+    <color name="backgroundDocument">#E3E3E9</color>
21 24
 
22 25
     <color name="colorWhite">#FFFFFF</color>
23 26
     <color name="colorBlack">#000000</color>