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

Commit f61f66d0 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

Merge "Factor our theme of permission grant dialog"

parents 1aff3425 20b80df9
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- Landscape dimensions for the permission grant dialog. -->
<resources>
    <!-- 37:20 == 65% width -->
    <dimen name="permissionGrantDialogWidth">37</dimen>
</resources>
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- portrait dimensions for the permission grant dialog. -->
<resources>
    <!-- 380:20 == 95% width -->
    <dimen name="permissionGrantDialogWidth">380</dimen>
</resources>
+97 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- styles for the permission grant dialog. -->
<resources>
    <style name="PermissionGrantDialog">
        <item name="background">?attr/windowBackground</item>
        <item name="elevation">?attr/windowElevation</item>
        <item name="layout_weight">@dimen/permissionGrantDialogWidth</item>
    </style>

    <style name="PermissionGrantTitleIcon">
        <item name="layout_width">36dp</item>
        <item name="layout_height">36dp</item>
        <item name="tint">?attr/colorAccent</item>
        <item name="scaleType">fitCenter</item>
    </style>

    <style name="PermissionGrantTitleMessage"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="paddingStart">22dp</item>
        <item name="textSize">20sp</item>
        <item name="textColor">?attr/textColorPrimary</item>
    </style>

    <style name="PermissionGrantIndex"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="paddingEnd">12dp</item>
        <item name="singleLine">true</item>
        <item name="textColor">?attr/textColorSecondary</item>
    </style>

    <style name="PermissionGrantDescription">
        <item name="layout_marginTop">20dp</item>
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginBottom">16dp</item>
        <item name="layout_marginEnd">24dp</item>
    </style>

    <style name="PermissionGrantContent">
        <item name="layout_marginStart">16dp</item>
        <item name="layout_marginEnd">24dp</item>
    </style>

    <style name="PermissionGrantRadioGroup">
        <item name="layout_marginStart">8dp</item>
        <item name="layout_marginTop">-4dp</item>
    </style>

    <style name="PermissionGrantRadioButton"
           parent="@style/Widget.DeviceDefault.CompoundButton.RadioButton">
        <item name="paddingStart">16dp</item>
        <item name="paddingTop">8dp</item>
        <item name="paddingBottom">8dp</item>
        <item name="textSize">16sp</item>
    </style>

    <style name="PermissionGrantDetailMessage"
           parent="@style/TextAppearance.DeviceDefault">
        <item name="layout_marginStart">8dp</item>
        <item name="layout_marginBottom">4dp</item>
        <item name="textColor">?attr/textColorPrimary</item>
        <item name="textSize">16sp</item>
    </style>

    <style name="PermissionGrantDetailMessageSpace">
        <item name="layout_height">8dp</item>
    </style>

    <style name="PermissionGrantCheckbox"
           parent="@style/Widget.DeviceDefault.CompoundButton.CheckBox">
        <item name="paddingStart">16dp</item>
        <item name="textColor">?attr/textColorSecondary</item>
        <item name="buttonTint">?attr/textColorSecondary</item>
        <item name="textSize">16sp</item>
    </style>

    <style name="PermissionGrantButtonBar">
        <item name="layout_marginStart">24dp</item>
        <item name="layout_marginEnd">16dp</item>
        <item name="layout_marginBottom">4dp</item>
    </style>
</resources>
+35 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- themes for the permission grant dialog. -->
<resources>
    <style name="Theme.DeviceDefault.Light.Panel.PermissionGrantApp"
           parent="@style/Theme.DeviceDefault.Light.Panel">
        <item name="windowIsFloating">false</item>
        <item name="windowTranslucentStatus">true</item>
        <item name="backgroundDimEnabled">true</item>
        <item name="windowAnimationStyle">@style/Animation.Material.Dialog</item>
    </style>

    <style name="Theme.DeviceDefault.Light.Dialog.PermissionGrant"
           parent="@style/Theme.DeviceDefault.Light.Dialog">
        <item name="titleTextStyle">@style/PermissionGrantTitleMessage</item>
        <item name="radioButtonStyle">@style/PermissionGrantRadioButton</item>
        <item name="checkboxStyle">@style/PermissionGrantCheckbox</item>
        <item name="buttonBarStyle">@style/PermissionGrantButtonBar</item>
    </style>
</resources>