Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab43ce7794 |
@@ -5,10 +5,12 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.software.leanback"
|
android:name="android.software.leanback"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.touchscreen"
|
||||||
|
android:required="false" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -32,7 +34,6 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
@@ -43,11 +44,4 @@
|
|||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.software.leanback"
|
|
||||||
android:required="false" />
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.touchscreen"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class ChannelAdapter extends RecyclerView.Adapter<ChannelAdapter.ChannelV
|
|||||||
holder.itemView.setOnFocusChangeListener((v, hasFocus) -> {
|
holder.itemView.setOnFocusChangeListener((v, hasFocus) -> {
|
||||||
float scale = hasFocus ? 1.08f : 1f;
|
float scale = hasFocus ? 1.08f : 1f;
|
||||||
v.animate().scaleX(scale).scaleY(scale).setDuration(120).start();
|
v.animate().scaleX(scale).scaleY(scale).setDuration(120).start();
|
||||||
|
v.setSelected(hasFocus);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
package com.streamplayer;
|
package com.streamplayer;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class ChannelRepository {
|
public final class ChannelRepository {
|
||||||
|
|
||||||
private static final List<StreamChannel> CHANNELS = Collections.unmodifiableList(Arrays.asList(
|
private static final List<StreamChannel> CHANNELS = createChannels();
|
||||||
|
|
||||||
|
private static List<StreamChannel> createChannels() {
|
||||||
|
List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
|
||||||
new StreamChannel("ESPN", "https://streamtpmedia.com/global2.php?stream=espn"),
|
new StreamChannel("ESPN", "https://streamtpmedia.com/global2.php?stream=espn"),
|
||||||
new StreamChannel("ESPN 2", "https://streamtpmedia.com/global2.php?stream=espn2"),
|
new StreamChannel("ESPN 2", "https://streamtpmedia.com/global2.php?stream=espn2"),
|
||||||
new StreamChannel("ESPN 3", "https://streamtpmedia.com/global2.php?stream=espn3"),
|
new StreamChannel("ESPN 3", "https://streamtpmedia.com/global2.php?stream=espn3"),
|
||||||
@@ -73,7 +78,10 @@ public final class ChannelRepository {
|
|||||||
new StreamChannel("TUDN MX", "https://streamtpmedia.com/global2.php?stream=TUDNMX"),
|
new StreamChannel("TUDN MX", "https://streamtpmedia.com/global2.php?stream=TUDNMX"),
|
||||||
new StreamChannel("FUTV", "https://streamtpmedia.com/global2.php?stream=futv"),
|
new StreamChannel("FUTV", "https://streamtpmedia.com/global2.php?stream=futv"),
|
||||||
new StreamChannel("LaLiga Hypermotion", "https://streamtpmedia.com/global2.php?stream=laligahypermotion")
|
new StreamChannel("LaLiga Hypermotion", "https://streamtpmedia.com/global2.php?stream=laligahypermotion")
|
||||||
));
|
));
|
||||||
|
channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
|
||||||
|
return Collections.unmodifiableList(channels);
|
||||||
|
}
|
||||||
|
|
||||||
private ChannelRepository() {
|
private ChannelRepository() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,39 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#88003C8F" />
|
||||||
|
<corners android:radius="18dp" />
|
||||||
|
<stroke
|
||||||
|
android:width="3dp"
|
||||||
|
android:color="#FFFFFFFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
<item android:state_focused="true">
|
<item android:state_focused="true">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#66FFFFFF" />
|
<solid android:color="#55003C8F" />
|
||||||
<corners android:radius="16dp" />
|
<corners android:radius="18dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="3dp"
|
||||||
android:color="#FFFFFFFF" />
|
android:color="#FFFFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:state_pressed="true">
|
<item android:state_pressed="true">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#55FFFFFF" />
|
<solid android:color="#55003C8F" />
|
||||||
<corners android:radius="16dp" />
|
<corners android:radius="18dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="3dp"
|
||||||
android:color="#FFFFFFFF" />
|
android:color="#FFFFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#33212121" />
|
<solid android:color="#33212121" />
|
||||||
<corners android:radius="16dp" />
|
<corners android:radius="18dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="1dp"
|
android:width="2dp"
|
||||||
android:color="#55FFFFFF" />
|
android:color="#33FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
android:background="@drawable/bg_channel_item_selector"
|
android:background="@drawable/bg_channel_item_selector"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
|
android:defaultFocusHighlightEnabled="true"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|||||||
15
app/src/main/res/values/arrays.xml
Normal file
15
app/src/main/res/values/arrays.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string-array name="channel_entries">
|
||||||
|
<item>Azteca Deportes</item>
|
||||||
|
<item>Canal 5 MX</item>
|
||||||
|
<item>Caliente TV MX</item>
|
||||||
|
<item>DAZN 1</item>
|
||||||
|
<item>DAZN 2</item>
|
||||||
|
<item>DAZN LaLiga</item>
|
||||||
|
<item>DSports</item>
|
||||||
|
<item>DSports 2</item>
|
||||||
|
<item>DSports Plus</item>
|
||||||
|
<item>ESPN</item>
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user