android.content.res.Resources#selectSystemTheme()源码实例Demo

下面列出了android.content.res.Resources#selectSystemTheme() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: InputMethodService.java
@Override public void onCreate() {
    mTheme = Resources.selectSystemTheme(mTheme,
            getApplicationInfo().targetSdkVersion,
            android.R.style.Theme_InputMethod,
            android.R.style.Theme_Holo_InputMethod,
            android.R.style.Theme_DeviceDefault_InputMethod,
            android.R.style.Theme_DeviceDefault_InputMethod);
    super.setTheme(mTheme);
    super.onCreate();
    mImm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
    mSettingsObserver = SettingsObserver.createAndRegister(this);
    // If the previous IME has occupied non-empty inset in the screen, we need to decide whether
    // we continue to use the same size of the inset or update it
    mShouldClearInsetOfPreviousIme = (mImm.getInputMethodWindowVisibleHeight() > 0);
    mInflater = (LayoutInflater)getSystemService(
            Context.LAYOUT_INFLATER_SERVICE);
    mWindow = new SoftInputWindow(this, "InputMethod", mTheme, null, null, mDispatcherState,
            WindowManager.LayoutParams.TYPE_INPUT_METHOD, Gravity.BOTTOM, false);
    // For ColorView in DecorView to work, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS needs to be set
    // by default (but IME developers can opt this out later if they want a new behavior).
    mWindow.getWindow().setFlags(
            FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

    initViews();
    mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
}
 
源代码2 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码3 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码4 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码5 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码6 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码7 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码8 项目: AndroidComponentPlugin   文件: ContextImpl.java
public Object createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
        ctx.mMainThread.getHandler());
}
 
源代码9 项目: android_9.0.0_r45   文件: SystemServiceRegistry.java
@Override
public NotificationManager createService(ContextImpl ctx) {
    final Context outerContext = ctx.getOuterContext();
    return new NotificationManager(
        new ContextThemeWrapper(outerContext,
                Resources.selectSystemTheme(0,
                        outerContext.getApplicationInfo().targetSdkVersion,
                        com.android.internal.R.style.Theme_Dialog,
                        com.android.internal.R.style.Theme_Holo_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Dialog,
                        com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog)),
        ctx.mMainThread.getHandler());
}