material-design

Android: Scrolling issues with recyclerview inside a viewpager

折月煮酒 提交于 2019-12-05 09:58:54
I have a RecyclerView inside a ViewPager that only occupies the bottom half of the screen, and what I want to do is have the entire screen scroll if the RecyclerView s received a vertical scroll event. UI hierarchy in a nutshell: CoordinatorLayout --- AppBarLayout --- Toolbar --- Bunch of static LinearLayouts, occupy most of screen --- TabLayout --- ViewPager --- Fragments with RecyclerView What I have : To my understanding, a RecyclerView is memory-efficient and tries to fit itself in whatever space is available in the screen. In my app, I have a ViewPager hosting multiple tabs, each of which

How to write CSS keyframes to indeterminate material design progress bar

大憨熊 提交于 2019-12-05 08:47:34
I want to make an indeterminate progress bar as in material design (the second one) in CSS3 in a web page. Can anyone share the necessary CSS magic? I want it to behave exactly the same as on the video, so one end is accelerating while the other is slowing down until they switch. I could not find any existing example that would work this way. Rooster212 I found a good example on CodePen. In case the link goes down, here is the code: body{ background:#ffffff; margin:50px 300px; } .slider{ position:absolute; width:1000px; height:5px; overflow-x: hidden; } .line{ position:absolute; opacity: 0.4;

Creating a custom popup dialog menu

和自甴很熟 提交于 2019-12-05 06:13:14
I'm currently trying to achieve popup menu on menu button click as shown in following screen: I tried popupwindow methods but couldn't achieve the exact case. This is how I'm trying: private View.OnClickListener showPopupWindow() { return new View.OnClickListener() { @Override public void onClick(View v) { PopupWindow popUp = popupWindowsort(); popUp.showAsDropDown(v, 1, 1); // show popup like dropdown list } }; } private PopupWindow popupWindowsort() { // initialize a pop up window type popupWindow = new PopupWindow(context); ArrayList<String> sortList = new ArrayList<String>(); sortList.add(

CoordinatorLayout does not hide Toolbar on scrolling despite implementing all required parameters

拥有回忆 提交于 2019-12-05 05:04:44
Here is my setup, i am running a DrawerLayout , within it is a CoordinatorLayout containing an AppBarLayout and a nestedscrollview . I am trying to have the nestedscrollview scroll normally and the Toolbar to get hidden on scrolling down and reppear on scrolling up. Attached within is my XML code. Would appreciate any help.. have read all related questions and implemented their answers without any success. <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/drawer_layout_admin"

Angularjs with material design Failed to instantiate module ngMaterial

我是研究僧i 提交于 2019-12-05 04:43:59
I have installed angularjs and materialjs using bower. bower install angular-material And injected 'ngMaterial' into my app but getting this error. Uncaught Error: [$injector:modulerr] Failed to instantiate module demoApp due to: Error: [$injector:modulerr] Failed to instantiate module ngMaterial due to: Error: [$injector:modulerr] Failed to instantiate module material.core due to: Error: [$injector:unpr] Unknown provider: $mdUtilProvider Any Help. I had the same problem until I changed my angular version from 1.2.28 to 1.3.0 in my bower.json file. See if your angular version is less than 1.3

How to set Floating Action Button image to fill the button?

有些话、适合烂在心里 提交于 2019-12-05 03:46:07
Usually icons are set for floating action buttons, but I need to set an image, so I can make a circular image. I added it to the project (using Android Studio-> New -> Image Asset), but the image didn't fill the entire button: My xml: <com.github.clans.fab.FloatingActionMenu android:id="@+id/run_menu" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:paddingBottom="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:visibility="visible" fab:fab_colorNormal="#DA4336" fab:fab_colorPressed="#E75043" fab:fab

What is the difference between Theme.AppCompat and Theme.Material in Android?

非 Y 不嫁゛ 提交于 2019-12-05 03:32:31
In My case, what is difference in here: <style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar"> and <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="android:Theme.*"> This is the raw Material design theme, designed for Android 5+ <style name="AppTheme" parent="Theme.AppCompat.*"> This is a way to use material design on pre-lollipop devices(thus app compatibility). You can design for newer API's using AppCompat and as such have it work on earlier API levels than what the starting API level is. In this case, it means you can

Primary color (sometimes) goes transparent

馋奶兔 提交于 2019-12-05 03:23:35
I am developing with the latest SDK version (API 21) and Support Library 21.0.2 and I've been having trouble when trying to implement the new Material Design guidelines. Material Design says that I need to have my primary color and my accent color and apply them over my app. But sometimes when I open the app the primary color becomes transparent in some widgets, it goes back to normal until I close the app (with the Back Button) and launch it again. Here is an example of the primary color being transparent in my toolbar. I am using Teal 500 as my primary color and, as you can see, it is

LinearLayout overlapping Support CoordinatorLayout

雨燕双飞 提交于 2019-12-05 02:52:46
It's the first time I use CoordinatorLayout, and I don't really understand how it works. My LinearLayout is overlapping my Toolbar, as if I were in a FrameLayout, or RelativeLayout, and I don't know how to tell it to go below ( Like android:layout_below with RelativeLayout ) Here is my code: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget

Why should I start using Google Material Design Lite instead of Twitter Bootstrap or Foundation

…衆ロ難τιáo~ 提交于 2019-12-05 02:42:55
Disclaimer: I don't want to start any fight against Google Fanboys . I'm just asking because I didn't find a direct answer to my question and maybe someone who already started working with it (or any googledev) can give advice. Google recently announced Material Design Lite 1.0 and the project has been starred over 9k times on Github in a few days. I read some posts [ 1 , 2 ] comparing MDL vs Twitter Bootstrap and I don't understand why anyone outside Google's headquarters should consider start working with it. As they said: “We challenged ourselves to create a visual language for our users