implement some APIs needed for OctoDroid

This commit is contained in:
Julian Winkler
2024-03-29 23:56:28 +01:00
parent 0352a307b9
commit 2f4cd3917f
36 changed files with 329 additions and 25 deletions

View File

@@ -0,0 +1,3 @@
package android.widget;
public interface FilterQueryProvider {}

View File

@@ -0,0 +1,3 @@
package android.widget;
public interface Filterable {}

View File

@@ -15,4 +15,6 @@ public class HorizontalScrollView extends FrameLayout {
public void setHorizontalScrollBarEnabled(boolean enabled) {}
public void smoothScrollTo(int x, int y) {}
}

View File

@@ -153,4 +153,6 @@ public class ImageView extends View {
public void setMaxWidth(int width) {}
public void setMaxHeight(int height) {}
public void setImageState(int[] state, boolean merge) {}
}

View File

@@ -280,6 +280,30 @@ public class PopupMenu {
submenu.item.setVisible(true);
return submenu;
}
@Override
public void setGroupVisible(int group, boolean visible) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setGroupVisible'");
}
@Override
public void removeItem(int id) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'removeItem'");
}
@Override
public int size() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'size'");
}
@Override
public boolean hasVisibleItems() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'hasVisibleItems'");
}
}
private class SubMenuImpl extends MenuImpl implements SubMenu {
@@ -423,6 +447,30 @@ public class PopupMenu {
public SubMenu getSubMenu() {
return subMenu;
}
@Override
public MenuItem setActionView(int resId) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setActionView'");
}
@Override
public View getActionView() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getActionView'");
}
@Override
public boolean hasSubMenu() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'hasSubMenu'");
}
@Override
public MenuItem setOnActionExpandListener(OnActionExpandListener listener) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setOnActionExpandListener'");
}
}
}

View File

@@ -11,6 +11,7 @@ public class ProgressBar extends View {
protected int max = 100;
protected int progress = 0;
private Drawable indeterminateDrawable;
public ProgressBar(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
@@ -45,13 +46,7 @@ public class ProgressBar extends View {
}
public Drawable getIndeterminateDrawable() {
return new Drawable() {
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
};
return indeterminateDrawable;
}
public void setMax(int max) {
@@ -73,4 +68,8 @@ public class ProgressBar extends View {
public int getProgress() {
return progress;
}
public void setIndeterminateDrawable(Drawable indeterminateDrawable) {
this.indeterminateDrawable = indeterminateDrawable;
}
}

View File

@@ -233,4 +233,10 @@ public class TextView extends View {
public void setCompoundDrawablesRelativeWithIntrinsicBounds(int start, int top, int end, int bottom) {}
public boolean getLinksClickable() {return true;}
public boolean isTextSelectable() {return true;}
public void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) {}
public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom) {}
}