summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java b/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java
index 5689f429..0e86f506 100644
--- a/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java
+++ b/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java
@@ -21,6 +21,7 @@ public class IconTextEntry extends LinearLayout {
private TextView textView;
private ImageView iconView;
+ private TextView subtitleView;
public IconTextEntry(Context context) {
super(context);
@@ -48,6 +49,7 @@ public class IconTextEntry extends LinearLayout {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rootview = inflater.inflate(R.layout.v_icon_text_list_item, this, true);
textView = rootview.findViewById(android.R.id.text1);
+ subtitleView = rootview.findViewById(R.id.subtitle);
iconView = rootview.findViewById(R.id.material_icon);
if (attrs != null) {
@@ -58,6 +60,12 @@ public class IconTextEntry extends LinearLayout {
textView.setText(entryText);
}
+ String subtitle = typedArray.getString(R.styleable.IconTextEntry_subtitle);
+ if (subtitle != null) {
+ subtitleView.setText(subtitle);
+ subtitleView.setVisibility(VISIBLE);
+ }
+
Drawable drawable = typedArray.getDrawable(R.styleable.IconTextEntry_icon);
if (drawable != null) {
iconView.setImageDrawable(drawable);