material-theme

Using a Material-based Dialog Theme with AppCompat

会有一股神秘感。 提交于 2020-01-11 15:37:07
问题 I have an activity in my Manifest I used to style with a Dialog Theme. I can not find how to replace this in AppCompat library. <activity android:name=".LoginActivity" android:theme="@android:styles/Theme.Holo.Dialog" android:configChanges="orientation|screenSize|keyboardHidden" android:label="Login" > Is there a Material-based equivalent? 回答1: There is no material based theme for a dialog in AppCompat yet, see here Will appcompat automatically theme dialogs to look like the Lollipop version?

Material Design backward compatibility

坚强是说给别人听的谎言 提交于 2019-12-17 15:26:24
问题 From examples provided on the Android Developer pages I see that new Views, like the RecyclerView , are backward compatible ( android.support.v7.widget.RecyclerView ). Are all the new things introduced in Material Design backward compatible (to which version)? 回答1: Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions. Support library: v7 appcompat library This library adds support

How to set syntax highlighting for Dart variable in Visual Studio Code

时光毁灭记忆、已成空白 提交于 2019-12-08 11:15:11
问题 I am using Visual Studio Code for coding Dart with Flutter. I installed Dart and Flutter plugins as well as the Material theme from Matta Astorino. The problem is I can't specifically set the syntax highlight of my variables with Dart language using the Material Theme Ocean High Contrast color theme. The settings i used: "editor.tokenColorCustomizations": { "[Material Theme Ocean High Contrast]": { "comments": "#229977", "variables": "#ffffff" } }, -Dart From the picture above, the comments

Trouble implementing Material Theme

时间秒杀一切 提交于 2019-11-30 17:07:40
I am using this as a tutorial to implement the Material Theme to an existing app on pre Android 5.0 devices. My problem is that I am getting a Null Pointer Exception every-time I call getActionBar().something or getSupportActionBar().something . Here is all I have done to implement the Material Theme. In values/styles.xml <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. --> <style name="AppTheme" parent="AppTheme.Base"/> <style name=

Trouble implementing Material Theme

余生长醉 提交于 2019-11-30 16:20:27
问题 I am using this as a tutorial to implement the Material Theme to an existing app on pre Android 5.0 devices. My problem is that I am getting a Null Pointer Exception every-time I call getActionBar().something or getSupportActionBar().something . Here is all I have done to implement the Material Theme. In values/styles.xml <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res

Using Material theme on L preview

只愿长相守 提交于 2019-11-29 01:26:49
问题 The L Developer Preview is currently on API level 20. However, apparently the themes require API level 21. @android:style/Theme.Material.Light.DarkActionBar requires API level 21 Is this a mistake, am I doing something wrong, or is it just not possible to use Material on the L Preview? 回答1: To elaborate on @panini's comments, I'm using this in my build.gradle : android { compileSdkVersion 'android-L' buildToolsVersion '20.0.0' defaultConfig { minSdkVersion 16 targetSdkVersion 'L' versionName

Material Design backward compatibility

こ雲淡風輕ζ 提交于 2019-11-27 17:14:33
From examples provided on the Android Developer pages I see that new Views, like the RecyclerView , are backward compatible ( android.support.v7.widget.RecyclerView ). Are all the new things introduced in Material Design backward compatible (to which version)? Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions. Support library: v7 appcompat library This library adds support for the Action Bar user interface design pattern. This library includes support for material design user

Android design support library with Theme.Material

点点圈 提交于 2019-11-27 07:12:02
问题 I would like to use the new design support library in my application beginning with the API 21. I want to use Theme.Material style but it's work only with Theme.AppCompat style. When I use Theme.Material, android return this error: error inflating class android.support.design.widget.textinputlayout" How can I resolve it ? Thank you in advance Ps: Sorry for my bad english, i'm french. UPDATE: Here is my code styles.xml <style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">