我是新手,我不知道如何使用这个库 我将库添加到我的项目中 我将其添加到我的 xml 文件中:
<LinearLayout xmlns:materialdesign="http://schemas.android.com/apk/res-auto"
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"/>
但是在java代码中我不知道应该使用什么对象:Button还是buttonRectangle? 应用程序编译但不午餐
最佳答案
而是使用 Material Design Components (MDC)由 Google 创建并定期更新。这是一个已经制作的components的库。遵循现代和更新的 Material 指南。您只需要了解如何将其导入到您的项目中并使用它们即可。您可以阅读documentation从这里开始或关注官方 code lab了解详细的分步过程。
祝你好运。
关于java - 如何使用 navasmdc/MaterialDesignLibrary?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58769095/