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
ext.libPacks = [ | |
retrofit : { | |
implementation libraries.retrofitBase | |
implementation libraries.retrofitRxAdapter | |
implementation libraries.retrofitMoshiConverter | |
}, | |
glide : { | |
implementation libraries.glideBase | |
annotationProcessor libraries.glideAnnotations | |
} |
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
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation libraries.kotlinJdk7 | |
implementation libraries.appCompat | |
implementation libraries.constraintLayout | |
libPacks.retrofit | |
libPacks.glide | |
testImplementation libraries.jUnit |
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
ext.versions = [ | |
retrofitVersion : "2.5.0", | |
glideVersion : "4.9.0" | |
] | |
ext.libraries = [ | |
retrofitBase : "com.squareup.retrofit2:retrofit:$versions.retrofitVersion", | |
retrofitRxAdapter : "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofitVersion", | |
retrofitMoshiConverter : "com.squareup.retrofit2:converter-moshi:$versions.retrofitVersion", | |
glideBase : "com.github.bumptech.glide:glide:$versions.glideVersion", |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@drawable/ic_bookmark" | |
android:gravity="top|right" | |
android:top="16dp" android:bottom="16dp" | |
android:right="16dp" android:left="16dp" /> | |
</layer-list> |
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
private fun overlayImage(resourceId:Int) { | |
val viewOverlay = target.overlay | |
val drawable = ResourcesCompat.getDrawable(resources, resourceId, null) | |
drawable!!.bounds = Rect( | |
0, | |
0, | |
target.width, | |
target.height | |
) | |
viewOverlay.add(drawable) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:drawable="@color/darkBkg" /> | |
<item android:drawable="@drawable/ic_play" /> | |
</layer-list> |
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 interface IObserver { | |
void update(); | |
} |
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 void createFragmentForMediaItemType(MediaItem item){ | |
Fragment fragment; | |
switch(item.type){ | |
case Generic: | |
fragment = MediaItemDetailFragment.create(item); | |
break; | |
case Movie: | |
break; | |
case TV: | |
break; |
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
<color name="themeDarkText">#EAF3F2</color> | |
<color name="themeDarkContainer">#5B5B5B</color> | |
<color name="themeDarkBg">#1E1E1E</color> | |
<color name="themeLightText">#000</color> | |
<color name="themeLightContainer">#E9E9E9</color> | |
<color name="themeLightBg">#fff</color> |
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 List<MediaItem> sortByName(List<MediaItem> items){ | |
List<MediaItem> newList = new LinkedList<>(); | |
//Initialize a map and array to store the values of the title & item | |
HashMap<String, MediaItem> map = new HashMap<>(); | |
String[] titles = new String[items.size()]; | |
for(int i = 0; i < items.size(); i++){ | |
MediaItem item = items.get(i); | |
map.put(item.title, item); |
NewerOlder