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
src/api-impl: fix up code style, mainly for code imported from AOSP
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
package android.widget;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.text.TextPaint;
|
||||
import android.content.res.TypedArray;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.text.InputFilter;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextWatcher;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class TextView extends View {
|
||||
@@ -35,28 +33,28 @@ public class TextView extends View {
|
||||
native void native_constructor(Context context);
|
||||
|
||||
public final void setText(CharSequence text) {
|
||||
if(text == null) {
|
||||
if (text == null) {
|
||||
native_setText("NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
native_setText(text.toString());
|
||||
|
||||
if(text instanceof android.text.Spanned)
|
||||
if (text instanceof android.text.Spanned)
|
||||
native_set_markup(1);
|
||||
}
|
||||
|
||||
private native final void native_set_markup(int bool);
|
||||
|
||||
public native final void native_setText(String text);
|
||||
public native void setTextSize(float size);
|
||||
public native void setTextSize(float size);
|
||||
|
||||
public void setTextColor(int color) {}
|
||||
public void setTextColor(int color) {}
|
||||
public void setTextColor(ColorStateList colors) {}
|
||||
public void setTextSize(int unit, float size) {}
|
||||
public void setTypeface(Typeface tf, int style) {}
|
||||
public void setTypeface(Typeface tf) {}
|
||||
public void setLineSpacing(float add, float mult) {}
|
||||
public void setTextSize(int unit, float size) {}
|
||||
public void setTypeface(Typeface tf, int style) {}
|
||||
public void setTypeface(Typeface tf) {}
|
||||
public void setLineSpacing(float add, float mult) {}
|
||||
public final void setLinksClickable(boolean whether) {}
|
||||
|
||||
public void setInputType(int type) {}
|
||||
@@ -64,15 +62,15 @@ public class TextView extends View {
|
||||
public void setCursorVisible(boolean visible) {}
|
||||
public void setImeOptions(int imeOptions) {}
|
||||
|
||||
public final ColorStateList getTextColors() { return new ColorStateList(new int[][] { new int[0] }, new int[1]); }
|
||||
public static ColorStateList getTextColors(Context context, TypedArray attrs) { return new ColorStateList(new int[][] { new int[0] }, new int[1]); }
|
||||
public final ColorStateList getTextColors() { return new ColorStateList(new int[][] {new int[0]}, new int[1]); }
|
||||
public static ColorStateList getTextColors(Context context, TypedArray attrs) { return new ColorStateList(new int[][] {new int[0]}, new int[1]); }
|
||||
|
||||
public TextPaint getPaint() {
|
||||
return new TextPaint();
|
||||
}
|
||||
|
||||
public void addTextChangedListener(TextWatcher watcher) {}
|
||||
public void setOnEditorActionListener (TextView.OnEditorActionListener l) {}
|
||||
public void setOnEditorActionListener(TextView.OnEditorActionListener l) {}
|
||||
|
||||
public static interface OnEditorActionListener {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user