mirror of https://github.com/M66B/FairEmail.git
Small layout improvement
This commit is contained in:
parent
67fb4a0e72
commit
d1b9345cf5
|
@ -101,6 +101,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||||
private ImageView ivSync;
|
private ImageView ivSync;
|
||||||
private TextView tvKeywords;
|
private TextView tvKeywords;
|
||||||
private TextView tvError;
|
private TextView tvError;
|
||||||
|
private View vwHidden;
|
||||||
private View vwRipple;
|
private View vwRipple;
|
||||||
private RecyclerView rvChilds;
|
private RecyclerView rvChilds;
|
||||||
|
|
||||||
|
@ -133,6 +134,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||||
ivSync = itemView.findViewById(R.id.ivSync);
|
ivSync = itemView.findViewById(R.id.ivSync);
|
||||||
tvKeywords = itemView.findViewById(R.id.tvKeywords);
|
tvKeywords = itemView.findViewById(R.id.tvKeywords);
|
||||||
tvError = itemView.findViewById(R.id.tvError);
|
tvError = itemView.findViewById(R.id.tvError);
|
||||||
|
vwHidden = itemView.findViewById(R.id.vwHidden);
|
||||||
vwRipple = itemView.findViewById(R.id.vwRipple);
|
vwRipple = itemView.findViewById(R.id.vwRipple);
|
||||||
|
|
||||||
rvChilds = itemView.findViewById(R.id.rvChilds);
|
rvChilds = itemView.findViewById(R.id.rvChilds);
|
||||||
|
@ -184,10 +186,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindTo(final TupleFolderEx folder) {
|
private void bindTo(final TupleFolderEx folder) {
|
||||||
boolean hide = folder.isHidden(context);
|
view.setVisibility(folder.isHidden(context) && !show_hidden ? View.GONE : View.VISIBLE);
|
||||||
view.setVisibility(hide && !show_hidden ? View.GONE : View.VISIBLE);
|
|
||||||
view.setActivated(folder.tbc != null || folder.tbd != null);
|
view.setActivated(folder.tbc != null || folder.tbd != null);
|
||||||
view.setAlpha(hide ? Helper.LOW_LIGHT : 1.0f);
|
vwHidden.setAlpha(folder.hide ? Helper.LOW_LIGHT : 0.0f);
|
||||||
|
|
||||||
if (textSize != 0)
|
if (textSize != 0)
|
||||||
tvName.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
|
tvName.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
|
||||||
|
|
|
@ -197,6 +197,17 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/vwHidden"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:alpha="0"
|
||||||
|
android:background="?android:colorBackground"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/paddingBottom"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/vwRipple"
|
android:id="@+id/vwRipple"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
Loading…
Reference in New Issue