Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9767e41d authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Some improvements for wallpaper configuration.

This introduces a new activity that you can derive from to implement
a wall paper configuration activity.  This is supposed to select
a theme based on whether it is being run to configure a real wallpaper
or a preview, but this is going to be more difficult to do than I
thought. :(

Also fix a problem in the white theme where the list view's background
was being set to white, so it wouldn't work on a transparent bg.

Change-Id: I26d5a8695a3c878a1664eb09900eded57eaff990
parent 5862b673
Loading
Loading
Loading
Loading
+64 −0
Original line number Diff line number Diff line
@@ -10659,6 +10659,17 @@
 visibility="public"
>
</field>
<field name="screen_background_light_transparent"
 type="int"
 transient="false"
 volatile="false"
 value="17301674"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="spinner_background"
 type="int"
 transient="false"
@@ -12714,6 +12725,17 @@
 visibility="public"
>
</field>
<field name="Theme_Light_WallpaperSettings"
 type="int"
 transient="false"
 volatile="false"
 value="16973922"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="Theme_NoDisplay"
 type="int"
 transient="false"
@@ -12802,6 +12824,17 @@
 visibility="public"
>
</field>
<field name="Theme_WallpaperSettings"
 type="int"
 transient="false"
 volatile="false"
 value="16973921"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="Theme_Wallpaper_NoTitleBar"
 type="int"
 transient="false"
@@ -117496,6 +117529,37 @@
</implements>
</interface>
</package>
<package name="android.service.wallpaper"
>
<class name="WallpaperSettingsActivity"
 extends="android.preference.PreferenceActivity"
 abstract="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<constructor name="WallpaperSettingsActivity"
 type="android.service.wallpaper.WallpaperSettingsActivity"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</constructor>
<field name="EXTRA_PREVIEW_MODE"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.service.wallpaper.PREVIEW_MODE&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
</class>
</package>
<package name="android.speech"
>
<class name="RecognizerIntent"
+48 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2009 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package android.service.wallpaper;

import android.content.res.Resources;
import android.os.Bundle;
import android.preference.PreferenceActivity;

/**
 * Base class for activities that will be used to configure the settings of
 * a wallpaper.  You should derive from this class to allow it to select the
 * proper theme of the activity depending on how it is being used.
 */
public class WallpaperSettingsActivity extends PreferenceActivity {
    /**
     * This boolean extra in the launch intent indicates that the settings
     * are being used while the wallpaper is in preview mode.
     */
    final public static String EXTRA_PREVIEW_MODE
            = "android.service.wallpaper.PREVIEW_MODE";
    
    @Override
    protected void onCreate(Bundle icicle) {
        if (false) {
            Resources.Theme theme = getTheme();
            if (getIntent().getBooleanExtra(EXTRA_PREVIEW_MODE, false)) {
                theme.applyStyle(com.android.internal.R.style.PreviewWallpaperSettings, true);
            } else {
                theme.applyStyle(com.android.internal.R.style.ActiveWallpaperSettings, true);
            }
        }
        super.onCreate(icicle);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ public class ZoomButtonsController implements View.OnTouchListener {
        lp.height = LayoutParams.WRAP_CONTENT;
        lp.width = LayoutParams.FILL_PARENT;
        lp.type = LayoutParams.TYPE_APPLICATION_PANEL;
        lp.format = PixelFormat.TRANSPARENT;
        lp.format = PixelFormat.TRANSLUCENT;
        lp.windowAnimations = com.android.internal.R.style.Animation_ZoomButtons;
        mContainerLayoutParams = lp;

+7 −0
Original line number Diff line number Diff line
@@ -24,7 +24,14 @@
    <drawable name="status_bar_opened_default_background">#ff000000</drawable>
    <drawable name="search_bar_default_color">#ff000000</drawable>
    <drawable name="safe_mode_background">#60000000</drawable>
    <!-- Background drawable that can be used for a transparent activity to
         be able to display a dark UI: this darkens its background to make
         a dark (default theme) UI more visible. -->
    <drawable name="screen_background_dark_transparent">#80000000</drawable>
    <!-- Background drawable that can be used for a transparent activity to
         be able to display a light UI: this lightens its background to make
         a light UI more visible. -->
    <drawable name="screen_background_light_transparent">#80ffffff</drawable>
    <color name="safe_mode_text">#80ffffff</color>
    <color name="white">#ffffffff</color>
    <color name="black">#ff000000</color>
+3 −0
Original line number Diff line number Diff line
@@ -1168,10 +1168,13 @@
  <public type="style" name="Theme.Wallpaper" />
  <public type="style" name="Theme.Wallpaper.NoTitleBar" />
  <public type="style" name="Theme.Wallpaper.NoTitleBar.Fullscreen" />
  <public type="style" name="Theme.WallpaperSettings" />
  <public type="style" name="Theme.Light.WallpaperSettings" />
  
  <!-- Semi-transparent background that can be used when placing a dark
       themed UI on top of some arbitrary background (such as the
       wallpaper).  This darkens the background sufficiently that the UI
       can be seen. -->
  <public type="drawable" name="screen_background_dark_transparent" />
  <public type="drawable" name="screen_background_light_transparent" />
</resources>
Loading