Skip to content

Instantly share code, notes, and snippets.

Avatar
🇰🇷

Sungtae 'James' Lim fobidlim

🇰🇷
View GitHub Profile
View AndroidManifest.xml
<application
...
android:allowBackup="false"
...>
</application>
View AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.github.fobid">
View AndroidManifest.xml
<application
...
android:allowBackup="false"
tools:replace="android:allowBackup"
...>
</application>
@fobidlim
fobidlim / RxEvent.java
Last active Sep 23, 2016
RxEvent class
View RxEvent.java
public class RxEvent {
private static RxEvent mInstance;
private PublishSubject<Object> mSubject;
private RxEvent() {
mSubject = PublishSubject.create();
}
public static RxEvent getInstance() {
View MainActivity.java
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RxEvent.getInstance()
.sendEvent("Android");
}
}
View ReceiveActivity.java
public class ReceiveActivity extends Activity {
private static final String TAG = "ReceiveActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RxEvent.getInstance()
.getObservable()
@fobidlim
fobidlim / ReceiveActivity.java
Created Sep 23, 2016
RxActivity receive Rx event
View ReceiveActivity.java
public class ReceiveActivity extends RxActivity {
private static final String TAG = "ReceiveActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RxEvent.getInstance()
.getObservable()
@fobidlim
fobidlim / RetrofitHelper.java
Last active Nov 21, 2018
Retrofit SSLHandShakeException
View RetrofitHelper.java
public class RetrofitHelper {
private static final String TAG = "RetrofitHelper";
private static RetrofitHelper mInstance;
private Retrofit mRetrofit;
private RetrofitHelper() {
}
public static RetrofitHelper getInstance() {
@fobidlim
fobidlim / MainActivity.java
Last active Sep 28, 2016
ViewPager Activity
View MainActivity.java
public class MainActivity extends AppCompatActivity {
private MainPagerAdapter mPagerAdapter;
private ViewPager mViewPager;
private Button mButton;
private int mSelectedPosition;
@Override
protected void onCreate(Bundle savedInstanceState) {
@fobidlim
fobidlim / BaseFragment.java
Created Sep 28, 2016
BaseFragment abstract
View BaseFragment.java
public abstract class BaseFragment extends Fragment {
protected Context context;
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.context = context;
}