标签: tint

为什么我不能为UINavigationBar设置自定义颜色色调?

我想更改导航栏上的颜色,文档说明不要尝试更改"alpha"值.那么,如果所有构造函数都提供alpha值,如何设置不是SDK定义值的颜色(例如,[UIColor redColor],brownColor等)?我尝试获取当前的alpha值,但这没有帮助.当我使用自定义颜色时,它会使导航栏看起来像X射线(一个邋,,黑白).

[self.navigationController.navigationBar setTintColor: [UIColor brownColor]];
Run Code Online (Sandbox Code Playgroud)

iphone tint uinavigationbar uicolor

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

Android中的色调效果

我需要在Android中对图像应用色调效果.但色调效果只有ORANGE COLOR色调.如果有人做过这种效果,请帮助我.

我已经看到通过搜索色调效果找到的所有网络链接,但所有链接和资源都应用了所有颜色色调.

我需要在搜索栏进度上实现这种效果.

提前致谢.

android image tint

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

更改各个导航抽屉图标的图标颜色

之前在其他主题的评论中已经提出过这个问题,但据我所知,没有人能得到一个直接的答案.

我要做的是将导航绘图中的每个单独图标设置为使用不同颜色着色.这是一个例子:

这个例子

使用app:itemIconTint将样式所有图标.有可能这样做吗?

android tint navigation-drawer

2
推荐指数
1
解决办法
1325
查看次数

如何在 Kitkat 中设置应用栏背景颜色的底部

我尝试将底部应用栏背景颜色设置为透明。但在 Kitkat 中,底部应用栏背景颜色未正确分配。在 Kitkat 中,底部应用栏背景颜色为白色。如何根据需要设置底部应用栏背景颜色?

我不明白“背景”和“backgroundTint”。请让我知道这一点。

谢谢。

这是我的 xml 代码。

 <android.support.design.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/circle_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.bottomappbar.BottomAppBar
        android:id="@+id/main_bottom_app_bar"
        android:layout_width="match_parent"
        android:layout_height="?actionBarSize"
        android:layout_gravity="bottom"
        android:backgroundTint="@color/view_transparent"
        app:fabAlignmentMode="center"
        app:fabCradleRoundedCornerRadius="2dp"
        app:hideOnScroll="true">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="?actionBarSize"
            android:background="@android:color/transparent">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="?actionBarSize"
                android:background="@android:color/transparent"
                android:layout_toLeftOf="@id/empty_view"
                android:gravity="center_vertical">

                <LinearLayout
                    android:id="@+id/main_catalogue_btn"
                    android:layout_width="56dp"
                    android:layout_height="56dp"
                    android:layout_centerInParent="true"
                    android:background="@android:color/transparent"
                    android:gravity="center_vertical"
                    android:orientation="vertical">

                    <ImageView
                        android:id="@+id/catalogue_img"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_horizontal"
                        app:srcCompat="@drawable/ic_format_list_bulleted_white_24dp" />

                    <TextView
                        android:id="@+id/catalogue_txt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Catalogue"
                        android:textColor="@android:color/white"
                        android:textSize="12dp" />
                </LinearLayout>
            </RelativeLayout>

            <View
                android:id="@+id/empty_view"
                android:layout_width="68dp"
                android:layout_height="?actionBarSize"
                android:layout_centerInParent="true" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="?actionBarSize"
                android:background="@android:color/transparent"
                android:layout_toRightOf="@id/empty_view"
                android:gravity="center_vertical">

                <LinearLayout
                    android:id="@+id/main_info_btn"
                    android:layout_width="56dp"
                    android:layout_height="56dp"
                    android:layout_centerInParent="true"
                    android:background="@android:color/transparent" …
Run Code Online (Sandbox Code Playgroud)

android background tint colors bottomappbar

2
推荐指数
1
解决办法
3190
查看次数

Apple watch:以编程方式更改状态栏色调颜色

如何以WKInterfaceController编程方式更改特定状态栏的状态栏的全局色调/色调颜色?

tint statusbar apple-watch

0
推荐指数
1
解决办法
2259
查看次数

搜索栏色调颜色

在我的应用中,我设置了如下搜索器:

searchBar.delegate = self
searchBar.showsCancelButton = true
searchBar.tintColor = UIColor.whiteColor()
searchBar.spellCheckingType = .No
searchBar.autocapitalizationType = .None
searchBar.autocorrectionType = .No
searchBar.returnKeyType = .Done
searchBar.sizeToFit()

let view: UIView = self.searchBar.subviews[0] as UIView
   for subView: UIView in view.subviews {
      if subView.isKindOfClass(UITextField){
         subView.tintColor = UIColor.greenColor()
         }
      }
Run Code Online (Sandbox Code Playgroud)

此代码部分为我的“取消”按钮设置了白色文本颜色,为我的搜索字段设置了绿色。

如您所见,光标将为绿色,但文本颜色为黑色。我怎么了

在此处输入图片说明

tint ios searchbar swift

0
推荐指数
1
解决办法
2265
查看次数