material-design

Android AppCompat 21 Elevation

血红的双手。 提交于 2019-12-17 02:21:29
问题 Is there any way to add elevation to a View in pre-lollipop devices without wrapping them in a CardView ? 回答1: ViewCompat.setElevation(View, int) currently creates no shims. The only way to simulate elevation right now is to apply a shadow pre-v21. Define your style/layout/drawable in values and override it in values-v21 . For buttons I use style overrides. For layouts, I usually go for reference override (use @null to get rid of a drawable). Hopefully in the future an update to the support

Android AppCompat 21 Elevation

孤者浪人 提交于 2019-12-17 02:21:26
问题 Is there any way to add elevation to a View in pre-lollipop devices without wrapping them in a CardView ? 回答1: ViewCompat.setElevation(View, int) currently creates no shims. The only way to simulate elevation right now is to apply a shadow pre-v21. Define your style/layout/drawable in values and override it in values-v21 . For buttons I use style overrides. For layouts, I usually go for reference override (use @null to get rid of a drawable). Hopefully in the future an update to the support

No shadow by default on Toolbar?

做~自己de王妃 提交于 2019-12-17 02:05:08
问题 I'm updating my app with the new Toolbar from the support library v21. My problem is that the toolbar does not cast any shadow if I don't set the "elevation" attribute. Is that the normal behavior or I'm doing something wrong? My code is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res

How to y-offset the Android 5 Lollipop shadow direction

我们两清 提交于 2019-12-14 04:07:57
问题 I used the android material design library to make a tab strip like this. I added a view at the bottom of the screen like so. Right now, I am trying to add the shadow effect from the top widget to the bottom view. I found a solution in the form of an answer to this question. The only way I found to create a top shadow was to modify some of the source of the Android compatibility v7 CardView project. This project brings the CardView class to older Android versions and thus also includes the

Android: make CollapsingToolbarLayout title transparent to avoid overlap with SearchView

南笙酒味 提交于 2019-12-14 04:00:55
问题 I'm facing the same problem described in this SO question (if my searchview is open and I collapse my toolbar, the two overlaps). So I was trying to implement the approved answer, making my title transparent when it is collapsed. Solution is only partially working for me, because I'm having the same problem described in the message n. 11 in the report of this bug here. In short, the color of my title doesn't return to white if the searchview is open when the toolbar is collapsed. This is my

Why Reveal effect not working as per Developer blog

≡放荡痞女 提交于 2019-12-14 03:59:52
问题 I want to have Reveal Effect with in my app. I come to know about it for how it can be implemented. I got the information from the Andoid Developer Blog. But when i have updated that with in my code, it is not showing any effect. I have also try with Demo given by Google to demostrate Reveal effect. But it also not showing the effect. If there any permission i need to add or whats wrong i am doing? My animator is as below: View button = rootView.findViewById(R.id.button); final View shape =

Map and Cardview Activities

好久不见. 提交于 2019-12-14 03:36:35
问题 Is there a way I can have a RecyclerView/Cardview overlaying a maps activity like the example picture I have linked here? Example Image 回答1: Here is the example of what you are trying to achieve: Libraries required: compile 'com.github.ksoichiro:android-observablescrollview:1.5.0' compile 'com.nineoldandroids:library:2.4.0' Sample XML code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com

Morph floating action button into related actions

微笑、不失礼 提交于 2019-12-14 02:47:19
问题 I would like to morph the floating action button into related actions after it is first touched. If one of these buttons gets clicked the corresponding action will be performed and the buttons morph back to the single floating action button. If you touch anywhere else on the screen, no action will be performed and the buttons morph back to the single floating action button. Lets image the example of a simple editor, that implements an action button to create a new file. Clicking this action

How to remove Angular Material Design Menu Box Scroll Bars

余生颓废 提交于 2019-12-14 01:48:55
问题 I have a menu item in the top-right corner of my web app, and the code is below. Problem is, it's wide, and instead of stretching, it just adds a scrollbar to the menu and I tried a bunch of css to fix it but can't seem to figure it out. UPDATE: I've added overflow: hidden !important; as suggested in one of the answers, and that removed the scrollbar, but now it isn't wide enough and so I can't access all the buttons. Tried width: 800px !important with the overflow, but it didn't change the

React material table automatic page size

那年仲夏 提交于 2019-12-13 19:48:24
问题 I am using React + Material Table. Questions I have Is there a way to dynamically set pageSize based on the available space on the page? If there is no API to do so - how to better approach this problem from component design perspective? What am I trying to achieve? The number of rows displayed in a Material Table should depend on screen size. The page will not look similar depending on your screen size (e.g. on laptop device it could look fine, but on 25 inch display there will be a lot of