Issue I’m trying to call a @Composable function inside an another function but I’m getting the @Composable invocations can only happen from the context of a @Composable function error. I had searched about it but nothing works to me. TaskItem
Continue readingTag: material-ui
Adding a TextInputLayout breaks the Android Studio layout preview, but the apk builds as expected and the app runs without issues
Issue I am trying to make a Material3 application with Android Studio. I was able to successfully add a MaterialButton but when adding a TextInputLayout, the preview fails without even showing an error. This is the snippet that works without
Continue readingHow to put a Divider between DropdownMenu items in Flutter
Issue I have a DropdownMenu and I want to draw a horizontal divider(line) between DropDownMenuEntries. ‘dropdownMenuEntries’ property only expects a List of DropDownMenuEntry Widgets. Any help would be appreciated Solution I achieved the same Dropdown menu using dropdownbutton2. Below is
Continue readingAndroid Compose CircularProgressIndicator crashing with latest material
Issue This is what I use in my top level build.gradle buildscript { ext.kotlin_version = ‘1.9.22’ ext.compose_version = ‘1.5.8’ This is in my app/build.gradle: //compose implementation platform(‘org.jetbrains.kotlin:kotlin-bom:1.8.0’) implementation platform(‘androidx.compose:compose-bom:2023.10.01’) implementation ‘androidx.compose.ui:ui’ implementation ‘androidx.compose.ui:ui-graphics’ implementation ‘androidx.compose.ui:ui-tooling-preview’ implementation ‘androidx.lifecycle:lifecycle-runtime-compose’ implementation "androidx.compose.material:material:1.6.0-rc01" implementation
Continue readingandroid studio – fail to build project after Material dependency upgrade
Issue The requirement is to upgrade all gradle dependencies of an old android app. Managed to upgrade all to latest and is able to build and run the app. When I upgraded the Material dependency from com.google.android.material:material:1.1.0 to the latest
Continue readingAndroid – Chip background color changes when used with BottomSheet Material 3
Issue This is my chip XML code: <com.google.android.material.chip.Chip android:id="@+id/income_type_chip" android:layout_width="0dp" style="@style/Widget.Material3.Chip.Filter" android:layout_height="wrap_content" android:layout_marginTop="24dp" android:layout_marginEnd="16dp" android:layout_marginStart="16dp" android:checkable="true" android:enabled="true" android:text="@string/income_label" app:layout_constraintEnd_toStartOf="@+id/expense_type_chip" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_chainStyle="spread_inside" app:layout_constraintStart_toEndOf="@+id/category_type_label" app:layout_constraintTop_toBottomOf="@+id/category_name_input_layout" /> When I use the same code outside the modal bottom sheet everything is normal: But when
Continue readingFlutter Listen List Object When Any Item Value Change
Issue i have an List item keeping bool values like that: List<bool> isSelectedDiscountValue = [false, false]; isSelectedDiscountValue.listen((selectedIndex)async { await _setValues(selectedIndex); that code return to me flutter the method listen is not defined for the type list error. i was listened
Continue readingMaterial dialog is not displaying buttons corectlly
Issue When app displays dialog with long text via MaterialAlertDialogBuilder buttons are cropped on some devices. my code: MaterialAlertDialogBuilder(requireContext()) .setTitle(getString(R.string.placeholder)) .setMessage(getString(R.string.lorem_ipsum)) .setPositiveButton(getString(R.string.ok)) { dialog, _ -> dialog.dismiss() } .show() How do I make them displayed properly? Screenshot Screenshot from another
Continue readingA new design for the Material Design website has been launched but I can not find the implementation tab, Where did the tab go?
Issue Previously there were 5 tabs, Overview, Specs, Guidelines, Implementation, and Accessibility, But now there are 4 tabs only. I can not find the implementation tab in the new design for the website, Where did the tab go? Solution You
Continue readingHow to disable an animation when Tab is selected in TabLayout android
Issue The grey color appears for fraction of seconds when I touch on TabLayout. how to disable it? Solution The gray color you see after clicking the TabLayout is a ripple color. You can disable that by setting app:tabRippleColor="@null" in
Continue reading