android-design-library

How to disable scrolling of NestedScrollView&CollapsingToolbarLayout, for example when there is no more content below?

情到浓时终转凉″ 提交于 2019-12-29 02:33:12
问题 Background I try to add the same functionality as shown on many apps, where the upper area of the screen shrinks&expands according to the scrolled content. For this, I use Google's design library, as shown on the CheeseSquare sample. The problem Thing is, no matter how much content there is in the NestedScrollView , it lets me scroll way below the last view of the content, just to let me see the final state of the actionbar, having the minimal size of itself. In short, this is what I see when

How can I be notified when a Snackbar has dismissed itself?

China☆狼群 提交于 2019-12-28 04:55:09
问题 I'm using a Snackbar from the com.android.support:design:22.2.0 library. I'm using it to undo deletions. To make my life easier, I'm going to make the UI look like things are actually deleted from the data source, and if the undo button in the snack bar is not pressed, actually perform the deletions from the data source. So, I want to know when the Snackbar is no longer visible, so it's safe to delete the items. I can call getView() on the Snackbar, but I'm not sure what listener I should be

Change the font of tab text in android design support TabLayout

一笑奈何 提交于 2019-12-27 13:37:37
问题 I'm trying to work on the new TabLayout from the android design library. I want to change tab text to custom font . And,I tried to search some styling related to TabLayout ,but ended up to this. Please guide how can I change the tab text fonts. 回答1: Create a TextView from Java Code or XML like this <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@android:id/text1"

Android Design Library AppBar Scrolling behavior

寵の児 提交于 2019-12-25 03:34:30
问题 I have an own implementation of the scrolling toolbar in my app. In the new design library from Google http://android-developers.blogspot.de/2015/05/android-design-support-library.html there is a new implementation for scrolling the toolbar. Thats very nice and easy to implement but my problem is there is some limitation. I have a Toolbar and behind there is an image and a tabstrip at the bottom. If i use the new implementation i cant get the toolbar with the image scroll off and the tabstrip

(Design Support Library) CollapsingToolbarLayout How to make it scroll always?

女生的网名这么多〃 提交于 2019-12-24 17:15:12
问题 I'm trying to make a CollapsingToolbarLayout scrolling always even if I don't need to scroll on my view. I have seen something similar in WhatsApp application. Here is a link to see what I want : My code : <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android

Error inflating navigation view from support library

a 夏天 提交于 2019-12-24 15:03:08
问题 I was just trying out the new support library navigation drawer. I read a tutorial and implemented the code as they said. I'm getting this error: Process: myapp.application, PID: 29645 java.lang.RuntimeException: Unable to start activity ComponentInfo{myapp.application/myapp.application.MainActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.design.widget.NavigationView at android.app.ActivityThread.performLaunchActivity(ActivityThread

change TextInputLayout hint position to right

杀马特。学长 韩版系。学妹 提交于 2019-12-23 15:44:41
问题 Is there anyway to put the TextInputLayout hint at right on top of the editText? and also I don't want editText position to be changed.setting the TextInputLayout gravity to right didn't work,Although it changes the editText position. 回答1: TextInputLayout is designed to meet the floating inline labels material design guidelines, which specify that the hint floats along the start of the EditText . 来源: https://stackoverflow.com/questions/32202994/change-textinputlayout-hint-position-to-right

Get parent texInputlayout from child textInputEditText

浪子不回头ぞ 提交于 2019-12-23 09:04:03
问题 I am implementing a functionality to change the case of textInputlayout Hint text to upper case when the hint floats up and vice versa. For that I am using OnFocusChangeListener on its child textInputEditText . To make it easy to implement I am implementing View.OnFocusChangeListener on my activity like: public class LoginActivity extends BaseActivity implements View.OnFocusChangeListener and overriding the method in the activity like: @Override public void onFocusChange(View v, boolean

android design library gradle null pointer exception

无人久伴 提交于 2019-12-23 08:35:08
问题 I'm trying to add android.support.design library to my project: All the interesting things in my gradle file: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:design:22.2.0' compile 'com.android.support:support-annotations:22.0.0' compile 'com.android.support:support-v13:22.1.1' compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.android.support:cardview-v7:22.1.0' } I'm getting Error:Android Gradle Build Target: java.lang

android design library gradle null pointer exception

梦想的初衷 提交于 2019-12-23 08:34:11
问题 I'm trying to add android.support.design library to my project: All the interesting things in my gradle file: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:design:22.2.0' compile 'com.android.support:support-annotations:22.0.0' compile 'com.android.support:support-v13:22.1.1' compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.android.support:cardview-v7:22.1.0' } I'm getting Error:Android Gradle Build Target: java.lang