material-design

How to add listView inside cardView android?

ε祈祈猫儿з 提交于 2019-12-06 11:36:09
Forgive me for any mistakes. I'm a beginner. Can anyone please explain how to create a listview inside a cardview layout in android. Example settings app in android 6.0 I wanna create a scrollable cardview layout with listview items in each cardview layout. I have searched enough online and nothing seems to help me. If you have any solution this it would be helpful for me. The best way to do this is using a RecyclerView with a vertical LinearLayoutManager (which will look the the same as a ListView but with better performance) and a fixed size inside your CardView . The xml for your CardView

How to properly style material buttons in android

笑着哭i 提交于 2019-12-06 11:00:56
问题 I am going after flat buttons for my example, but the question really applies to all buttons. Why does it seem so hard to find documentation on the proper way to style material buttons in android. I have the following which I messed around with until I could get it to work. Felt like a hack so I am not sure if this is really the right way to do it. <Button android:id="@+id/apply" style="?android:attr/borderlessButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap

Cannot resolve findViewByID in AppCompatActivity

浪尽此生 提交于 2019-12-06 09:52:50
I'm following this tutorial: Android Material Design Using Tabs Infos: Android API Level 21 Dependecies are added to graddle file compile 'com.android.support:appcompat-v7:23.0.1' and compile 'com.android.support:design:23.0.1' } The method "findViewById" cannot be resolved. I tried to follow this answer Cannot resolve method 'findViewById(int)' in Fragment , but this AppCompatActivity use OnCreateBundle instead OnCreateView, then i can't get the View object... What is wrong with this code ? I'm missing some import? package info.androidhive.materialtabs.activity; import android.os.Bundle;

How to align Material buttons with other UI elements

北城以北 提交于 2019-12-06 08:54:08
问题 I have trouble to align default material buttons with other elements of the UI. In fact I have looked at the Android source code and the background for the buttons contains insets to be able to draw the shadow and deal with the elevation of the button when clicked: <inset xmlns:android="http://schemas.android.com/apk/res/android" android:insetLeft="@dimen/abc_button_inset_horizontal_material" android:insetTop="@dimen/abc_button_inset_vertical_material" android:insetRight="@dimen/abc_button

Can't apply a colorFilter to text selection handles

[亡魂溺海] 提交于 2019-12-06 08:09:13
I'm trying to bring material text selection handles to my app. I got drawables from the SDK for middle/right/left handle (bitmaps) and text cursor (9-patch), and set: <item name="android:textSelectHandleLeft">@drawable/text_select_handle_left_mtrl_alpha</item> <item name="android:textSelectHandleRight">@drawable/text_select_handle_right_mtrl_alpha</item> <item name="android:textSelectHandle">@drawable/text_select_handle_middle_mtrl_alpha</item> <item name="android:textCursorDrawable">@drawable/text_cursor_mtrl_alpha</item> It works as expected. However, in Lollipop these drawables are tinted

Radio buttons and checkbox is not working in material design

耗尽温柔 提交于 2019-12-06 08:06:04
Bootstrap material design checkbox, radio buttons and toggle buttons are not getting styled according to material design in the below code, Please help me. <link href="css/bootstrap-material-design.min.css" rel="stylesheet" /> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> <link href="css/jquery-ui.min.css" rel="stylesheet" /> <link href="css/bootstrap.min.css" rel="stylesheet" /> <link href="css/material-fullpalette.min.css" rel="stylesheet" /> <link href="css/ripples.min.css" rel="stylesheet" /> <link href="css/material-design-iconic-font.min.css"

NavigationView and Translucent Status Bar

白昼怎懂夜的黑 提交于 2019-12-06 07:24:31
I followed all the tips on SO on how to achieve this and no success so far... I would like to have a Semi-transparent/transparent (not sure of the difference) status bar. UPDATE 25/03/16: I tried all kinds of Theme attributes without progress. Updated question with what I attempted for the v21 styles file and a Bounty . Does anyone have an idea? fitSystemWindows is set in both my DrawerLayout and NavigationView in the xml: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id

Toolbar behind status bar

两盒软妹~` 提交于 2019-12-06 07:15:22
问题 I had a problem with toolbar and status bar. I change the app styles to AppCompat. My styles are: for values/styles.xml <style name="AppTheme" parent="Theme.AppCompat"> <item name="colorPrimary">@color/color_primario_500</item> <item name="colorPrimaryDark">@color/color_primario_500</item> <item name="android:windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> for values-v21/styles.xml: <style name="AppTheme" parent="AppTheme

Android L — Play Ripple Effect on View

十年热恋 提交于 2019-12-06 07:14:40
I am trying to play a ripple effect (from Android L) on a view at a certain time (not on the view being touched). To be specific, when the user successfully changes some text, I want a certain view to play a green ripple effect to show success. Is there any way to do this? I have tried putting a RippleDrawable in an Animation, putting the RippleDrawable as the background for my "success view." But, I can't figure out how to play the ripple animation as I have described. P.S. My project is Android L only right now, so I am not worried about backwards compatibility. Since your mask is just a

LinearProgressIndicator Flutter Usage

这一生的挚爱 提交于 2019-12-06 06:13:21
问题 I am learning Flutter allthought i dont know if it is right decition or not. Any way i want to use LinearProgressIndicator Component from Material Librery but i didnt get how to use it i tried this code: import 'dart:async'; import 'package:flutter/material.dart'; void main() { runApp(new MaterialApp( debugShowCheckedModeBanner: false, home: new MyApp(), )); } class MyApp extends StatefulWidget { @override MyAppState createState() => new MyAppState(); } class MyAppState extends State<MyApp> {