am e0e5c1cf: Merge "Clean up AbsListView constructor" into mnc-dev
* commit 'e0e5c1cf1965302fcf177eaade372313504ea53a': Clean up AbsListView constructor
This commit is contained in:
@@ -820,44 +820,36 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
|||||||
mOwnerThread = Thread.currentThread();
|
mOwnerThread = Thread.currentThread();
|
||||||
|
|
||||||
final TypedArray a = context.obtainStyledAttributes(
|
final TypedArray a = context.obtainStyledAttributes(
|
||||||
attrs, com.android.internal.R.styleable.AbsListView, defStyleAttr, defStyleRes);
|
attrs, R.styleable.AbsListView, defStyleAttr, defStyleRes);
|
||||||
|
|
||||||
Drawable d = a.getDrawable(com.android.internal.R.styleable.AbsListView_listSelector);
|
final Drawable selector = a.getDrawable(R.styleable.AbsListView_listSelector);
|
||||||
if (d != null) {
|
if (selector != null) {
|
||||||
setSelector(d);
|
setSelector(selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDrawSelectorOnTop = a.getBoolean(
|
mDrawSelectorOnTop = a.getBoolean(R.styleable.AbsListView_drawSelectorOnTop, false);
|
||||||
com.android.internal.R.styleable.AbsListView_drawSelectorOnTop, false);
|
|
||||||
|
|
||||||
boolean stackFromBottom = a.getBoolean(R.styleable.AbsListView_stackFromBottom, false);
|
setStackFromBottom(a.getBoolean(
|
||||||
setStackFromBottom(stackFromBottom);
|
R.styleable.AbsListView_stackFromBottom, false));
|
||||||
|
setScrollingCacheEnabled(a.getBoolean(
|
||||||
|
R.styleable.AbsListView_scrollingCache, true));
|
||||||
|
setTextFilterEnabled(a.getBoolean(
|
||||||
|
R.styleable.AbsListView_textFilterEnabled, false));
|
||||||
|
setTranscriptMode(a.getInt(
|
||||||
|
R.styleable.AbsListView_transcriptMode, TRANSCRIPT_MODE_DISABLED));
|
||||||
|
setCacheColorHint(a.getColor(
|
||||||
|
R.styleable.AbsListView_cacheColorHint, 0));
|
||||||
|
setSmoothScrollbarEnabled(a.getBoolean(
|
||||||
|
R.styleable.AbsListView_smoothScrollbar, true));
|
||||||
|
setChoiceMode(a.getInt(
|
||||||
|
R.styleable.AbsListView_choiceMode, CHOICE_MODE_NONE));
|
||||||
|
|
||||||
boolean scrollingCacheEnabled = a.getBoolean(R.styleable.AbsListView_scrollingCache, true);
|
setFastScrollEnabled(a.getBoolean(
|
||||||
setScrollingCacheEnabled(scrollingCacheEnabled);
|
R.styleable.AbsListView_fastScrollEnabled, false));
|
||||||
|
setFastScrollStyle(a.getResourceId(
|
||||||
boolean useTextFilter = a.getBoolean(R.styleable.AbsListView_textFilterEnabled, false);
|
R.styleable.AbsListView_fastScrollStyle, 0));
|
||||||
setTextFilterEnabled(useTextFilter);
|
setFastScrollAlwaysVisible(a.getBoolean(
|
||||||
|
R.styleable.AbsListView_fastScrollAlwaysVisible, false));
|
||||||
int transcriptMode = a.getInt(R.styleable.AbsListView_transcriptMode,
|
|
||||||
TRANSCRIPT_MODE_DISABLED);
|
|
||||||
setTranscriptMode(transcriptMode);
|
|
||||||
|
|
||||||
int color = a.getColor(R.styleable.AbsListView_cacheColorHint, 0);
|
|
||||||
setCacheColorHint(color);
|
|
||||||
|
|
||||||
boolean enableFastScroll = a.getBoolean(R.styleable.AbsListView_fastScrollEnabled, false);
|
|
||||||
setFastScrollEnabled(enableFastScroll);
|
|
||||||
|
|
||||||
int fastScrollStyle = a.getResourceId(R.styleable.AbsListView_fastScrollStyle, 0);
|
|
||||||
setFastScrollStyle(fastScrollStyle);
|
|
||||||
|
|
||||||
boolean smoothScrollbar = a.getBoolean(R.styleable.AbsListView_smoothScrollbar, true);
|
|
||||||
setSmoothScrollbarEnabled(smoothScrollbar);
|
|
||||||
|
|
||||||
setChoiceMode(a.getInt(R.styleable.AbsListView_choiceMode, CHOICE_MODE_NONE));
|
|
||||||
setFastScrollAlwaysVisible(
|
|
||||||
a.getBoolean(R.styleable.AbsListView_fastScrollAlwaysVisible, false));
|
|
||||||
|
|
||||||
a.recycle();
|
a.recycle();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user