- Clone https://github.com/facebook/stetho
- Launch the app
$ cd stetho-master/scripts
<!-- Clickable and selectableItemBackground are optional --> | |
<RelativeLayout | |
android:id="@+id/two_line_item" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?selectableItemBackground" | |
android:clickable="true" | |
android:minHeight="72dp" | |
android:paddingEnd="?listPreferredItemPaddingRight" | |
android:paddingLeft="?listPreferredItemPaddingLeft" |
# Built application files | |
*.apk | |
*.ap_ | |
*.jar | |
# Do not remove ('app' = app's module name) | |
!gradle/wrapper/gradle-wrapper.jar | |
!app/libs/**/*.jar | |
# Files for the dex VM |
public class SmsReceiver extends BroadcastReceiver { | |
public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED"; | |
private static final String KEY_PDUS = "pdus"; | |
@Override public void onReceive(final Context context, final Intent intent) { | |
if (getActionFromIntent(intent).equals(SMS_RECEIVED_ACTION)) { | |
final Intent smsServiceIntent = new Intent(context, SmsService.class); | |
smsServiceIntent.putExtra(SmsService.KEY_SMS, getSmsFromIntent(intent)); |
public class RxFirebaseUtils { | |
public static <T> Observable<T> observeTask(final Task<T> task) { | |
return Observable.<T>create(subscriber -> RxHandler.assignOnTask(subscriber, task)).observeOn( | |
Schedulers.io()); | |
} | |
public static Observable<List<DataSnapshot>> join(final DatabaseReference keysRef, | |
final DatabaseReference objectsRef) { | |
return RxFirebaseDatabase.observeValueEvent(keysRef) |
$ cd stetho-master/scripts
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: | |
----------- |
import android.content.Context; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.AppCompatImageView; | |
import android.util.AttributeSet; | |
import android.widget.Checkable; | |
public class CheckableImageView extends AppCompatImageView implements Checkable { | |
private boolean checked; | |
private boolean broadcasting; |