|
1 | 1 | package org.joinmastodon.android.ui.displayitems;
|
2 | 2 |
|
| 3 | +import static org.joinmastodon.android.MastodonApp.context; |
| 4 | + |
3 | 5 | import android.app.Activity;
|
4 | 6 | import android.graphics.drawable.Drawable;
|
5 | 7 | import android.os.Build;
|
6 | 8 | import android.text.SpannableStringBuilder;
|
| 9 | +import android.util.TypedValue; |
7 | 10 | import android.view.View;
|
8 | 11 | import android.view.ViewGroup;
|
9 | 12 | import android.widget.TextView;
|
@@ -38,6 +41,8 @@ public ReblogOrReplyLineStatusDisplayItem(String parentID, BaseStatusListFragmen
|
38 | 41 | emojiHelper.setText(ssb);
|
39 | 42 | this.icon=icon;
|
40 | 43 | this.handleClick=handleClick;
|
| 44 | + TypedValue outValue = new TypedValue(); |
| 45 | + context.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true); |
41 | 46 | }
|
42 | 47 |
|
43 | 48 | @Override
|
@@ -67,6 +72,8 @@ public void onBind(ReblogOrReplyLineStatusDisplayItem item){
|
67 | 72 | text.setText(item.text);
|
68 | 73 | text.setCompoundDrawablesRelativeWithIntrinsicBounds(item.icon, 0, 0, 0);
|
69 | 74 | if(item.handleClick!=null) text.setOnClickListener(item.handleClick);
|
| 75 | + text.setEnabled(!item.inset); |
| 76 | + text.setClickable(!item.inset); |
70 | 77 | if(Build.VERSION.SDK_INT<Build.VERSION_CODES.N)
|
71 | 78 | UiUtils.fixCompoundDrawableTintOnAndroid6(text);
|
72 | 79 | }
|
|
0 commit comments