summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-24 23:53:08 +0100
committercyBerta <cyberta@riseup.net>2021-11-24 23:53:56 +0100
commitf78eeced2a24d869e514330467395b0471fb2adc (patch)
tree363035e7dbbd08aba5c14529175c324bec256013 /app/src/main/java/se/leap
parent68ca9c827da3c3fad9e70c74960f113560fd6711 (diff)
improve settings list entry layouts
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/IconSwitchEntry.java3
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/views/IconTextEntry.java6
2 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/IconSwitchEntry.java b/app/src/main/java/se/leap/bitmaskclient/base/views/IconSwitchEntry.java
index a499cdd1..79563bcf 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/IconSwitchEntry.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/IconSwitchEntry.java
@@ -92,6 +92,9 @@ public class IconSwitchEntry extends LinearLayout {
iconView.setImageDrawable(drawable);
}
+ boolean singleLine = typedArray.getBoolean(R.styleable.IconTextEntry_singleLine, true);
+ subtitleView.setSingleLine(singleLine);
+
typedArray.recycle();
}
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/views/IconTextEntry.java b/app/src/main/java/se/leap/bitmaskclient/base/views/IconTextEntry.java
index 2d9525ed..7aefd089 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/views/IconTextEntry.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/views/IconTextEntry.java
@@ -14,6 +14,7 @@ import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
+import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import se.leap.bitmaskclient.R;
@@ -22,7 +23,7 @@ import se.leap.bitmaskclient.R;
public class IconTextEntry extends LinearLayout {
private AppCompatTextView textView;
- private ImageView iconView;
+ private AppCompatImageView iconView;
private AppCompatTextView subtitleView;
public IconTextEntry(Context context) {
@@ -73,6 +74,9 @@ public class IconTextEntry extends LinearLayout {
iconView.setImageDrawable(drawable);
}
+ boolean singleLine = typedArray.getBoolean(R.styleable.IconTextEntry_singleLine, true);
+ subtitleView.setSingleLine(singleLine);
+
typedArray.recycle();
}