1

対応するxmlファイルの内容は「@*android:color/bright_foreground_dark」です

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@*android:color/bright_foreground_dark" />
</selector>

私の質問は、「*」が何に使用されるかです。私は以前にそれを見たことがなく、自分で参照することはできません。
ありがとう。

4

2 に答える 2

0

xml レイアウト ファイルでは、色を定義するための構文は次のとおりです。

@[package:]color/filename

おそらく、*は必要なく、単純にすべてのパッケージに一致します。

http://developer.android.com/guide/topics/resources/color-list-resource.html

于 2012-02-06T05:00:26.230 に答える
0

私はここで答えを見つけました

*非表示になった属性への参照だけを追加します。

于 2012-02-08T01:27:16.757 に答える