mirror of https://github.com/M66B/FairEmail.git
Cards everywhere
This commit is contained in:
parent
9f55d108f8
commit
d81b6fe8ac
|
@ -37,14 +37,12 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleObserver;
|
||||
|
@ -75,12 +73,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
private LifecycleOwner owner;
|
||||
private LayoutInflater inflater;
|
||||
|
||||
private boolean cards;
|
||||
private boolean circular;
|
||||
private boolean subscriptions;
|
||||
private boolean debug;
|
||||
|
||||
private int dp3;
|
||||
private int dp12;
|
||||
private float textSize;
|
||||
private int colorUnread;
|
||||
|
@ -93,10 +88,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
private NumberFormat NF = NumberFormat.getNumberInstance();
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
private CardView card;
|
||||
private View view;
|
||||
private CardView vwColor;
|
||||
|
||||
private View vwColor;
|
||||
private ImageView ivState;
|
||||
private ImageView ivReadOnly;
|
||||
|
||||
|
@ -125,10 +119,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
card = itemView.findViewById(R.id.card);
|
||||
view = itemView.findViewById(R.id.clItem);
|
||||
vwColor = itemView.findViewById(R.id.vwColor);
|
||||
|
||||
vwColor = itemView.findViewById(R.id.vwColor);
|
||||
ivState = itemView.findViewById(R.id.ivState);
|
||||
ivReadOnly = itemView.findViewById(R.id.ivReadOnly);
|
||||
|
||||
|
@ -151,22 +144,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
|
||||
tvKeywords = itemView.findViewById(R.id.tvKeywords);
|
||||
tvError = itemView.findViewById(R.id.tvError);
|
||||
|
||||
if (listener == null) {
|
||||
if (!cards) {
|
||||
FrameLayout.LayoutParams lparam = (FrameLayout.LayoutParams) card.getLayoutParams();
|
||||
lparam.setMargins(0, 0, 0, 0);
|
||||
card.setLayoutParams(lparam);
|
||||
|
||||
card.setRadius(0);
|
||||
card.setElevation(0);
|
||||
card.setCardBackgroundColor(Color.TRANSPARENT);
|
||||
|
||||
view.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
vwColor.setRadius(circular ? dp3 / 2f : 0f);
|
||||
}
|
||||
}
|
||||
|
||||
private void wire() {
|
||||
|
@ -683,12 +660,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
if (zoom == 0)
|
||||
zoom = 1;
|
||||
|
||||
this.circular = prefs.getBoolean("circular", true);
|
||||
this.cards = prefs.getBoolean("cards", true);
|
||||
this.subscriptions = prefs.getBoolean("subscriptions", false);
|
||||
this.debug = prefs.getBoolean("debug", false);
|
||||
|
||||
this.dp3 = Helper.dp2pixels(context, 12);
|
||||
this.dp12 = Helper.dp2pixels(context, 12);
|
||||
this.textSize = Helper.getTextSize(context, zoom);
|
||||
this.colorUnread = Helper.resolveColor(context, R.attr.colorUnread);
|
||||
|
|
|
@ -79,7 +79,6 @@ import android.widget.Button;
|
|||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
@ -89,7 +88,6 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
@ -167,7 +165,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private LayoutInflater inflater;
|
||||
private boolean suitable;
|
||||
|
||||
private int dp3;
|
||||
private int dp36;
|
||||
private int colorPrimary;
|
||||
private int colorAccent;
|
||||
|
@ -180,10 +177,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private boolean contacts;
|
||||
private float textSize;
|
||||
|
||||
private boolean cards;
|
||||
private boolean date;
|
||||
private boolean threading;
|
||||
private boolean circular;
|
||||
private boolean name_email;
|
||||
private boolean subject_italic;
|
||||
private boolean flags;
|
||||
|
@ -232,11 +227,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
public class ViewHolder extends RecyclerView.ViewHolder implements
|
||||
View.OnClickListener, View.OnLongClickListener, View.OnKeyListener,
|
||||
BottomNavigationView.OnNavigationItemSelectedListener {
|
||||
private CardView card;
|
||||
private View view;
|
||||
private View vwRipple;
|
||||
|
||||
private CardView vwColor;
|
||||
private View vwColor;
|
||||
private ImageView ivExpander;
|
||||
private ImageView ivFlagged;
|
||||
private ImageView ivAvatar;
|
||||
|
@ -335,7 +329,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ViewHolder(final View itemView) {
|
||||
super(itemView);
|
||||
|
||||
card = itemView.findViewById(R.id.card);
|
||||
view = itemView.findViewById(R.id.clItem);
|
||||
vwRipple = itemView.findViewById(R.id.vwRipple);
|
||||
|
||||
|
@ -361,20 +354,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ivThread = itemView.findViewById(R.id.ivThread);
|
||||
tvError = itemView.findViewById(R.id.tvError);
|
||||
pbLoading = itemView.findViewById(R.id.pbLoading);
|
||||
|
||||
if (!cards) {
|
||||
FrameLayout.LayoutParams lparam = (FrameLayout.LayoutParams) card.getLayoutParams();
|
||||
lparam.setMargins(0, 0, 0, 0);
|
||||
card.setLayoutParams(lparam);
|
||||
|
||||
card.setRadius(0);
|
||||
card.setElevation(0);
|
||||
card.setCardBackgroundColor(Color.TRANSPARENT);
|
||||
|
||||
view.setPadding(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
vwColor.setRadius(circular ? dp3 / 2f : 0f);
|
||||
}
|
||||
|
||||
private void ensureExpanded() {
|
||||
|
@ -668,7 +647,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
tvTime.setTextColor(colorUnseen);
|
||||
|
||||
// Account color
|
||||
vwColor.setCardBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
||||
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
||||
vwColor.setVisibility(ActivityBilling.isPro(context) ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
// Expander
|
||||
|
@ -2993,7 +2972,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.TF = Helper.getTimeInstance(context, SimpleDateFormat.SHORT);
|
||||
this.DTF = Helper.getDateTimeInstance(context, SimpleDateFormat.LONG, SimpleDateFormat.LONG);
|
||||
|
||||
this.dp3 = Helper.dp2pixels(context, 3);
|
||||
this.dp36 = Helper.dp2pixels(context, 36);
|
||||
this.colorPrimary = Helper.resolveColor(context, R.attr.colorPrimary);
|
||||
this.colorAccent = Helper.resolveColor(context, R.attr.colorAccent);
|
||||
|
@ -3007,10 +2985,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
this.textSize = Helper.getTextSize(context, zoom);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
this.cards = prefs.getBoolean("cards", true);
|
||||
this.date = prefs.getBoolean("date", true);
|
||||
this.threading = prefs.getBoolean("threading", true);
|
||||
this.circular = prefs.getBoolean("circular", true);
|
||||
this.name_email = prefs.getBoolean("name_email", !compact);
|
||||
this.subject_italic = prefs.getBoolean("subject_italic", true);
|
||||
this.flags = prefs.getBoolean("flags", true);
|
||||
|
|
|
@ -23,6 +23,7 @@ import android.animation.ObjectAnimator;
|
|||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -37,6 +38,7 @@ import androidx.constraintlayout.widget.Group;
|
|||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -48,6 +50,9 @@ import java.util.List;
|
|||
|
||||
public class FragmentAccounts extends FragmentBase {
|
||||
private boolean settings;
|
||||
|
||||
private boolean cards;
|
||||
|
||||
private RecyclerView rvAccount;
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
private Group grpReady;
|
||||
|
@ -61,8 +66,12 @@ public class FragmentAccounts extends FragmentBase {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Bundle args = getArguments();
|
||||
settings = (args == null || args.getBoolean("settings", true));
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
cards = prefs.getBoolean("cards", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,9 +95,11 @@ public class FragmentAccounts extends FragmentBase {
|
|||
LinearLayoutManager llm = new LinearLayoutManager(getContext());
|
||||
rvAccount.setLayoutManager(llm);
|
||||
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvAccount.addItemDecoration(itemDecorator);
|
||||
if (!cards) {
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvAccount.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
adapter = new AdapterAccount(this, settings);
|
||||
rvAccount.setAdapter(adapter);
|
||||
|
|
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
|||
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -29,6 +30,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -39,6 +41,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class FragmentAnswers extends FragmentBase {
|
||||
private boolean cards;
|
||||
|
||||
private RecyclerView rvAnswer;
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
private Group grpReady;
|
||||
|
@ -46,6 +50,14 @@ public class FragmentAnswers extends FragmentBase {
|
|||
|
||||
private AdapterAnswer adapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
cards = prefs.getBoolean("cards", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
@ -66,9 +78,11 @@ public class FragmentAnswers extends FragmentBase {
|
|||
LinearLayoutManager llm = new LinearLayoutManager(getContext());
|
||||
rvAnswer.setLayoutManager(llm);
|
||||
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvAnswer.addItemDecoration(itemDecorator);
|
||||
if (!cards) {
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvAnswer.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
adapter = new AdapterAnswer(this);
|
||||
rvAnswer.setAdapter(adapter);
|
||||
|
|
|
@ -21,6 +21,7 @@ package eu.faircode.email;
|
|||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -31,6 +32,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -41,6 +43,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class FragmentIdentities extends FragmentBase {
|
||||
private boolean cards;
|
||||
|
||||
private RecyclerView rvIdentity;
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
private Group grpReady;
|
||||
|
@ -49,6 +53,14 @@ public class FragmentIdentities extends FragmentBase {
|
|||
|
||||
private AdapterIdentity adapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
cards = prefs.getBoolean("cards", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
@ -68,9 +80,11 @@ public class FragmentIdentities extends FragmentBase {
|
|||
LinearLayoutManager llm = new LinearLayoutManager(getContext());
|
||||
rvIdentity.setLayoutManager(llm);
|
||||
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvIdentity.addItemDecoration(itemDecorator);
|
||||
if (!cards) {
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvIdentity.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
adapter = new AdapterIdentity(this);
|
||||
rvIdentity.setAdapter(adapter);
|
||||
|
|
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
|||
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -29,6 +30,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -39,6 +41,11 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class FragmentRules extends FragmentBase {
|
||||
private long account;
|
||||
private long folder;
|
||||
|
||||
private boolean cards;
|
||||
|
||||
private RecyclerView rvRule;
|
||||
private ContentLoadingProgressBar pbWait;
|
||||
private Group grpReady;
|
||||
|
@ -46,9 +53,6 @@ public class FragmentRules extends FragmentBase {
|
|||
|
||||
private AdapterRule adapter;
|
||||
|
||||
private long account;
|
||||
private long folder;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -57,6 +61,9 @@ public class FragmentRules extends FragmentBase {
|
|||
Bundle args = getArguments();
|
||||
account = args.getLong("account", -1);
|
||||
folder = args.getLong("folder", -1);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
cards = prefs.getBoolean("cards", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -81,9 +88,11 @@ public class FragmentRules extends FragmentBase {
|
|||
adapter = new AdapterRule(this);
|
||||
rvRule.setAdapter(adapter);
|
||||
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvRule.addItemDecoration(itemDecorator);
|
||||
if (!cards) {
|
||||
DividerItemDecoration itemDecorator = new DividerItemDecoration(getContext(), llm.getOrientation());
|
||||
itemDecorator.setDrawable(getContext().getDrawable(R.drawable.divider));
|
||||
rvRule.addItemDecoration(itemDecorator);
|
||||
}
|
||||
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
/*
|
||||
This file is part of FairEmail.
|
||||
|
||||
FairEmail is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FairEmail is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
public class ViewCardOptional extends CardView {
|
||||
public ViewCardOptional(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ViewCardOptional(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ViewCardOptional(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean cards = prefs.getBoolean("cards", true);
|
||||
if (cards) {
|
||||
int dp6 = Helper.dp2pixels(getContext(), 6);
|
||||
int color = Helper.resolveColor(getContext(), R.attr.colorCardBackground);
|
||||
|
||||
FrameLayout.LayoutParams lparam = (FrameLayout.LayoutParams) getLayoutParams();
|
||||
lparam.setMargins(dp6, dp6, dp6, dp6);
|
||||
setLayoutParams(lparam);
|
||||
|
||||
setRadius(dp6);
|
||||
setElevation(dp6);
|
||||
setCardBackgroundColor(color);
|
||||
|
||||
getChildAt(0).setPadding(dp6, dp6, dp6, dp6);
|
||||
} else {
|
||||
setRadius(0);
|
||||
setElevation(0);
|
||||
setCardBackgroundColor(Color.TRANSPARENT);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
public class ViewStripe extends CardView {
|
||||
public ViewStripe(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public ViewStripe(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public ViewStripe(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean circular = prefs.getBoolean("circular", true);
|
||||
setRadius(circular ? Helper.dp2pixels(getContext(), 3) / 2f : 0f);
|
||||
setElevation(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackgroundColor(int color) {
|
||||
setCardBackgroundColor(color);
|
||||
}
|
||||
}
|
|
@ -4,13 +4,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardBackgroundColor="?attr/colorAccent"
|
||||
app:cardCornerRadius="1.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardBackgroundColor="?attr/colorAccent"
|
||||
app:cardCornerRadius="1.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -4,213 +4,218 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginTop"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivState"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_connection_state"
|
||||
android:src="@drawable/baseline_cloud_off_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_primary"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNotify"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_notify"
|
||||
android:src="@drawable/baseline_notifications_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="24dp"
|
||||
android:singleLine="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@id/ivNotify"
|
||||
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSync"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_sync_state"
|
||||
android:src="@drawable/baseline_sync_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUser"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="user"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
<View
|
||||
android:id="@+id/marginTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHost"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="host"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUser" />
|
||||
<ImageView
|
||||
android:id="@+id/ivState"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_connection_state"
|
||||
android:src="@drawable/baseline_cloud_off_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLast"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="start"
|
||||
android:singleLine="true"
|
||||
android:text="Last connected time"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHost" />
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_primary"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_authorization_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLast" />
|
||||
<ImageView
|
||||
android:id="@+id/ivNotify"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_notify"
|
||||
android:src="@drawable/baseline_notifications_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_identity_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAuthorize" />
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="24dp"
|
||||
android:singleLine="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@id/ivNotify"
|
||||
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDrafts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_drafts_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIdentity" />
|
||||
<ImageView
|
||||
android:id="@+id/ivSync"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_sync_state"
|
||||
android:src="@drawable/baseline_sync_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWarning"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="warning"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDrafts" />
|
||||
<TextView
|
||||
android:id="@+id/tvUser"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="user"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvError"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="error"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvWarning" />
|
||||
<TextView
|
||||
android:id="@+id/tvHost"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="host"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUser" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginBottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||
<TextView
|
||||
android:id="@+id/tvLast"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="start"
|
||||
android:singleLine="true"
|
||||
android:text="Last connected time"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHost" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="ivSync,tvHost" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_authorization_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLast" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIdentity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_identity_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAuthorize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDrafts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_drafts_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvIdentity" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWarning"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="warning"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDrafts" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvError"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="error"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvWarning" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginBottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="ivSync,tvHost" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
|
@ -4,24 +4,29 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:padding="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:padding="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
|
@ -4,30 +4,23 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:cardBackgroundColor="?attr/colorCardBackground"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:padding="6dp">
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardBackgroundColor="?attr/colorAccent"
|
||||
app:cardCornerRadius="1.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -257,5 +250,5 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
|
@ -4,28 +4,20 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:cardBackgroundColor="?attr/colorCardBackground"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardBackgroundColor="?attr/colorAccent"
|
||||
app:cardCornerRadius="1.5dp"
|
||||
app:cardElevation="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/paddingBottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -89,5 +81,5 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
|
@ -4,167 +4,172 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginTop"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivState"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_connection_state"
|
||||
android:src="@drawable/baseline_cloud_off_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_primary"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="24dp"
|
||||
android:singleLine="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSync"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_sync_state"
|
||||
android:src="@drawable/baseline_sync_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/colorAccent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUser"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="user"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
<View
|
||||
android:id="@+id/marginTop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHost"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="host"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvAccount"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUser" />
|
||||
<ImageView
|
||||
android:id="@+id/ivState"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_connection_state"
|
||||
android:src="@drawable/baseline_cloud_off_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAccount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="account"
|
||||
android:textAlignment="textEnd"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tvHost"
|
||||
app:layout_constraintTop_toTopOf="@id/tvHost" />
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:contentDescription="@string/title_legend_primary"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLast"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="start"
|
||||
android:singleLine="true"
|
||||
android:text="Last connected time"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHost" />
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="24dp"
|
||||
android:singleLine="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_authorization_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLast" />
|
||||
<ImageView
|
||||
android:id="@+id/ivSync"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/title_legend_sync_state"
|
||||
android:src="@drawable/baseline_sync_24"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvError"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="error"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAuthorize" />
|
||||
<TextView
|
||||
android:id="@+id/tvUser"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="user"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginBottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvHost"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="host"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvAccount"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvUser" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAccount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="account"
|
||||
android:textAlignment="textEnd"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tvHost"
|
||||
app:layout_constraintTop_toTopOf="@id/tvHost" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLast"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="start"
|
||||
android:singleLine="true"
|
||||
android:text="Last connected time"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivState"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvHost" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAuthorize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="@string/title_authorization_required"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLast" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvError"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="error"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textIsSelectable="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/vwColor"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAuthorize" />
|
||||
|
||||
<View
|
||||
android:id="@+id/marginBottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvError" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:cardBackgroundColor="?attr/colorCardBackground"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
|
@ -20,8 +15,7 @@
|
|||
android:background="?attr/activatableItemBackground"
|
||||
android:descendantFocusability="beforeDescendants"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:padding="6dp">
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<include
|
||||
android:id="@+id/inHeader"
|
||||
|
@ -49,5 +43,5 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/inHeader" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:cardBackgroundColor="?attr/colorCardBackground"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
|
@ -20,8 +15,7 @@
|
|||
android:background="?attr/activatableItemBackground"
|
||||
android:descendantFocusability="beforeDescendants"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:padding="6dp">
|
||||
android:focusableInTouchMode="true">
|
||||
|
||||
<include
|
||||
android:id="@+id/inHeader"
|
||||
|
@ -49,5 +43,5 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/inHeader" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
||||
|
|
|
@ -4,66 +4,70 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
<eu.faircode.email.ViewCardOptional
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:padding="6dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivStop"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvOrder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivStop" />
|
||||
android:background="?attr/activatableItemBackground"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:padding="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOrder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="Order"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivStop"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivStop"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivStop" />
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="Name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivStop"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvOrder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivStop" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivStop"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/title_legend_stop"
|
||||
android:src="@drawable/baseline_stop_24"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/tvOrder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text="Order"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivStop"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivStop"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivStop" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCondition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Condition"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
<ImageView
|
||||
android:id="@+id/ivStop"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/title_legend_stop"
|
||||
android:src="@drawable/baseline_stop_24"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Action"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCondition" />
|
||||
<TextView
|
||||
android:id="@+id/tvCondition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Condition"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvName" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Action"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvCondition" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ViewCardOptional>
|
||||
</FrameLayout>
|
Loading…
Reference in New Issue