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
<declare-styleable name="CategoryTheme"> | |
<attr name="light_base" format="color" /> | |
<attr name="base" format="color" /> | |
<attr name="light" format="color" /> | |
<attr name="ultra_light" format="color" /> | |
<attr name="medium_dark" format="color" /> | |
<attr name="dark" format="color" /> | |
<attr name="ultra_dark" format="color" /> | |
</declare-styleable> |
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"?> | |
<resources> | |
<declare-styleable name="ColourPalette"> | |
<attr name="light_base" format="color" /> | |
<attr name="base" format="color" /> | |
<attr name="light" format="color" /> | |
<attr name="ultra_light" format="color" /> | |
<attr name="medium_dark" format="color" /> | |
<attr name="dark" format="color" /> |
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"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="360dp" | |
android:height="230dp" | |
android:viewportWidth="360" | |
android:viewportHeight="230"> | |
<path | |
android:fillColor="?attr/medium_dark" | |
android:pathData="..." /> |
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 CardDetailActivity extends AppCompatActivity { | |
public static final String EXTRA_CARD = "card"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Card card = getIntent().getParcelableExtra(EXTRA_CARD); | |
setTheme(card.category.getThemeId()); |
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 void setSnackBar(View coordinatorLayout, String snackTitle) { | |
Snackbar snackbar = Snackbar.make(coordinatorLayout, snackTitle, Snackbar.LENGTH_SHORT); | |
snackbar.show(); | |
View view = snackbar.getView(); | |
TextView txtv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text); | |
txtv.setGravity(Gravity.CENTER_HORIZONTAL); | |
} |
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 ConnectivityReceiver | |
extends BroadcastReceiver { | |
public static ConnectivityReceiverListener connectivityReceiverListener; | |
public ConnectivityReceiver() { | |
super(); | |
} | |
@Override |
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 java.io.IOException; | |
import okhttp3.Interceptor; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
import okhttp3.Response; | |
import okhttp3.logging.HttpLoggingInterceptor; | |
import retrofit2.Retrofit; |
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.example.android.popularmoviesstageone; | |
import timber.log.Timber; | |
/** | |
* Created by akshayshahane on 05/08/17. | |
*/ | |
public class PopularMoviesApplication extends android.app.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
android:clickable="true" | |
android:background="?attr/selectableItemBackground" |
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
* | |
Set yourself up: | |
1) Install SDKMAN - http://sdkman.io/ | |
2) Install Groovy: sdk install groovy | |
3) Start the groovy console by typing: groovyConsole | |
*/ | |
// Single line comments start with two forward slashes |