亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

材料設計在 android studio 中不起作用

材料設計在 android studio 中不起作用

交互式愛情 2023-10-13 15:13:19
implementation 'com.google.android.material:material:1.0.0' 我在 Build.gradle 中添加了以下依賴項<com.google.android.material.button.MaterialButton         style="@style/Widget.MaterialComponents.Button.OutlinedButton"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginStart="36dp"         android:layout_marginTop="88dp"         android:background="@drawable/ic_launcher_background"         android:text="Click Me"         android:textColor="@color/colorAccent"         android:textSize="15sp"         app:backgroundTint="#00FFFFFF"         app:iconTint="@color/colorAccent"         app:layout_constraintStart_toStartOf="parent"         app:layout_constraintTop_toTopOf="parent"         app:strokeColor="@color/colorAccent"          />常規按鈕已形成,但應該有一個輪廓按鈕,因為我使用了這種樣式: style=@style/Widget.MaterialComponents.Button.OutlinedButton所選的最低 Api 是否有任何問題或任何其他問題,請幫助我解決這個問題,謝謝
查看完整描述

1 回答

?
Smart貓小萌

TA貢獻1911條經驗 獲得超7個贊

在基礎應用程序主題中使用 Material 組件主題作為父主題。像下面這樣

<!-- Base application theme. -->
<style name="AppTheme" parent="**Theme.MaterialComponents.Light.NoActionBar**">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>


查看完整回答
反對 回復 2023-10-13
  • 1 回答
  • 0 關注
  • 109 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號