material-design

?android:attr/selectableItemBackground not visible enough on a dark background

那年仲夏 提交于 2020-01-22 07:57:07
问题 On Android Lollipop, I'm using: android:background="?android:attr/selectableItemBackground" to have the material animated feedback when I click on a button. It works well when I have a button contained in a white/light layout, like a CardView for example. But when I want to use the same thing on a dark background, we barely see the effect, it is not visible enough. Does someone have an idea? Thank you 回答1: On API 21+ you can set android:theme="@android:style/ThemeOverlay.Material.Dark" on a

?android:attr/selectableItemBackground not visible enough on a dark background

大城市里の小女人 提交于 2020-01-22 07:57:05
问题 On Android Lollipop, I'm using: android:background="?android:attr/selectableItemBackground" to have the material animated feedback when I click on a button. It works well when I have a button contained in a white/light layout, like a CardView for example. But when I want to use the same thing on a dark background, we barely see the effect, it is not visible enough. Does someone have an idea? Thank you 回答1: On API 21+ you can set android:theme="@android:style/ThemeOverlay.Material.Dark" on a

Making a Custom RadioButton

回眸只為那壹抹淺笑 提交于 2020-01-22 02:50:12
问题 I'm trying to make a custom RadioButton like this: I tried making a RadioGroup with three RadioButton in it with the background of the RadioGroup being a rectangle and the background of the RadioButton would be a blue rectangle when checked and white when not but it doesn't seem to be working. <RadioGroup android:id="@+id/Frequency" android:layout_width="370dp" android:layout_height="40dp" android:background="@drawable/radiorectangle" android:orientation="horizontal" app:layout

Translucent navigation bar

爱⌒轻易说出口 提交于 2020-01-17 14:03:06
问题 I want to have the content of my layout being displayed under the navigation bar (also called translucent navigation bar). After reading on the internet, it says all you have to do is add this 2 items to style applied to the activity: <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowTranslucentNavigation">true</item> The result is, that the navigation bar is light gray and not transparent. How do all the people solve this ? 回答1: Problem was

Transition animation for Android using Xamarin Forms

大兔子大兔子 提交于 2020-01-17 08:04:31
问题 Is it possible to implement the transition animation below for Android using Xamarin Forms? What I have is this how to for Android. I tried to implement it with custom renderers but got stuck when I needed to configure the Intent. Also, I read Forms apps run on a single Intent. 回答1: I have developed a plugin to make this type of transitions in xamarin forms (for ios and android). The key is to use a custom NavigationPage. In iOS, you need to implement IUINavigationControllerDelegate and

Transition animation for Android using Xamarin Forms

≡放荡痞女 提交于 2020-01-17 08:04:18
问题 Is it possible to implement the transition animation below for Android using Xamarin Forms? What I have is this how to for Android. I tried to implement it with custom renderers but got stuck when I needed to configure the Intent. Also, I read Forms apps run on a single Intent. 回答1: I have developed a plugin to make this type of transitions in xamarin forms (for ios and android). The key is to use a custom NavigationPage. In iOS, you need to implement IUINavigationControllerDelegate and

Android BottomSheet with FloatButton

烈酒焚心 提交于 2020-01-16 11:16:58
问题 How to make this interaction Bottom sheet and FloatButton like in Google Map? The first screenshot shows two FloatButtons.After clicking on map, the second button change icon and scroll up and hooking on bottomSheet edge.(Screenshot2). First Screenshot Second Screenshot 回答1: I suppose that FAB firstly is anchored to the right|bottom of the MapView and has the same elevation as the BottomSheet view. Once the BottomSheet is peeking to some height and BottomSheet top is equal to the half of the

Android BottomSheet with FloatButton

假如想象 提交于 2020-01-16 11:16:23
问题 How to make this interaction Bottom sheet and FloatButton like in Google Map? The first screenshot shows two FloatButtons.After clicking on map, the second button change icon and scroll up and hooking on bottomSheet edge.(Screenshot2). First Screenshot Second Screenshot 回答1: I suppose that FAB firstly is anchored to the right|bottom of the MapView and has the same elevation as the BottomSheet view. Once the BottomSheet is peeking to some height and BottomSheet top is equal to the half of the

how to set datePickerMode in a fragment?

馋奶兔 提交于 2020-01-16 05:36:07
问题 In the android code ,I use a DatePickerDialog to choose the date.it behaves differently in android material design and the previous versions.So how can I set fix this question to let material design behaves the same as before in java code ? 回答1: Change DatePicker Mode in DatePickerDialog in Lollipop devices Try this, create style in values-v21 <style name="style_date_picker_dialog" parent="Theme.AppCompat.Light.Dialog"> <item name="android:datePickerStyle">@style/style_date_picker</item> <

How do I display events to a specific date and time in a MaterialCalendarView?

随声附和 提交于 2020-01-16 03:50:31
问题 I am testing out a sample app where I am trying to achieve displaying time and date to a specific day.Currently, it just plots to the entire month even if the event if for a day. Say if the event if from 9:30am to 10:30am on Jan 5, it will show up for the entire month, rather than just for Jan 5th. Want to achieve something like this: Currently my app shows it for the whole month, even if its jan 1 or jan 8 event ( here's a screenshot where it wrongly shows up on the week of jan 15 for