material-design

intent to activity in Side-Menu.Android of material design

我们两清 提交于 2019-12-09 17:25:55
问题 in https://github.com/Yalantis/Side-Menu.Android please help me :( How can when i click on each item in side menu, go to command "intent to other activity" instead of transport between images import android.content.res.Configuration; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarDrawerToggle; import

Floating Action Button Icon not centered inside

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 17:16:07
问题 I'm trying to use a FAB but the icon inside is placing at bottom right of the button: FAB with icon not centered This is the FAB definition in the xml: <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/centerLocationButton" style="@style/Widget.MaterialComponents.FloatingActionButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android

Snackbar with API 21

心已入冬 提交于 2019-12-09 16:44:54
问题 I'm trying to implement the new Snackbars in my app but I can't. First of all I downloaded the zip file from this SnackBarSampleActivity. I unziped it and then I import it in Eclipse. Now I get an error retrieving parent... for the theme parent in styles.xml . I change it to android:Theme.Light and the error was gone. I right clicked the project and checked isLibrary in Properties/Android, I right clicked my app and in Properties/Android I add the library. Finally I paste the code to show a

Android Material Design

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 12:07:44
问题 Does the new Android Material Design support old version of android such as 3.0 or 2.1? if it supports how would it look like? as a real material design or just as old design? I am about to update my app with material design theme so is there anybody who already has done this? 回答1: As far as material design as a concept goes, yes you can do it all today. Some aspects of it would require a lot more work on your part (for example, imitating the new action bar design guidelines), whereas some

How to make the overflow popup menu avoid obstructing the action bar?

痞子三分冷 提交于 2019-12-09 09:33:54
问题 Background On my app, when I've updated to the new support library and also tried on Lollipop, I've noticed a weird issue: when clicking on the overflow button of the action bar (or even the new Toolbar class) will show the popup menu on top of the action bar, hiding other action items, as such: Here, the action items that got hidden are uninstallation and sharing. The problem I've tried to avoid this issue, by ovverriding the style of the overflow menu, but nothing has helped. Not only that,

How to use selectors to change icons with the new TabLayout

我们两清 提交于 2019-12-09 08:05:50
问题 I'm using the new support TabLayout from Android. The thing is that I wanted to use selectors to change the icon when a tab is selected. I've been looking into the source code and it seems to me that the it never changes the state of the view (and for that reason I can't use the selector). Does anyone knows some workaround? Thank you! 回答1: There is way to set customView as a tab with setCustomView(View view) method. So you can create a textview and set a selector to it and set this view to

Having issues using Android 5.0 Activity transitions onto an activity with a ViewPager

て烟熏妆下的殇ゞ 提交于 2019-12-09 07:54:57
问题 So we're trying to create an across activity image transition from an image in a ListView, to an image in a ViewPager gallery.In doing this transition we're seeing the animation happen before the ViewPager finishes loading/drawing. This causes the image on the ViewPager to flash making the animation look bad. As a test we put an image overtop to fake the look of the ViewPager being loaded. We then transition from the image in the ListView to this 'dummy' ImageView, and then hide it after the

Material design layout_scrollFlags meanings

血红的双手。 提交于 2019-12-09 04:05:38
问题 I find out that we can use cool flags that scroll both toolbar and even content by using layout_scrollFlags . In my case, I have a layout like this: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap

Calculating shadow values for all Material Design elevations

ⅰ亾dé卋堺 提交于 2019-12-09 04:03:34
问题 In the latest Material Design documentation (https://www.google.com/design/spec/what-is-material/elevation-shadows.html#elevation-shadows-elevation-android-) an exhaustive set of UI elements are referenced with their respective elevation (z-index in dp). For example a switch is elevated by 1dp , while a dialog is elevated by 24dp . Currently Google's list of UI elements uses 10 different elevation levels. Since the elevation decides the shadow of the element, we'll need 10 different shadows.

No resource found that matches the given name 'android:Theme.Material'

痞子三分冷 提交于 2019-12-09 03:36:27
问题 After reading this answer, I made RecyclerView ran it on Android 3.0+. But styles.xml in values-v21 still causes the error. Theme. <!-- inherit from the material theme --> <style name="AppTheme" parent="android:Theme.Material"> <!-- Main theme colors --> <!-- your app's branding color (for the app bar) --> <item name="android:colorPrimary">#f00</item> <!-- darker variant of colorPrimary (for status bar, contextual app bars) --> <item name="android:colorPrimaryDark">#0f0</item> <!-- theme UI