diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/api/ApiActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/api/ApiActivity.java
index 104d9bb3..84198c41 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/api/ApiActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/api/ApiActivity.java
@@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
import android.view.View;
import com.dueeeke.dkplayer.R;
@@ -36,6 +37,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void skipToVodPlayer(View view) {
// String path = Environment.getExternalStorageDirectory().getAbsolutePath();
// String url = "file://" + path + File.separator + "test.mp4";
diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/extend/ExtendActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/extend/ExtendActivity.java
index 4fd6ff99..74878e2e 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/extend/ExtendActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/extend/ExtendActivity.java
@@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
import android.view.View;
import com.dueeeke.dkplayer.R;
@@ -27,6 +28,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void startFullScreen(View view) {
startActivity(new Intent(this, FullScreenActivity.class));
}
diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/list/ListActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/list/ListActivity.java
index 8ad85735..a50a3793 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/list/ListActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/list/ListActivity.java
@@ -5,6 +5,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
import android.view.View;
import com.dueeeke.dkplayer.R;
@@ -27,6 +28,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void list(View view) {
startActivity(new Intent(this, ListViewActivity.class));
}
diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/AndroidOPiPActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/AndroidOPiPActivity.java
index 20cab649..8b55152f 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/AndroidOPiPActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/AndroidOPiPActivity.java
@@ -81,21 +81,21 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
public void onVideoPaused() {
super.onVideoPaused();
updatePictureInPictureActions(
- R.drawable.ic_action_play_arrow, "播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
+ R.drawable.dkplayer_ic_action_play_arrow, "播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
}
@Override
public void onVideoStarted() {
super.onVideoStarted();
updatePictureInPictureActions(
- R.drawable.ic_action_pause, "暂停", CONTROL_TYPE_PAUSE, REQUEST_PAUSE);
+ R.drawable.dkplayer_ic_action_pause, "暂停", CONTROL_TYPE_PAUSE, REQUEST_PAUSE);
}
@Override
public void onComplete() {
super.onComplete();
updatePictureInPictureActions(
- R.drawable.ic_action_replay, "重新播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
+ R.drawable.dkplayer_ic_action_replay, "重新播放", CONTROL_TYPE_PLAY, REQUEST_PLAY);
}
});
}
diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPActivity.java
index 25dfbe96..65f055ef 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPActivity.java
@@ -48,7 +48,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Glide.with(this)
.load("http://sh.people.com.cn/NMediaFile/2016/0112/LOCAL201601121344000138197365721.jpg")
.asBitmap()
- .animate(R.anim.anim_player_alpha_in)
+ .animate(R.anim.dkplayer_anim_alpha_in)
.placeholder(android.R.color.darker_gray)
.into(controller.getThumb());
ijkVideoView.setUrl(URL);
diff --git a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPDemoActivity.java b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPDemoActivity.java
index 071f1644..2aefdf54 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPDemoActivity.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/activity/pip/PIPDemoActivity.java
@@ -6,6 +6,7 @@
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
+import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
@@ -24,6 +25,14 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void pip(View view) {
startActivity(new Intent(this, PIPActivity.class));
diff --git a/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FullScreenController.java b/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FullScreenController.java
index 6e149af7..1a0c2e54 100644
--- a/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FullScreenController.java
+++ b/app/src/main/java/com/dueeeke/dkplayer/widget/controller/FullScreenController.java
@@ -40,8 +40,8 @@ public class FullScreenController extends GestureVideoController implements View
private ImageView playButton;
private ProgressBar loadingProgress;
private LinearLayout completeContainer;
- private Animation showAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_player_alpha_in);
- private Animation hideAnim = AnimationUtils.loadAnimation(getContext(), R.anim.anim_player_alpha_out);
+ private Animation showAnim = AnimationUtils.loadAnimation(getContext(), R.anim.dkplayer_anim_alpha_in);
+ private Animation hideAnim = AnimationUtils.loadAnimation(getContext(), R.anim.dkplayer_anim_alpha_out);
public FullScreenController(@NonNull Context context) {
diff --git a/dkplayer-ui/src/main/res/drawable/shape_ad_bg.xml b/app/src/main/res/drawable/shape_ad_bg.xml
similarity index 100%
rename from dkplayer-ui/src/main/res/drawable/shape_ad_bg.xml
rename to app/src/main/res/drawable/shape_ad_bg.xml
diff --git a/dkplayer-ui/src/main/res/drawable/shape_float_window_background.xml b/app/src/main/res/drawable/shape_float_window_background.xml
similarity index 100%
rename from dkplayer-ui/src/main/res/drawable/shape_float_window_background.xml
rename to app/src/main/res/drawable/shape_float_window_background.xml
diff --git a/app/src/main/res/layout/item_float_video.xml b/app/src/main/res/layout/item_float_video.xml
index 36c10c05..6ad7f4ec 100644
--- a/app/src/main/res/layout/item_float_video.xml
+++ b/app/src/main/res/layout/item_float_video.xml
@@ -26,9 +26,9 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
- android:background="@drawable/shape_play_bg"
+ android:background="@drawable/dkplayer_shape_play_bg"
android:padding="@dimen/player_default_spacing"
- android:src="@drawable/selector_play_button" />
+ android:src="@drawable/dkplayer_selector_play_button" />
diff --git a/app/src/main/res/layout/layout_ad_controller.xml b/app/src/main/res/layout/layout_ad_controller.xml
index 2b0dff05..dab10aed 100644
--- a/app/src/main/res/layout/layout_ad_controller.xml
+++ b/app/src/main/res/layout/layout_ad_controller.xml
@@ -11,7 +11,7 @@
+ android:src="@drawable/dkplayer_ic_action_arrow_back" />
+ android:src="@drawable/dkplayer_selector_play_button" />
+ android:src="@drawable/dkplayer_selector_full_screen_button" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_float_controller.xml b/app/src/main/res/layout/layout_float_controller.xml
index 3aecc3eb..7fb9ad1a 100644
--- a/app/src/main/res/layout/layout_float_controller.xml
+++ b/app/src/main/res/layout/layout_float_controller.xml
@@ -8,16 +8,16 @@
android:layout_width="@dimen/player_play_btn_size"
android:layout_height="@dimen/player_play_btn_size"
android:layout_gravity="center"
- android:background="@drawable/shape_play_bg"
+ android:background="@drawable/dkplayer_shape_play_bg"
android:padding="@dimen/player_default_spacing"
- android:src="@drawable/selector_play_button" />
+ android:src="@drawable/dkplayer_selector_play_button" />
+ android:src="@drawable/dkplayer_ic_action_close" />
+ android:src="@drawable/dkplayer_ic_action_fullscreen" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_fullscreen_controller.xml b/app/src/main/res/layout/layout_fullscreen_controller.xml
index 68c9d914..061627a4 100644
--- a/app/src/main/res/layout/layout_fullscreen_controller.xml
+++ b/app/src/main/res/layout/layout_fullscreen_controller.xml
@@ -9,7 +9,7 @@
android:id="@+id/top_container"
android:layout_width="match_parent"
android:layout_height="@dimen/controller_height"
- android:background="@drawable/shape_standard_controller_top_bg"
+ android:background="@drawable/dkplayer_shape_standard_controller_top_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone"
@@ -21,7 +21,7 @@
android:layout_height="@dimen/controller_height"
android:layout_gravity="center"
android:padding="@dimen/controller_icon_padding"
- android:src="@drawable/ic_action_arrow_back" />
+ android:src="@drawable/dkplayer_ic_action_arrow_back" />
+ android:src="@drawable/dkplayer_selector_play_button" />
+ android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
+ android:thumb="@drawable/dkplayer_seekbar_thumb" />
@@ -106,7 +106,7 @@
android:layout_height="1dp"
android:layout_gravity="bottom"
android:max="1000"
- android:progressDrawable="@drawable/layer_dkplayer_progress_bar"
+ android:progressDrawable="@drawable/dkplayer_layer_progress_bar"
android:visibility="gone" />
+ android:src="@drawable/dkplayer_ic_action_replay" />
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index a0909446..1333524f 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -16,7 +16,7 @@
- 6dp
- 30dp
- 30dp
- - @drawable/shape_back_bg
+ - @drawable/dkplayer_shape_back_bg
- 5dp