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 bunch of new java APIs: mostly stubs or copied from AOSP
Many of these classes are only needed to be subclassed by androidx support library, which is used in many android apps
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package android.app;
|
||||
|
||||
import android.R;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -102,6 +103,7 @@ public class Activity extends Context {
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
System.out.println("- onCreate - yay!");
|
||||
new ViewGroup(this).setId(R.id.content);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -263,6 +265,22 @@ public class Activity extends Context {
|
||||
nativeFinish(getWindow().native_window);
|
||||
}
|
||||
|
||||
public Object getLastNonConfigurationInstance() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public FragmentManager getFragmentManager() {
|
||||
return new FragmentManager();
|
||||
}
|
||||
|
||||
public LayoutInflater getLayoutInflater() {
|
||||
return layout_inflater;
|
||||
}
|
||||
|
||||
public CharSequence getTitle() {
|
||||
return "Title";
|
||||
}
|
||||
|
||||
private native void nativeFinish(long native_window);
|
||||
private static native void nativeStartActivity(Activity activity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user