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
implement ListView using GtkListView
There is not much difference between GTKs ListView and Androids ListView. So, we use GTKs implementation instead of copying from AOSP
This commit is contained in:
@@ -13,13 +13,24 @@ public abstract class AbsListView extends AdapterView {
|
||||
super(context, attributeSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
|
||||
public void setChoiceMode(int choiceMode) {}
|
||||
|
||||
public void setOnScrollListener(OnScrollListener onScrollListener) {}
|
||||
|
||||
public void setAdapter(ListAdapter adapter) {}
|
||||
public native void setAdapter(ListAdapter adapter);
|
||||
|
||||
public void setItemChecked(int position, boolean value) {}
|
||||
public native void setItemChecked(int position, boolean value);
|
||||
|
||||
@Override
|
||||
public native void setOnItemSelectedListener(OnItemSelectedListener listener);
|
||||
|
||||
@Override
|
||||
public native void setOnItemClickListener(OnItemClickListener listener);
|
||||
|
||||
public native int getCheckedItemPosition();
|
||||
|
||||
public interface OnScrollListener {}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package android.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public abstract class AdapterView extends ViewGroup {
|
||||
@@ -18,6 +19,7 @@ public abstract class AdapterView extends ViewGroup {
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
public void onItemClick(AdapterView parent, View view, int position, long id);
|
||||
}
|
||||
|
||||
public void setAdapter(SpinnerAdapter adapter) {
|
||||
|
||||
Reference in New Issue
Block a user