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
api-impl: add misc stubs/impls
This commit is contained in:
@@ -18,6 +18,7 @@ package android.content.res;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
// import android.text.TextUtils;
|
||||
import android.os.LocaleList;
|
||||
import android.view.View;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -1446,6 +1447,34 @@ public final class Configuration implements Comparable<Configuration> {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the locale list. This is the preferred way for getting the locales (instead of using
|
||||
* the direct accessor to {@link #locale}, which would only provide the primary locale).
|
||||
*
|
||||
* @return The locale list.
|
||||
*/
|
||||
public LocaleList getLocales() {
|
||||
return new LocaleList();
|
||||
/*fixUpLocaleList();
|
||||
return mLocaleList;*/
|
||||
}
|
||||
/**
|
||||
* Set the locale list. This is the preferred way for setting up the locales (instead of using
|
||||
* the direct accessor or {@link #setLocale(Locale)}). This will also set the layout direction
|
||||
* according to the first locale in the list.
|
||||
*
|
||||
* Note that the layout direction will always come from the first locale in the locale list,
|
||||
* even if the locale is not supported by the resources (the resources may only support
|
||||
* another locale further down the list which has a different direction).
|
||||
*
|
||||
* @param locales The locale list. If null, an empty LocaleList will be assigned.
|
||||
*/
|
||||
public void setLocales(LocaleList locales) {
|
||||
/*mLocaleList = locales == null ? LocaleList.getEmptyLocaleList() : locales;
|
||||
locale = mLocaleList.get(0);
|
||||
setLayoutDirection(locale);*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the locale. This is the preferred way for setting up the locale (instead of using the
|
||||
* direct accessor). This will also set the userLocale and layout direction according to
|
||||
|
||||
@@ -53,4 +53,13 @@ public class VectorDrawable extends Drawable {
|
||||
this.paintable = bm.getTexture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntrinsicWidth() {
|
||||
return 24; // FIXME
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntrinsicHeight() {
|
||||
return 24; // FIXME
|
||||
}
|
||||
}
|
||||
|
||||
527
src/api-impl/android/os/LocaleList.java
Normal file
527
src/api-impl/android/os/LocaleList.java
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1770,4 +1770,8 @@ public class View implements Drawable.Callback {
|
||||
public String getTransitionName() {return null;}
|
||||
|
||||
public WindowId getWindowId() {return null;}
|
||||
|
||||
public boolean isInLayout() {
|
||||
return false; // FIXME
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,4 +278,6 @@ public class TextView extends View {
|
||||
}
|
||||
|
||||
public int getMaxWidth() {return 1000;}
|
||||
|
||||
public void nullLayouts() {}
|
||||
}
|
||||
|
||||
@@ -279,6 +279,7 @@ hax_jar = jar('hax', [
|
||||
'android/os/IBinder.java',
|
||||
'android/os/IInterface.java',
|
||||
'android/os/IMessenger.java',
|
||||
'android/os/LocaleList.java',
|
||||
'android/os/Looper.java',
|
||||
'android/os/MemoryFile.java',
|
||||
'android/os/Message.java',
|
||||
|
||||
Reference in New Issue
Block a user