Indentation depends on cards

This commit is contained in:
M66B
2019-10-20 09:16:45 +02:00
parent 421538abaf
commit 899ee65e7a
4 changed files with 29 additions and 27 deletions

View File

@@ -32,9 +32,9 @@ import androidx.preference.PreferenceManager;
public class ViewCardOptional extends CardView {
private boolean cards;
private boolean indentation;
private boolean compact;
private boolean threading;
private boolean indentation;
private int margin;
private int ident;
private Integer color = null;
@@ -57,9 +57,9 @@ public class ViewCardOptional extends CardView {
private void init(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
cards = prefs.getBoolean("cards", true);
indentation = prefs.getBoolean("indentation", false);
compact = prefs.getBoolean("compact", false);
threading = prefs.getBoolean("threading", true);
indentation = prefs.getBoolean("indentation", false);
margin = Helper.dp2pixels(context, compact ? 3 : 6);
ident = Helper.dp2pixels(context, 12 + (compact ? 3 : 6));