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
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.view.View; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.Button; | |
| import android.widget.ListView; | |
| public class TransitionThemeActivity extends AppCompatActivity implements View.OnClickListener { |
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 bapspatil.pantheon.utils; | |
| import android.content.Context; | |
| import android.net.ConnectivityManager; | |
| import android.net.NetworkInfo; | |
| import java.io.IOException; | |
| import bapspatil.pantheon.network.RetrofitAPI; | |
| import okhttp3.Cache; |
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 bapspatil.avatarimageview; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Matrix; |
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
| private int numberOfColumns() { | |
| DisplayMetrics displayMetrics = new DisplayMetrics(); | |
| getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); | |
| // You can change this divider to adjust the size of the poster | |
| int widthDivider = 400; | |
| int width = displayMetrics.widthPixels; | |
| int nColumns = width / widthDivider; | |
| return nColumns; | |
| } |
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 class Dog extends RealmObject { | |
| @PrimaryKey private String id; | |
| private int age; | |
| @LinkingObjects("dogs") // <-- ! | |
| private final RealmResults<Person> owners = null; // <-- ! | |
| // getters, setters | |
| } |
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
| import android.content.Context | |
| import android.util.AttributeSet | |
| import android.view.View | |
| import android.widget.LinearLayout | |
| import kotlinx.android.synthetic.main.inc_dec_view.view.* | |
| /** | |
| * Created by Bapusaheb Patil. | |
| */ | |
| class IncDecView : LinearLayout, View.OnClickListener { |
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
| apply plugin: 'com.android.application' | |
| android { | |
| ... | |
| ... | |
| defaultConfig { | |
| ... | |
| versionCode 2000 | |
| ... |
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
| // 'app' module should have the application plugin. | |
| apply plugin: 'com.android.application' | |
| android { | |
| defaultConfig { | |
| ... | |
| // Specify the version code, only once for each new version of your app, for your App Bundle | |
| // No need to have different version codes for different APKs generated. | |
| // All split APKs will share the same version code once installed via Google Play. | |
| versionCode 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:dist="http://schemas.android.com/apk/distribution" | |
| package="your.packagename.feature1"> | |
| <dist:module | |
| dist:onDemand="true" | |
| dist:title="@string/title_feature1"> | |
| <dist:fusing include="true" /> | |
| </dist:module> |
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
| apply plugin: 'com.android.application' | |
| android { | |
| ... | |
| // This specifies the dynamic features. | |
| dynamicFeatures = [":feature1", ":feature2"] | |
| } |