You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
AdapterView: implement setAdapter / getAdapter() properly
This commit is contained in:
@@ -17,12 +17,16 @@ public abstract class AbsListView extends AdapterView {
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
protected native void native_setAdapter(long widget, ListAdapter adapter);
|
||||
|
||||
public void setChoiceMode(int choiceMode) {}
|
||||
|
||||
public void setOnScrollListener(OnScrollListener onScrollListener) {}
|
||||
|
||||
public native void setAdapter(ListAdapter adapter);
|
||||
public void setAdapter(ListAdapter adapter) {
|
||||
super.setAdapter(adapter);
|
||||
native_setAdapter(this.widget, adapter);
|
||||
}
|
||||
|
||||
public native void setItemChecked(int position, boolean value);
|
||||
|
||||
@@ -37,6 +41,10 @@ public abstract class AbsListView extends AdapterView {
|
||||
|
||||
public int getListPaddingBottom() {return 0;}
|
||||
|
||||
public ListAdapter getAdapter() {
|
||||
return (ListAdapter) super.getAdapter();
|
||||
}
|
||||
|
||||
public int pointToPosition(int x, int y) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user