gpt4 book ai didi

java - 如何使用 navasmdc/MaterialDesignLibrary?

转载 作者:行者123 更新时间:2023-12-02 01:15:09 25 4
gpt4 key购买 nike

我是新手,我不知道如何使用这个库我将库添加到我的项目中我将其添加到我的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com