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
/** | |
* Combines/merges Material UI styles so that they may be used on a single | |
* component with the "withStyles" HOC. | |
* | |
* @see {@link https://github.com/mui-org/material-ui/issues/11517#issuecomment-407509327} | |
* @see {@link https://material-ui.com/customization/css-in-js/} | |
* | |
* Usage: | |
* | |
* import { combineStyles } from '/path/to/thisFile'; |
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
/** | |
* SimpleRVAdapter to quickly get started with simple Lists in Recyclerview | |
* | |
* Usage: | |
* | |
* RecyclerView rv = (RecyclerView)findViewById(R.id.rv); | |
* rv.setLayoutManager(new LinearLayoutManager(getContext())); | |
* rv.setAdapter(new SimpleRVAdapter(new String[] {"1", "2", "3", "4", "5", "6", "7"})); | |
* | |
* @author Sheharyar Naseer |
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.gabesechan.android.reusable.receivers; | |
import java.util.Date; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.telephony.TelephonyManager; | |
public abstract class PhonecallReceiver extends BroadcastReceiver { |
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
//src: http://kurrytran.blogspot.ru/2014/05/android-studio-list-of-suppress-warning.html | |
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml | |
//https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml | |
//Most Common Annotations | |
@SuppressWarnings("all") | |
@SuppressWarnings("unchecked") | |
@SuppressWarnings({"JavaDoc"}) | |
@SuppressWarnings({"UnusedDeclaration"}) |
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 class MainActivity extends Activity { | |
private ScreenStateReceiver mReceiver; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_SCREEN_ON); | |
intentFilter.addAction(Intent.ACTION_SCREEN_OFF); |