diff --git a/Clover/app/proguard.cfg b/Clover/app/proguard.cfg index 0fe0271c..6721f36c 100644 --- a/Clover/app/proguard.cfg +++ b/Clover/app/proguard.cfg @@ -11,7 +11,7 @@ # used if you are only targeting Android 2.0 or later.) Make sure you # test thoroughly if you go this route. -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* --optimizationpasses 5 +-optimizationpasses 2 -allowaccessmodification -dontpreverify diff --git a/Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java b/Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java index a021ece0..8ed5f555 100644 --- a/Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java +++ b/Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java @@ -53,6 +53,7 @@ import java.util.List; import static org.floens.chan.utils.AndroidUtils.ROBOTO_MEDIUM; import static org.floens.chan.utils.AndroidUtils.dp; import static org.floens.chan.utils.AndroidUtils.getAttrColor; +import static org.floens.chan.utils.AndroidUtils.getDimen; /** * A layout that wraps around a {@link RecyclerView} and a {@link ReplyLayout} to manage showing and replying to posts. @@ -316,7 +317,7 @@ public class ThreadListLayout extends FrameLayout implements ReplyLayout.ReplyLa case CARD: if (getTopAdapterPosition() == 0) { View top = layoutManager.findViewByPosition(0); - return top.getTop() != dp(8) + toolbarHeight(); // 4dp for the cards, 4dp for this layout + return top.getTop() != getDimen(getContext(), R.dimen.grid_card_margin) + dp(4) + toolbarHeight(); // 4dp for the cards, 4dp for this layout } break; } diff --git a/Clover/app/src/main/res/layout/cell_post_card.xml b/Clover/app/src/main/res/layout/cell_post_card.xml index 1e2986c1..2aba30e3 100644 --- a/Clover/app/src/main/res/layout/cell_post_card.xml +++ b/Clover/app/src/main/res/layout/cell_post_card.xml @@ -20,8 +20,7 @@ along with this program. If not, see . xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="4dp" - android:padding="50dp" + android:layout_margin="@dimen/grid_card_margin" card_view:cardBackgroundColor="?backcolor" card_view:cardCornerRadius="2dp" card_view:cardElevation="4dp"> diff --git a/Clover/app/src/main/res/values-v21/dimens.xml b/Clover/app/src/main/res/values-v21/dimens.xml new file mode 100644 index 00000000..3f81013b --- /dev/null +++ b/Clover/app/src/main/res/values-v21/dimens.xml @@ -0,0 +1,20 @@ + + + 4dp + diff --git a/Clover/app/src/main/res/values/dimens.xml b/Clover/app/src/main/res/values/dimens.xml index ba380a58..559404fe 100644 --- a/Clover/app/src/main/res/values/dimens.xml +++ b/Clover/app/src/main/res/values/dimens.xml @@ -22,6 +22,7 @@ along with this program. If not, see . 120dp 200dp + 0dp 72dp