如何使用navasmdc / MaterialDesignLibrary?

问题描述 投票:0回答:1

我是新手,我不知道如何使用该库我将库添加到我的项目中我将其添加到我的xml文件中:

                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:orientation="horizontal">

                    <com.gc.materialdesign.views.ButtonRectangle
                        android:id="@+id/button"
                        android:layout_width="104dp"
                        android:layout_height="match_parent"
                        android:background="#1E88E5"
                        android:text="@string/button"/>```

**but in java code I don't know what I should use like object : Button ot buttonRectangle ?
the application compile but doesn't lunch** 

java android android-studio android-layout material-design
1个回答
0
投票
You can add Material Design Library in app level build.gradle file

 // Material Design
    implementation "com.google.android.material:material:$version_material"
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

Use latest material version in $version_material
© www.soinside.com 2019 - 2024. All rights reserved.