Commit fa73b41f authored by topjohnwu's avatar topjohnwu

Update repo and module item layout

parent a474eafe
...@@ -136,7 +136,6 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder> ...@@ -136,7 +136,6 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder>
@BindView(R.id.author) TextView author; @BindView(R.id.author) TextView author;
@BindView(R.id.expand_layout) LinearLayout expandLayout; @BindView(R.id.expand_layout) LinearLayout expandLayout;
@BindView(R.id.update) ImageView updateImage; @BindView(R.id.update) ImageView updateImage;
@BindView(R.id.installed) ImageView installedImage;
@BindView(R.id.changeLog) ImageView changeLog; @BindView(R.id.changeLog) ImageView changeLog;
@BindView(R.id.authorLink) ImageView authorLink; @BindView(R.id.authorLink) ImageView authorLink;
@BindView(R.id.supportLink) ImageView supportLink; @BindView(R.id.supportLink) ImageView supportLink;
...@@ -179,6 +178,11 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder> ...@@ -179,6 +178,11 @@ public class ReposAdapter extends RecyclerView.Adapter<ReposAdapter.ViewHolder>
layoutParams.height = expanded ? expandHeight : 0; layoutParams.height = expanded ? expandHeight : 0;
expandLayout.setLayoutParams(layoutParams); expandLayout.setLayoutParams(layoutParams);
expandLayout.setVisibility(expanded ? View.VISIBLE : View.GONE); expandLayout.setVisibility(expanded ? View.VISIBLE : View.GONE);
if (expanded) {
updateImage.setTranslationY(expandHeight / 2);
} else {
updateImage.setTranslationY(0);
}
} }
private void expand() { private void expand() {
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
android:padding="@dimen/card_layout_padding" android:padding="@dimen/card_layout_padding">
android:paddingEnd="@dimen/card_layout_padding"
android:paddingStart="@dimen/card_layout_padding">
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment