[英]Android MaterialButtonGroup Style Change
我正在構建我的第一個 Android 應用程序,遇到了一個看似非常簡單的問題,但我不知道為什么它不起作用。 我正在嘗試使用MaterialButtonGroup ,其中既需要選擇又一次只能選擇一個選項。 XML 是: 里面的兩個按鈕代表一個/或選項(掃描盒或帶有手持掃描儀的單元)。 我創建了兩個 ...
[英]Android MaterialButtonGroup Style Change
我正在構建我的第一個 Android 應用程序,遇到了一個看似非常簡單的問題,但我不知道為什么它不起作用。 我正在嘗試使用MaterialButtonGroup ,其中既需要選擇又一次只能選擇一個選項。 XML 是: 里面的兩個按鈕代表一個/或選項(掃描盒或帶有手持掃描儀的單元)。 我創建了兩個 ...
[英]How to exclude a child composable from parent alpha value change?
在購物清單項目可組合項中,我通過更改其父Row可組合項的 alpha 值來減少整個項目的 alpha 值,但我想排除子Icon可組合項接收父Row的 alpha 更改並保留 100 % 阿爾法值。 我將子Icon上的修飾符設置為alpha(1f) ,但它不起作用。 盡管如此,父級的 alpha 變 ...
[英]How to configure HalfExpanded value in ModalBottomSheetLayout - Jetpack Compose
我只想在HalfExpanded的ModalBottomSheetLayout state 中顯示 30% 而不是 50% 的工作表。 我怎樣才能做到這一點? ...
[英]AppBarLayout and SearchBar exception in Android Studio Design (MDC 1.8.0-rc01)
我添加了一個AppBarLayout ,這個異常出現在 IDE 的 Design 選項卡中。 我使用的是 Android Studio Flamingo Canary 11 和 MDC 1.8.0-rc01。 使用 MDC 1.7.0 修復了布局呈現問題,但我需要 1.8.0,因為我想使用新的 Se ...
[英]In Android Material compose ScrollTabView, shadow comes in the place of onSelected Indicator
我正在嘗試將ScrollableTabRow與 Material Compose 中的Tab一起使用,但未選中的選項卡下方有一個陰影。 如何刪除這個..? 附上預覽截圖和代碼以供參考。 預覽截圖 Material Compose 版本: 1.3.1 (最新) ...
[英]Bottom Sheet not being shown if hiding keyboard
如果我的鍵盤打開,然后單擊按鈕,如果我嘗試隱藏我的鍵盤並將 sheetState 更改為 show() 然后我的鍵盤隱藏但我的工作表不可見。 在 api 調用的結果上模擬打開 sheetState。 注意 - 工作表僅在第一次顯示 ...
[英]I cannot display a badge over a floating action button for my Kotlin Android app
賞金將在 3 天后到期。 此問題的答案有資格獲得+50聲望賞金。 Massimiliano Carosi想讓更多人關注這個問題: 我的問題場景和其他類似(但不相同)的問題有些不清楚,我認為缺乏關於熱門主題在 kotlin 中真正起作用的信息以及為什么主題約束如此棘手我只是想添加一個徽章以在我的浮 ...
[英]How to change the selected background color with the same opacity on MaterialButtonToggleGroup
這是我的 MaterialButtonToggleGroup 的 XML 代碼 輸出是 . 當我選擇一個按鈕時,背景顏色默認是 我的問題是如何更改具有相同不透明度的紫色(大概)顏色? 注意:我找不到任何屬性來更改顏色。 ...
[英]Custom EditText Design with boxes number
有人知道如何用下面的設計(或類似的)制作 EditText 嗎? 感謝您提供的任何幫助。 ...
[英]Android Jetpack Compose: Can't find OutlinedTextField in Empty Compose Activity (Material3)
當我創建新項目和 select“Empty Compose Activity (Material3)”時,我無法使用 OutlinedTextField。 當我創建新項目和 select“Empty Compose Activity”時沒問題 為什么會有不同,我該如何解決? ...
[英]How to remove padding from line shown in NavigationView app menu group item
我已經啟動了默認的 Android 項目“Navigation Drawer Activity”。 我已將主題更改為: 我添加了一個組項目: 水平線左右填充。 我想要 0 填充。 我怎樣才能做到這一點? ...
[英]How to make rounded corners in DrawerLayout straight when switching to Theme.Material3
我已經啟動了默認的 Android 項目“Navigation Drawer Activity”。 我已將主題更改為: 但是抽屜有圓角: 我怎樣才能使這些角再次變直? ...
[英]How to use material 3 Switch in PreferenceFragmentCompat programmatically?
SwitchPreferenceCompat 仍然保留舊的 Switch 樣式,我知道可以通過以下方式為其設置 Material 3 樣式: 主題.xml<style name="Theme.Material3.Preference" parent="Theme.Material3.Day ...
[英]Why in different themes different buttons are created?
我有一個常用的按鈕和一個應用於android:theme AndroidManifest文件中的主題: 當我打開此按鈕並使用調試器停止應用程序以查看已創建的 class 時,我看到以下內容: 如您所見,創建了 AppCompatButton,而不是通常的按鈕AppComapatButton 。 ...
[英]@style/Widget.Material3.Button causing render problem
當我將樣式應用到我的按鈕@style/Widget.Material3.Button時,它會使整個布局設計消失並且布局不再可見。 這是我的 XML 代碼。 有什么解決方案可以解決這個渲染問題嗎? ...
[英]migrate from MaterialComponents to Material 3, how to use my old custom colors for new version of material
我正在嘗試將我當前的應用程序從MaterialComponents遷移到使用 newset 版本Material3我想將我的舊 colors(自定義顏色)用於工具欄和導航抽屜,但我對許多已更改的屬性感到有點困惑,我無法確定哪些屬性我需要做跟隨我的舊 colors 和我在我的應用程序中使用的主題 co ...
[英]I am building a News Application in Android. I have to create a filter for category. I want to create a category component as given in the below image
我不知道我應該用什么來構建這樣的過濾器。 ...
[英]TextInputLayout - Hint padding issue
我在我的應用程序中使用 textInputLayout,但我得到了對提示的額外填充。 誰能幫我嗎。 截屏: Xml 代碼: ...
[英]How to set year limit in MaterialDatePicker dialog Android Studio
我無法設置最大值。 和分鍾。 年在材料設計日期選擇器對話框中,還放置了材料日期選擇器對話框的圖像,其中僅顯示一年。 下面是代碼 ...
[英]How to add subtitle to the LargeTopAppBar in jetpack compose?
我在向TopAppBar Composable添加字幕時遇到問題。 我正在嘗試從Material Design 3實現LargeTopAppBar ,但上面有額外的字幕。 我目前面臨的問題是它渲染了兩次。 下面是我的可組合: 由於某種原因,它渲染了兩次。 我認為這個問題與這個頂部應用欄有 2 種模 ...