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
add some stubs needed since we now handle onMeasure() for more Views
This commit is contained in:
@@ -215,6 +215,14 @@ JNIEXPORT jlong JNICALL Java_android_widget_LinearLayout_native_1constructor
|
||||
JNIEXPORT void JNICALL Java_android_widget_LinearLayout_setOrientation
|
||||
(JNIEnv *, jobject, jint);
|
||||
|
||||
/*
|
||||
* Class: android_widget_LinearLayout
|
||||
* Method: getOrientation
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_android_widget_LinearLayout_getOrientation
|
||||
(JNIEnv *, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -45,3 +45,8 @@ JNIEXPORT void JNICALL Java_android_widget_LinearLayout_setOrientation(JNIEnv *e
|
||||
{
|
||||
gtk_orientable_set_orientation(GTK_ORIENTABLE(_PTR(_GET_LONG_FIELD(this, "widget"))), orientation ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_android_widget_LinearLayout_getOrientation(JNIEnv *env, jobject this)
|
||||
{
|
||||
return gtk_orientable_get_orientation(GTK_ORIENTABLE(_PTR(_GET_LONG_FIELD(this, "widget"))));
|
||||
}
|
||||
|
||||
@@ -87,4 +87,6 @@ public abstract class Drawable {
|
||||
}
|
||||
|
||||
public void setTintMode(PorterDuff.Mode tintMode) {}
|
||||
|
||||
public boolean isProjected () {return false;}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,6 @@ public class Layout {
|
||||
ALIGN_LEFT,
|
||||
ALIGN_RIGHT,
|
||||
}
|
||||
|
||||
public int getLineCount() {return 1;}
|
||||
}
|
||||
|
||||
@@ -1573,4 +1573,6 @@ public class View extends Object {
|
||||
protected int computeVerticalScrollExtent() {
|
||||
return getHeight();
|
||||
}
|
||||
|
||||
public void setAccessibilityLiveRegion(int mode) {}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ import android.view.ViewGroup;
|
||||
|
||||
public class LinearLayout extends ViewGroup {
|
||||
|
||||
boolean orientation;
|
||||
|
||||
public LinearLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
@@ -20,6 +18,7 @@ public class LinearLayout extends ViewGroup {
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
|
||||
public native void setOrientation(int orientation);
|
||||
public native int getOrientation();
|
||||
public void setWeightSum(float weightSum) {}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.Layout;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
@@ -193,4 +194,8 @@ public class TextView extends View {
|
||||
NORMAL,
|
||||
SPANNABLE,
|
||||
}
|
||||
|
||||
public Layout getLayout() {
|
||||
return new Layout();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user