Что означает "*" в "@ * android: color / bright_foreground_dark"? - PullRequest
1 голос
/ 06 февраля 2012

Содержимое соответствующего 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>

Мой вопрос: для чего используется "*". Я не видел его раньше и не могу найти его для справки самостоятельно.
спасибо.

Ответы [ 2 ]

0 голосов
/ 08 февраля 2012

Я нашел ответ здесь

Добавление * просто для ссылки на скрытый атрибут.

0 голосов
/ 06 февраля 2012

В файле макета xml синтаксис для определения цвета:

@[package:]color/filename

Предположительно, * не нужен и просто соответствует всем пакетам.

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

...