Android черно-белая тема - PullRequest
0 голосов
/ 22 января 2019

Я пытаюсь создать тему, подобную этой, но не могу найти никакой помощи по этому поводу. Я пытаюсь получить белую панель действий с черными значками и текстом, а строку состояния с черными значками и белым фоном. Я меняю цвет прагматично, но я думаю, что есть какая-то подходящая тема, чтобы получить что-то подобное, я тоже попробовал material.theme.light androdi black and white theme

1 Ответ

0 голосов
/ 22 января 2019

Вот ваше решение

Попробуйте это

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/white">

        <android.support.v7.widget.Toolbar
            android:id="@+id/ar_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="exitUntilCollapsed"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light">


            <TextView
                android:id="@+id/toolbar_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Nilesh Rathod"
                android:textStyle="bold" />

        </android.support.v7.widget.Toolbar>

    </android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>

Тема

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@android:color/white</item>
    <item name="colorPrimaryDark">@android:color/white</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="colorControlNormal">#FFFFFF</item>
    <item name="android:windowLightStatusBar">true</item>
    <item name="android:statusBarColor">@android:color/white</item>
    <item name="android:windowDrawsSystemBarBackgrounds">true</item>
    <item name="android:windowTranslucentNavigation">false</item>
    <item name="android:navigationBarColor">#000</item>

</style>

OUTPUT

enter image description here

...