Skip to content

Instantly share code, notes, and snippets.

View tylerjroach's full-sized avatar

Tyler Roach tylerjroach

View GitHub Profile
@tylerjroach
tylerjroach / Retrofit2Client.java
Created September 28, 2016 17:23
Retrofit Singleton Example
package com.tylerjroach.example.retrofit2;
import com.tylerjroach.example.BuildConfig;
import com.tylerjroach.example.util.Constants;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit.RestAdapter;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by tylerjroach on 8/31/16.
*/
public class CameraPermissionsDialogFragment extends DialogFragment{
private final int PERMISSION_REQUEST_CODE = 11;
private Context context;
private CameraPermissionsGrantedCallback listener;
@tylerjroach
tylerjroach / CheatSheet.java
Created April 14, 2016 18:48 — forked from romannurik/CheatSheet.java
Android helper class for showing cheat sheets (tooltips) for icon-only UI elements on long-press. This is already default platform behavior for icon-only action bar items and tabs. This class provides this behavior for any other such UI element.
/*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tylerjroach
tylerjroach / OnePlus One Progress Dialog Issue
Created January 19, 2015 16:23
OnePlus One Progress Dialog Issue
The OnePlus One phone is currently broken for Stre.am using the default "Hexo" theme. This is due to crashes anytime progressDialog.show() or dialog.show() is called. I can assure you the dialogs are being properly created as it works on every other phone, as well as using a different theme than "Hexo" on the OnePlus One. I'm not sure where the root cause lies. I actually extracted out the "Hexo" theme from the OnePlus One and placed it on a CM11 Galaxy S3 and it didn't cause any crashes.
I tried to build a test app to replicate the issue, but I am unable to. The only thing I think could be the cause would be that we are using Multidex due to many large multimedia libraries in our app. I wouldn't think this would cause an issue, but this may be something to investigate. I found other people were having an issue here:
https://github.com/WhisperSystems/RedPhone/issues/332
Here are some stacktraces that I've pulled.
//Caused from a progress dialog
android.view.InflateException: Binary XML file line #38: Erro