【问题标题】:What is Use of app:met_floatingLabel="normal XML elementapp:met_floatingLabel="普通 XML 元素的用途是什么
【发布时间】:2016-08-12 13:37:22
【问题描述】:

我只是在试用一个使用材料设计组件的库,并在 link 找到了一个示例。

布局xml如下:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="demos.com.demos.MainActivity">

    <com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
        android:id="@+id/android_material_design_spinner"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Material Design Spinner"
        android:textColorHint="#05ab9a"
        app:met_floatingLabel="normal"/>
</RelativeLayout>

我的问题是 app 命名空间的用途是什么,特别是 app:met_floatingLabel="normal 的用途是什么?

【问题讨论】:

  • 在我看来,这会导致文本以突出显示、正常或自定义颜色显示。参数必须是颜色代码,也可以用setFloatingLabel(int color)编程设置。

标签: android xml material-design


【解决方案1】:
  • app 表示不是来自android,是来自应用程序(包括应用程序使用的库。
  • 在特定的met_floatingLabel 中,您必须检查库的文档。这是该库的开发者创建的参数。

【讨论】:

    猜你喜欢
    • 2016-09-05
    • 2016-02-13
    • 2018-01-31
    • 2018-03-26
    • 2014-10-20
    • 2012-10-29
    • 2012-06-03
    • 1970-01-01
    • 2020-11-15
    相关资源
    最近更新 更多