This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class FixedHoloDatePickerDialog extends DatePickerDialog { | |
public FixedHoloDatePickerDialog(Context context, OnDateSetListener callBack, | |
int year, int monthOfYear, int dayOfMonth) { | |
super(context, callBack, year, monthOfYear, dayOfMonth); | |
// Force spinners on Android 7.0 only (SDK 24). | |
// Note: I'm using a naked SDK value of 24 here, because I'm | |
// targeting SDK 23, and Build.VERSION_CODES.N is not available yet. | |
// But if you target SDK >= 24, you should have it. | |
if (Build.VERSION.SDK_INT == 24) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.brunodles.toastespresso; | |
import android.support.test.rule.ActivityTestRule; | |
import android.support.test.runner.AndroidJUnit4; | |
import android.test.suitebuilder.annotation.LargeTest; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
All Clickable Views: | |
----------- | |
* ripple effect (Lollipop only) -- "colorControlHighlight" | |
Status Bar: | |
------------ | |
* background (Lollipop only) - "colorPrimaryDark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mItemHeaderDescribe.setText(Strings.nullToEmpty(mMediaAlbum.description)); | |
ViewTreeObserver vto = mItemHeaderDescribe.getViewTreeObserver(); | |
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { | |
private int maxLines = -1; | |
@Override | |
public void onGlobalLayout() { | |
if (maxLines < 0 && mItemHeaderDescribe.getHeight() > 0 && mItemHeaderDescribe.getLineHeight() > 0) { | |
int height = mItemHeaderDescribe.getHeight(); | |
int lineHeight = mItemHeaderDescribe.getLineHeight(); |