37
37
public class SnooView extends LinearLayout {
38
38
private static final String TAG = SnooView .class .getSimpleName ();
39
39
private static final LayoutParams HR_PARAMS ;
40
- private static final LayoutParams TEXT_PARAMS_MIDDLE ;
41
- private static final LayoutParams TEXT_PARAMS_TOP ;
42
- private static final LayoutParams TEXT_PARAMS_BOTTOM ;
43
40
44
41
static {
45
42
HR_PARAMS = new LayoutParams (ViewGroup .LayoutParams .MATCH_PARENT , 4 /*px*/ );
46
43
HR_PARAMS .setMargins (0 , 32 , 0 , 32 );
47
-
48
- TEXT_PARAMS_TOP = new LayoutParams (ViewGroup .LayoutParams .MATCH_PARENT ,
49
- ViewGroup .LayoutParams .WRAP_CONTENT );
50
- TEXT_PARAMS_TOP .setMargins (0 , 0 , 0 , 32 );
51
-
52
- TEXT_PARAMS_BOTTOM = new LayoutParams (ViewGroup .LayoutParams .MATCH_PARENT ,
53
- ViewGroup .LayoutParams .WRAP_CONTENT );
54
- TEXT_PARAMS_BOTTOM .setMargins (0 , 32 , 0 , 0 );
55
-
56
- TEXT_PARAMS_MIDDLE = new LayoutParams (ViewGroup .LayoutParams .MATCH_PARENT ,
57
- ViewGroup .LayoutParams .WRAP_CONTENT );
58
- TEXT_PARAMS_MIDDLE .setMargins (0 , 32 , 0 , 32 );
59
44
}
60
45
61
46
private OnUrlClickListener urlClickListener = null ;
@@ -116,6 +101,7 @@ public void setBlocks(List<RedditBlock> blocks) {
116
101
TextView codeView = new TextView (context );
117
102
codeView .setText (((CodeBlock ) block ).getText ());
118
103
codeScrollView .addView (codeView );
104
+ codeScrollView .setScrollbarFadingEnabled (false );
119
105
addView (codeScrollView );
120
106
break ;
121
107
case TABLE :
@@ -125,6 +111,7 @@ public void setBlocks(List<RedditBlock> blocks) {
125
111
formatTable (tableBlock .getHeaderRow (), tableBlock .getBodyRows (),
126
112
context );
127
113
tableScrollView .addView (tableLayout );
114
+ tableScrollView .setScrollbarFadingEnabled (false );
128
115
addView (tableScrollView );
129
116
break ;
130
117
}
@@ -191,7 +178,7 @@ private void handleUrlClick(String url) {
191
178
try {
192
179
context .startActivity (intent );
193
180
} catch (ActivityNotFoundException e ) {
194
- Log .w ("ClickableSpan" , "Activity was not found for intent, " + intent .toString ());
181
+ Log .e ("ClickableSpan" , "Activity was not found for intent, " + intent .toString ());
195
182
}
196
183
}
197
184
}
0 commit comments