am c60c9895: am fd6bc26a: am 413e2c21: Merge "Make shadow alpha properties public, add lighting values for TV" into lmp-dev
* commit 'c60c989509fda863aff17361fe26008070455296': Make shadow alpha properties public, add lighting values for TV
This commit is contained in:
@@ -328,6 +328,7 @@ package android {
|
||||
field public static final int alwaysRetainTaskState = 16843267; // 0x1010203
|
||||
field public static final int amPmBackgroundColor = 16843942; // 0x10104a6
|
||||
field public static final int amPmTextColor = 16843941; // 0x10104a5
|
||||
field public static final int ambientShadowAlpha = 16843967; // 0x10104bf
|
||||
field public static final int angle = 16843168; // 0x10101a0
|
||||
field public static final int animateFirstView = 16843477; // 0x10102d5
|
||||
field public static final int animateLayoutChanges = 16843506; // 0x10102f2
|
||||
@@ -1148,6 +1149,7 @@ package android {
|
||||
field public static final int spinnersShown = 16843595; // 0x101034b
|
||||
field public static final int splitMotionEvents = 16843503; // 0x10102ef
|
||||
field public static final int splitTrack = 16843852; // 0x101044c
|
||||
field public static final int spotShadowAlpha = 16843968; // 0x10104c0
|
||||
field public static final int src = 16843033; // 0x1010119
|
||||
field public static final int ssp = 16843747; // 0x10103e3
|
||||
field public static final int sspPattern = 16843749; // 0x10103e5
|
||||
|
||||
@@ -99,15 +99,13 @@ public class ThreadedRenderer extends HardwareRenderer {
|
||||
private boolean mRootNodeNeedsUpdate;
|
||||
|
||||
ThreadedRenderer(Context context, boolean translucent) {
|
||||
final TypedArray a = context.obtainStyledAttributes(
|
||||
null, R.styleable.Lighting, R.attr.lightingStyle, 0);
|
||||
final TypedArray a = context.obtainStyledAttributes(null, R.styleable.Lighting, 0, 0);
|
||||
mLightY = a.getDimension(R.styleable.Lighting_lightY, 0);
|
||||
mLightZ = a.getDimension(R.styleable.Lighting_lightZ, 0);
|
||||
mLightRadius = a.getDimension(R.styleable.Lighting_lightRadius, 0);
|
||||
mAmbientShadowAlpha = Math.round(
|
||||
255 * a.getFloat(R.styleable.Lighting_ambientShadowAlpha, 0));
|
||||
mSpotShadowAlpha = Math.round(
|
||||
255 * a.getFloat(R.styleable.Lighting_spotShadowAlpha, 0));
|
||||
mAmbientShadowAlpha =
|
||||
(int) (255 * a.getFloat(R.styleable.Lighting_ambientShadowAlpha, 0) + 0.5f);
|
||||
mSpotShadowAlpha = (int) (255 * a.getFloat(R.styleable.Lighting_spotShadowAlpha, 0) + 0.5f);
|
||||
a.recycle();
|
||||
|
||||
long rootNodePtr = nCreateRootRenderNode();
|
||||
|
||||
23
core/res/res/values-television/dimens.xml
Normal file
23
core/res/res/values-television/dimens.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<!-- Lighting and shadow properties -->
|
||||
<dimen name="light_y">-300dp</dimen>
|
||||
<item type="dimen" format="float" name="ambient_shadow_alpha">0.4</item>
|
||||
<item type="dimen" format="float" name="spot_shadow_alpha">0.4</item>
|
||||
|
||||
</resources>
|
||||
@@ -1012,13 +1012,25 @@
|
||||
<!-- The color applied to framework switch thumbs in their normal state. -->
|
||||
<attr name="colorSwitchThumbNormal" format="color" />
|
||||
|
||||
<!-- ================== -->
|
||||
<!-- Hardware rendering -->
|
||||
<!-- ================== -->
|
||||
<!-- =================== -->
|
||||
<!-- Lighting properties -->
|
||||
<!-- =================== -->
|
||||
<eat-comment />
|
||||
|
||||
<!-- Reference to the Lighting style. -->
|
||||
<attr name="lightingStyle" format="reference" />
|
||||
<!-- @hide The default Y position of the light used to project view shadows. -->
|
||||
<attr name="lightY" format="dimension" />
|
||||
|
||||
<!-- @hide The default Z position of the light used to project view shadows. -->
|
||||
<attr name="lightZ" format="dimension" />
|
||||
|
||||
<!-- @hide The default radius of the light used to project view shadows. -->
|
||||
<attr name="lightRadius" format="dimension" />
|
||||
|
||||
<!-- Alpha value of the ambient shadow projected by elevated views, between 0 and 1. -->
|
||||
<attr name="ambientShadowAlpha" format="float" />
|
||||
|
||||
<!-- Alpha value of the spot shadow projected by elevated views, between 0 and 1. -->
|
||||
<attr name="spotShadowAlpha" format="float" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- **************************************************************** -->
|
||||
@@ -7384,11 +7396,11 @@
|
||||
|
||||
<!-- @hide -->
|
||||
<declare-styleable name="Lighting">
|
||||
<attr name="lightY" format="dimension" />
|
||||
<attr name="lightZ" format="dimension" />
|
||||
<attr name="lightRadius" format="dimension" />
|
||||
<attr name="ambientShadowAlpha" format="float" />
|
||||
<attr name="spotShadowAlpha" format="float" />
|
||||
<attr name="lightY" />
|
||||
<attr name="lightZ" />
|
||||
<attr name="lightRadius" />
|
||||
<attr name="ambientShadowAlpha" />
|
||||
<attr name="spotShadowAlpha" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="RestrictionEntry">
|
||||
|
||||
@@ -405,4 +405,11 @@
|
||||
|
||||
<dimen name="text_handle_min_size">40dp</dimen>
|
||||
|
||||
<!-- Lighting and shadow properties -->
|
||||
<dimen name="light_y">-200dp</dimen>
|
||||
<dimen name="light_z">800dp</dimen>
|
||||
<dimen name="light_radius">800dp</dimen>
|
||||
<item type="dimen" format="float" name="ambient_shadow_alpha">0.06</item>
|
||||
<item type="dimen" format="float" name="spot_shadow_alpha">0.16</item>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -2278,6 +2278,8 @@
|
||||
<public type="attr" name="windowSharedElementsUseOverlay" />
|
||||
<public type="attr" name="reparent" />
|
||||
<public type="attr" name="reparentWithOverlay" />
|
||||
<public type="attr" name="ambientShadowAlpha" />
|
||||
<public type="attr" name="spotShadowAlpha" />
|
||||
|
||||
<public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
|
||||
|
||||
|
||||
@@ -1355,12 +1355,4 @@ please see styles_device_defaults.xml.
|
||||
<item name="padding">16dp</item>
|
||||
</style>
|
||||
|
||||
<style name="Lighting">
|
||||
<item name="lightY">-200dp</item>
|
||||
<item name="lightZ">800dp</item>
|
||||
<item name="lightRadius">800dp</item>
|
||||
<item name="ambientShadowAlpha">0.06</item>
|
||||
<item name="spotShadowAlpha">0.16</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1977,7 +1977,6 @@
|
||||
<java-symbol type="string" name="whichEditApplicationNamed" />
|
||||
<java-symbol type="string" name="whichSendApplication" />
|
||||
<java-symbol type="string" name="whichSendApplicationNamed" />
|
||||
<java-symbol type="attr" name="lightingStyle" />
|
||||
<java-symbol type="attr" name="lightY" />
|
||||
<java-symbol type="attr" name="lightZ" />
|
||||
<java-symbol type="attr" name="lightRadius" />
|
||||
|
||||
@@ -410,14 +410,19 @@ please see themes_device_defaults.xml.
|
||||
<item name="fastScrollPreviewBackgroundLeft">@drawable/menu_submenu_background</item>
|
||||
<item name="fastScrollOverlayPosition">floating</item>
|
||||
<item name="fastScrollTextColor">@color/primary_text_dark</item>
|
||||
|
||||
<!-- Pointer style -->
|
||||
<item name="pointerStyle">@style/Pointer</item>
|
||||
|
||||
<!-- Accessibility focused drawable. -->
|
||||
<!-- Accessibility focused drawable -->
|
||||
<item name="accessibilityFocusedDrawable">@drawable/view_accessibility_focused</item>
|
||||
|
||||
<!-- Lighting and shadow style. -->
|
||||
<item name="lightingStyle">@style/Lighting</item>
|
||||
<!-- Lighting and shadow properties -->
|
||||
<item name="lightY">@dimen/light_y</item>
|
||||
<item name="lightZ">@dimen/light_z</item>
|
||||
<item name="lightRadius">@dimen/light_radius</item>
|
||||
<item name="ambientShadowAlpha">@dimen/ambient_shadow_alpha</item>
|
||||
<item name="spotShadowAlpha">@dimen/spot_shadow_alpha</item>
|
||||
</style>
|
||||
|
||||
<!-- Variant of {@link #Theme} with no title bar -->
|
||||
|
||||
@@ -33,11 +33,8 @@
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
|
||||
<item name="*android:lightingStyle">@style/RecentsLighting</item>
|
||||
</style>
|
||||
|
||||
<style name="RecentsLighting" parent="@*android:style/Lighting">
|
||||
<item name="*android:ambientShadowAlpha">0.30</item>
|
||||
<item name="android:ambientShadowAlpha">0.30</item>
|
||||
</style>
|
||||
|
||||
<!-- Animations for a non-full-screen window or activity. -->
|
||||
|
||||
Reference in New Issue
Block a user