gpt4 book ai didi

Android seekbar - 没有颜色色调参数

转载 作者:行者123 更新时间:2023-11-30 00:13:09 26 4
gpt4 key购买 nike

看图中安装了什么

enter image description here

模拟器设置为 4.4.2。 MinSDK 设置为 16。

错误:找不到与给定名称匹配的资源:attr 'android:progressBackgroundTint' 等

Seekbar 没有以下参数:colorControlActivated、progressbackgroundtint、progresstint、thumbtint

如何改变搜索栏的颜色?

Main.axml 搜索栏样式:

<SeekBar
p1:layout_width="250dp"
p1:layout_height="wrap_content"
... />

Xamarin.Diagnostics

[I:sdk]:                    Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory found:
Path contains adb in \platform-tools (path hidden by user\Android\android-sdk).
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
Path contains ndk-stack in \. (path hidden by user\Microsoft\AndroidNDK64\android-ndk-r11c\).
[I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory found:
Path contains jarsigner.exe in \bin (path hidden by user\Java\jdk1.8.0_151).
[I:Unknown]: Found Xamarin.Android 7.0.2
[I:Unknown]: Found Android SDK. API levels: 17, 19
[I:]: Tracking android devices started
[D:]: Tracking avd started
[D:]: avd watcher *.ini path: 'path hidden by user\\.android\avd'
[D:]: avd watcher android path: 'path hidden by user\Android\ANDROI~1\tools\android.BAT'
[W:]: Adb connection refused
[I:]: Starting Adb server (adb start-server)
[I:]: Adb start-server operation completed
[D:]: TrackDeviceTask got:
[I:]: Got new device list from adb with 0 devices
[D:]: avd watcher: got device list from avd with 1 devices

最佳答案

How to change color of seekbar?

Android SeekBar自定义 Material 样式,可引用:

http://www.zoftino.com/android-seekbar-and-custom-seekbar-examples

创建自定义 SeekBar 样式:

<style name="MySeekBar" parent="Widget.AppCompat.SeekBar">
<item name="android:progressBackgroundTint">#f4511e</item>
<item name="android:progressTint">#388e3c</item>
<item name="android:colorControlActivated">#c51162</item>
</style>

在你的 axml 中使用它:

<SeekBar
android:id="@+id/mySeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/MySeekBar"
/>

效果:

enter image description here

更新:

请确保您已在 axml 中添加 xmlns:android="http://schemas.android.com/apk/res/android,如果您已将此添加到您的 axml 中,请发布完整的 axml 文件。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<SeekBar
android:id="@+id/mySeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/MySeekBar"
/>
</LinearLayout>

关于Android seekbar - 没有颜色色调参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47815424/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com