相关疑难解决方法(0)

如何从Android appcompat v7 21库设置DrawerArrowToggle的样式

所以现在Android 5.0发布了,我想知道如何设置动画操作栏图标的样式.

该库在这里实现和风格也对我很好,但由于程序兼容性V7库有它怎么能称呼?

我使用v7 DrawerToggle实现了这个功能.但是我无法设计它.请帮忙

我在v7 styles_base.xml中找到了它的样式

    <style name="Base.Widget.AppCompat.DrawerArrowToggle" parent="">
    <item name="color">?android:attr/textColorSecondary</item>
    <item name="thickness">2dp</item>
    <item name="barSize">18dp</item>
    <item name="gapBetweenBars">3dp</item>
    <item name="topBottomBarArrowSize">11.31dp</item>
    <item name="middleBarArrowSize">16dp</item>
    <item name="drawableSize">24dp</item>
    <item name="spinBars">true</item>
</style>
Run Code Online (Sandbox Code Playgroud)

我把它添加到我的样式中并且没有用.也添加到我的attr.xml

<declare-styleable name="DrawerArrowToggle">
    <!-- The drawing color for the bars -->
    <attr name="color" format="color"/>
    <!-- Whether bars should rotate or not during transition -->
    <attr name="spinBars" format="boolean"/>
    <!-- The total size of the drawable -->
    <attr name="drawableSize" format="dimension"/>
    <!-- The max gap between the bars when they are parallel to each …
Run Code Online (Sandbox Code Playgroud)

android android-5.0-lollipop

31
推荐指数
2
解决办法
3万
查看次数

更改导航抽屉按钮(后退按钮)的颜色?

在我的应用程序中,我使用操作栏和导航抽屉。操作栏中有一个按钮用于打开和关闭导航抽屉。我想将其颜色更改为红色。我怎么做?

在此输入图像描述

android android-actionbar navigation-drawer

3
推荐指数
1
解决办法
5554
查看次数