【发布时间】:2011-05-05 03:20:03
【问题描述】:
请点击查看图片 http://i1094.photobucket.com/albums/i455/tdounnyy/device.png
在此 PreferenceActivity 的底部,“选择铃声”右侧有一个图标/按钮。
“振动”不会。
此振动偏好是一种客户偏好扩展偏好。
我想在振动行中放置相同的图标。 一种方法是扩展 ListPreference 或 RingtonePreference 以欺骗操作系统。
我不喜欢这样,想知道是否有更好的解决方案。
preferences.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 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.
-->
<!-- Layout used by PreferenceScreen. This is inflated inside
android.R.layout.preference. -->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dip"
android:layout_gravity="center_vertical"
android:background="@drawable/btn_circle"
android:src="@drawable/ic_btn_round_more" />
我添加前缀“android”为:
android:background="@android:drawable/btn_circle"
android:src="@android:drawable/ic_btn_round_more"
现在,Eclipse 说:错误:资源未公开。 我用谷歌搜索但没有运气。 有想过怎么突破吗?
【问题讨论】:
标签: android preferenceactivity preference