Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
YouROK committed Oct 3, 2019
2 parents 9c58c67 + 5bb225f commit 5db5837
Show file tree
Hide file tree
Showing 19 changed files with 68 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.support.v4.content.ContextCompat
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.DividerItemDecoration
import android.support.v7.widget.LinearLayoutManager
Expand Down Expand Up @@ -187,7 +188,7 @@ class PlayActivity : AppCompatActivity() {
msg += getString(R.string.buffer) + ": " + (prc).toString() + "% " + ByteFmt.byteFmt(preloadedBytes) + "/" + ByteFmt.byteFmt(preloadSize) + "\n"
}
msg += getString(R.string.peers) + ": [" + connectedSeeders.toString() + "] " + activePeers.toString() + "/" + totalPeers.toString() + "\n"
msg += getString(R.string.download_speed) + ": " + ByteFmt.byteFmt(downloadSpeed) + "/Sec"
msg += getString(R.string.download_speed) + ": " + ByteFmt.byteFmt(downloadSpeed) + "/s"
showProgress(msg, prc)
}, {
App.Toast(it)
Expand Down Expand Up @@ -256,6 +257,10 @@ class PlayActivity : AppCompatActivity() {
progressBar.setProgress(prog, true)
else
progressBar.setProgress(prog)
// color Progress: https://stackoverflow.com/questions/2020882/how-to-change-progress-bars-progress-color-in-android
var progressDrawable = progressBar.getProgressDrawable().mutate()
progressDrawable.setColorFilter(ContextCompat.getColor(this, R.color.colorAccent), android.graphics.PorterDuff.Mode.SRC_IN)
progressBar.setProgressDrawable(progressDrawable)
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/bg_white_tr_rc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#50ffffff"/>
<corners android:radius="3dp" />
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_add.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#455A64"
<vector android:height="24dp" android:tint="#3fb57a"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_add_circle.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#455A64"
<vector android:height="24dp" android:tint="#3fb57a"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
Expand Down
Binary file modified app/src/main/res/drawable/ic_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_cancel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M12,2C6.47,2 2,6.47 2,12s4.47,10 10,10 10,-4.47 10,-10S17.53,2 12,2zM17,15.59L15.59,17 12,13.41 8.41,17 7,15.59 10.59,12 7,8.41 8.41,7 12,10.59 15.59,7 17,8.41 13.41,12 17,15.59z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_copy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_donate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M16.094,0C14.894,0.8 7.294,2.994 6.594,3.594C5.894,4.194 3,8.494 3,9.594C3,9.994 4.094,13.806 5.094,15.906C5.194,15.206 6.194,13.2 7.594,12.5C7.494,11.1 7,10.406 7,10.406C8.8,10.006 9.813,7.906 9.813,7.906C11.113,9.106 14.094,8.313 14.094,8.313C13.294,8.813 11.094,11.906 11.094,11.906C11.094,11.906 5.794,13.906 6.094,16.906C6.194,18.106 7.4,19 8.5,19C10.4,19 12.188,16.888 13.188,16.188C14.188,15.488 16.888,15.188 19.188,12.688C21.388,10.288 21.506,5.387 23.906,3.688C22.706,1.288 17.794,0 16.094,0zM5.188,17.688C4.488,18.688 4,19.8 4,21C4,23.8 6.2,26 9,26C11.8,26 14,23.8 14,21C14,19.8 13.613,18.712 12.813,17.813C11.712,18.813 10.2,20 8.5,20C7.4,20 6.287,19.4 5.688,18.5L5.188,17.688z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M3,13h2v-2L3,11v2zM3,17h2v-2L3,15v2zM3,9h2L5,7L3,7v2zM7,13h14v-2L7,11v2zM7,17h14v-2L7,15v2zM7,7v2h14L21,7L7,7z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_send.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_sync.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#455A64"
<vector android:height="24dp" android:tint="#3fb57a"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M12,4L12,1L8,5l4,4L12,6c3.31,0 6,2.69 6,6 0,1.01 -0.25,1.97 -0.7,2.8l1.46,1.46C19.54,15.03 20,13.57 20,12c0,-4.42 -3.58,-8 -8,-8zM12,18c-3.31,0 -6,-2.69 -6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24,7.74C4.46,8.97 4,10.43 4,12c0,4.42 3.58,8 8,8v3l4,-4 -4,-4v3z"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_trash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#455A64"
android:fillColor="#3fb57a"
android:pathData="M 11 -0.03125 C 10.164063 -0.03125 9.34375 0.132813 8.75 0.71875 C 8.15625 1.304688 7.96875 2.136719 7.96875 3 L 4 3 C 3.449219 3 3 3.449219 3 4 L 2 4 L 2 6 L 24 6 L 24 4 L 23 4 C 23 3.449219 22.550781 3 22 3 L 18.03125 3 C 18.03125 2.136719 17.84375 1.304688 17.25 0.71875 C 16.65625 0.132813 15.835938 -0.03125 15 -0.03125 Z M 11 2.03125 L 15 2.03125 C 15.546875 2.03125 15.71875 2.160156 15.78125 2.21875 C 15.84375 2.277344 15.96875 2.441406 15.96875 3 L 10.03125 3 C 10.03125 2.441406 10.15625 2.277344 10.21875 2.21875 C 10.28125 2.160156 10.453125 2.03125 11 2.03125 Z M 4 7 L 4 23 C 4 24.652344 5.347656 26 7 26 L 19 26 C 20.652344 26 22 24.652344 22 23 L 22 7 Z M 8 10 L 10 10 L 10 22 L 8 22 Z M 12 10 L 14 10 L 14 22 L 12 22 Z M 16 10 L 18 10 L 18 22 L 16 22 Z " />
</vector>
13 changes: 9 additions & 4 deletions app/src/main/res/layout/activity_play.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
tools:context="ru.yourok.torrserve.activitys.play.PlayActivity">

<LinearLayout
android:padding="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -16,12 +15,16 @@
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_width="match_parent"
android:layout_height="150dp" />
android:layout_height="150dp"
android:padding="10dp" />
</LinearLayout>

<LinearLayout
android:id="@+id/progress"
android:layout_margin="5dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
Expand All @@ -37,7 +40,9 @@
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
android:indeterminate="true"
android:indeterminateTintMode="src_atop"
android:indeterminateTint="@color/colorAccent" />
</LinearLayout>

<LinearLayout
Expand Down
22 changes: 14 additions & 8 deletions app/src/main/res/layout/activity_player.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@android:color/black">

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/player_view"
android:focusable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp" />
android:layout_height="match_parent" />

<TextView
android:id="@+id/resolution_textView"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Resolution"
android:textSize="40px"
android:background="#FFFFFF"
android:visibility="gone"
android:text="RESOLUTION 00Hz"
android:textSize="20dp"
android:background="@drawable/bg_white_tr_rc"
android:textColor="#000000"
android:layout_gravity="bottom"
android:layout_gravity="top|right"
android:layout_margin="15dp"
android:paddingTop="3dp"
android:paddingRight="6dp"
android:paddingBottom="3dp"
android:paddingLeft="6dp"
android:gravity="center_horizontal" />

</FrameLayout>
20 changes: 11 additions & 9 deletions app/src/main/res/layout/activity_splash.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,31 @@
android:gravity="center"
android:keepScreenOn="true"
android:text="@string/app_name"
android:layout_marginTop="40dp"
android:textColor="#000"
android:shadowColor="#fff"
android:layout_marginTop="50dp"
android:textColor="@color/darkBrown"
android:shadowColor="@color/lighter_gray"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="20"
android:shadowRadius="1"
android:textSize="50sp"
android:textStyle="bold" />
android:textStyle="normal" />

<ImageView
android:layout_width="match_parent"
android:layout_height="220dp"
android:layout_marginTop="10dp"
android:layout_height="200dp"
android:layout_marginTop="50dp"
android:src="@drawable/ic_logo" />

<TextView
android:textColor="@android:color/primary_text_light"
android:shadowRadius="5"
android:textColor="@color/darkBrown"
android:textSize="20sp"
android:shadowRadius="1"
android:shadowColor="@color/lighter_gray"
android:shadowDy="0"
android:shadowDx="0"
android:id="@+id/textViewInfo"
android:gravity="center|bottom"
android:layout_marginBottom="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />

Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout/main_navigation_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
android:background="@drawable/header"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="130dp">
android:layout_height="120dp">

<ImageView
android:src="@mipmap/ic_launcher"
android:padding="10dp"
android:layout_gravity="left|top"
android:layout_width="60dp"
android:layout_height="60dp" />
android:layout_gravity="center|top"
android:layout_width="90dp"
android:layout_height="90dp" />

<TextView
android:id="@+id/tvCurrentHost"
Expand All @@ -44,6 +44,7 @@
android:gravity="center|bottom"
android:paddingBottom="10dp"
android:text="http://localhost:8090"
android:textColor="@android:color/secondary_text_dark"
android:textAppearance="@android:style/TextAppearance.Medium" />
</FrameLayout>

Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3fb57a</color>
<color name="colorPrimaryDark">#309f99</color>
<color name="colorAccent">#848383</color>
<color name="lighter_gray">#ccc</color>
<color name="darkBrown">#2a2122</color>
<color name="colorPrimary">#3fb57a</color><!--5E7B88-->
<color name="colorPrimaryDark">#309f99</color><!--455A64-->
<color name="colorAccent">#3fb57a</color><!--455A64-->
<color name="lighter_gray">#CCC</color>
<color name="darker_gray">#2B2B2B</color>
</resources>

Expand Down

0 comments on commit 5db5837

Please sign in to comment.