Skip to content

Commit 2ea6e47

Browse files
committed
Fix layout problem
1 parent 9015d45 commit 2ea6e47

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

app/src/main/java/com/sinu/molla/AppItemAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public ViewHolder(@NonNull View v) {
8181
public void onFocusChange(View view, boolean hasFocus) {
8282
if (hasFocus) {
8383
view.setZ(1f);
84-
if (!focused) cvCard.startAnimation(animScaleUp);
8584
ivBanner.setForeground(ContextCompat.getDrawable(context, R.drawable.outline));
85+
if (!focused) cvCard.startAnimation(animScaleUp);
8686
focused = true;
8787
selectedItem = manager.getPosition(view);
8888
if (focusChangedListener != null) {
@@ -91,8 +91,8 @@ public void onFocusChange(View view, boolean hasFocus) {
9191
}
9292
} else {
9393
view.setZ(0f);
94-
if (focused) cvCard.startAnimation(animScaleDown);
9594
ivBanner.setForeground(null);
95+
if (focused) cvCard.startAnimation(animScaleDown);
9696
focused = false;
9797
if (focusChangedListener != null) focusChangedListener.onAppItemFocusChanged(-1, null);
9898
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
3-
<corners android:radius="10dp"/>
4-
<stroke android:width="4dp" android:color="#FFFFFFFF"/>
3+
<corners android:radius="@dimen/_6sdp"/>
4+
<stroke android:width="@dimen/_3sdp" android:color="#FFFFFFFF"/>
55
</shape>

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<androidx.recyclerview.widget.RecyclerView
110110
android:id="@+id/rv_main_fav"
111111
android:layout_width="0dp"
112-
android:layout_height="@dimen/_112sdp"
112+
android:layout_height="@dimen/_88sdp"
113113
android:clickable="true"
114114
android:clipChildren="false"
115115
android:clipToPadding="false"
@@ -132,7 +132,7 @@
132132
android:id="@+id/pbr_main_loading"
133133
style="?android:attr/progressBarStyle"
134134
android:layout_width="@dimen/_56sdp"
135-
android:layout_height="@dimen/_112sdp"
135+
android:layout_height="@dimen/_88sdp"
136136
android:layout_marginStart="@dimen/_36sdp"
137137
app:layout_constraintBottom_toTopOf="@+id/lv_main_all"
138138
app:layout_constraintStart_toStartOf="parent" />

app/src/main/res/layout/layout_appitem.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
android:id="@+id/fv_appitem_body"
66
android:layout_width="wrap_content"
77
android:layout_height="match_parent"
8-
android:layout_marginEnd="12dp"
9-
android:layout_marginBottom="12dp"
8+
android:layout_marginEnd="@dimen/_8sdp"
9+
android:layout_marginBottom="@dimen/_8sdp"
1010
android:background="@null"
1111
android:clickable="true"
1212
android:descendantFocusability="afterDescendants"
@@ -20,8 +20,8 @@
2020
android:clickable="false"
2121
android:clipChildren="true"
2222
android:focusable="false"
23-
app:cardCornerRadius="12dp"
24-
app:cardElevation="4dp">
23+
app:cardCornerRadius="@dimen/_8sdp"
24+
app:cardElevation="@dimen/_3sdp">
2525

2626
<androidx.constraintlayout.widget.ConstraintLayout
2727
android:layout_width="wrap_content"

app/src/main/res/layout/layout_appitem_grid.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
android:id="@+id/fv_appitem_grid_body"
66
android:layout_width="match_parent"
77
android:layout_height="wrap_content"
8-
android:layout_marginEnd="12dp"
9-
android:layout_marginBottom="12dp"
8+
android:layout_marginEnd="@dimen/_8sdp"
9+
android:layout_marginBottom="@dimen/_8sdp"
1010
android:background="@null"
1111
android:clickable="true"
1212
android:descendantFocusability="afterDescendants"
@@ -20,8 +20,8 @@
2020
android:clickable="false"
2121
android:clipChildren="true"
2222
android:focusable="false"
23-
app:cardCornerRadius="12dp"
24-
app:cardElevation="4dp">
23+
app:cardCornerRadius="@dimen/_8sdp"
24+
app:cardElevation="@dimen/_3sdp">
2525

2626
<androidx.constraintlayout.widget.ConstraintLayout
2727
android:layout_width="match_parent"

0 commit comments

Comments
 (0)