Android custom control properties and declare-styleable waves example, xmlns: android = "http://schemas.android.com/apk/res/android"

reference refers is quoted from string.xml over 
flag is their own definition, similar to the android: gravity = "top"
dimension refers to a quote from dimension.xml in over content. Note that here it will do if it is dp pixel conversion

 

 

xmlns: android = "http://schemas.android.com/apk/res/android" What do you mean:

 

xmlns: xml namespace

Namespace, no sentence can not be set android: ***** attributes

 

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout

    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:wave="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.itep.wave.MainActivity">

    <View
        android:background="@color/colorAccent"

        android:layout_width="match_parent"
        android:layout_height="44dp"

Guess you like

Origin blog.csdn.net/qq_38998213/article/details/105044800