This file contains hidden or 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
| buildTypes { | |
| debug { | |
| buildConfigField “String”, “BASE_URL”, “\”http://api-staging.com/\"" | |
| } | |
| release { | |
| buildConfigField “String”, “BASE_URL”, “\”https://api.com/\"" | |
| debuggable false | |
| proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ | |
| signingConfig signingConfigs.config | |
| } |
This file contains hidden or 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 static final String BASE_URL = BuildConfig.BASE_URL; |
This file contains hidden or 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
| android { | |
| buildTypes { | |
| release { | |
| debuggable false | |
| shrinkResources true | |
| proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’ | |
| signingConfig signingConfigs.config | |
| } | |
| } | |
| } |
This file contains hidden or 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
| dependencies { | |
| releaseCompile ‘com.google.firebase:firebase-crash:9.6.1’ | |
| } |
This file contains hidden or 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
| class ExampleActivity extends Activity { | |
| @State int mSelectedPosition; // This will be automatically saved and restored | |
| @Override public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| Icepick.restoreInstanceState(this, savedInstanceState); | |
| } | |
| @Override public void onSaveInstanceState(Bundle outState) { | |
| super.onSaveInstanceState(outState); |
This file contains hidden or 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
| class ExampleActivity extends Activity { | |
| @BindView(R.id.title) TextView mTitleTextView; | |
| @Override public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.example_activity); | |
| ButterKnife.bind(this); | |
| mTitleTextView.setText("Hello World"); | |
| } |
This file contains hidden or 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
| class ExampleActivity extends Activity { | |
| private ActivityExampleBinding mBinding; | |
| @Override public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| mBinding = DataBindingUtil.setContentView(this, R.layout.example_activity); | |
| mBinding.title.setText("Hello World"); | |
| } | |
| } |
This file contains hidden or 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
| <!-- Base application theme. --> | |
| <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
| <item name="android:layout_width">wrap_content</item> | |
| <item name="android:layout_height">wrap_content</item> | |
| </style> |
This file contains hidden or 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
| <application | |
| android:icon="@mipmap/ic_launcher" | |
| android:label="@string/app_name" | |
| android:theme="@style/AppTheme"> | |
| ... | |
| </application> |
This file contains hidden or 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.dummyapp; | |
| import android.os.Bundle; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.util.Log; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.EditText; | |
| import java.util.List; |
OlderNewer