material-design

CoordinatorLayout leaves empty space at the bottom after scrolling

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:11:17
问题 I am trying to implement Google's newest design tricks with CoordinatorLayout and have problems with scrolling and parallax effect. After Activity is displayed, everything looks ok but the problem occurs when I try to scroll. It seems the bottom View is not expanded correctly and after it's scrolled up, empty space appears below. Bottom View seems to be big only how much it has on initial display between top View and nav bar. It looks something like this: Relevant code: <FrameLayout xmlns

FloatingActionButton setVisibility() not working

五迷三道 提交于 2019-12-03 11:09:49
I can't hide my FloatingActionButton . Here is my code: XML: <CoordinatorLayout> <AppBarLayout android:id="@+id/appbar"> <CollapsingToolbarLayout> <ImageView/> <android.support.v7.widget.Toolbar /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" app:layout_anchor="@id/appbar" app:layout_anchorGravity="bottom|right|end"/> </CoordinatorLayout> And I'm calling: fab.clearAnimation(); fab.setVisibility(View.GONE); I'm trying to hide the FAB, but it seems that setVisibility + clearAnimation does not work if the

How to create floating action button transforming into a single sheet of material

六眼飞鱼酱① 提交于 2019-12-03 10:44:16
I'm trying to see if any in-build animation exist on the design library to create floating action button transforming into single material sheet like shown in the material design image https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B8v7jImPsDi-TjBicTdvQjg4M1E/components-buttons-fab-transition_card_02.webm Have you tried https://github.com/gowong/material-sheet-fab , it's part of the Android arsenal? 来源: https://stackoverflow.com/questions/33093198/how-to-create-floating-action-button-transforming-into-a-single-sheet-of-materia

How to change material TextInputLayout OutlinedBox unfocused Color

喜你入骨 提交于 2019-12-03 10:14:54
问题 I have an OutlinedBox TextInputLayout and I want to change the box color in the unfocused mode of editText. How can I do that? 回答1: In the theme Add colorOnSurface attribute and assign any color you want <style name="Apptheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <!-- General theme colors --> <item name="colorPrimary">@color/material_green_500</item> <item name="colorSecondary">@color/material_green_600</item> <item name="colorAccent">@color/illiniColorAccent</item> <item name

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

倖福魔咒の 提交于 2019-12-03 10:04:24
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 transition is complete. This helped but still didn't create a smooth experience since things would

How to remove auto padding of FAB button in android?

人走茶凉 提交于 2019-12-03 09:43:03
问题 I am using FAB button for profile picture but it is already having some padding. I am using following code for creating FAB button. <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="120dp" android:layout_height="120dp" android:layout_margin="@dimen/fab_margin" android:src="@drawable/student" app:layout_anchor="@id/app_bar" app:layout_anchorGravity="bottom|end"/> How can i remove the padding which is automatically providing by library. I have also

Material Design: Add circular reveal animation while switching between toolbars

走远了吗. 提交于 2019-12-03 08:56:19
I was reading the "Selection" section in material design guidelines ( https://material.io/guidelines/patterns/selection.html ), and one effect i wanted to add in my app was the circular reveal animation while switching between the app bar and the ActionMode ? An other toolbar ? Here is an example from the guidelines: https://storage.googleapis.com/material-design/publish/material_v_10/assets/0Bwp7jtSjaW36RGF3eUFsRkdqU1U/patterns_selection_item_controlling_desktop_click.webm I didn't found any explanations about how to do that. I do not even know if they use an ActionMode or something else...

how to write css for a specific breakpoint in angular material

我是研究僧i 提交于 2019-12-03 08:52:08
问题 I am trying to write CSS for a div, that should apply only when a particular breakpoint is hit, eg. sm, md or lg. I'm using angular-material (https://material.angularjs.org). I know that this can be done using media queries @media (max-width: 480px) { ... } but i'm looking for a angular-material way of doing this. 回答1: I'm using the $mdMedia service for that, see: https://material.angularjs.org/latest/#/api/material.core/service/$mdMedia Additionally you can use it in a template directly e.g.

Material Design checklist: hiding app bar on scroll?

送分小仙女□ 提交于 2019-12-03 08:27:51
问题 Per the new Android Material Design checklist: http://android-developers.blogspot.com/2014/10/material-design-on-android-checklist.html Where appropriate, upon scrolling down, the app bar can scroll off the screen, leaving more vertical space for content. Upon scrolling back up, the app bar should be shown again. I realize there are lots of questions/answers to implement this behavior for the ICS-style app bar, but I'm curious if the new Toolbar widget or Lollipop/AppCompat 21 have introduced

How to implement Search Bar like gmail app in android? [closed]

帅比萌擦擦* 提交于 2019-12-03 08:26:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am trying to implement the Search functionality in my android app similar to latest gmail app (search icon in the action bar). On tapping the Search icon, the action bar turns into a search field with a back button on the left side, and a microphone button on the right side. I want to have the same component