pull/123/head
FongMi 3 years ago
parent 264a0e613c
commit 374d1466c7
  1. 2
      app/src/leanback/java/com/fongmi/android/tv/ui/base/BaseActivity.java
  2. 2
      app/src/main/java/com/fongmi/android/tv/utils/FileUtil.java
  3. 8
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/DetailActivity.java
  4. 2
      app/src/mobile/java/com/fongmi/android/tv/ui/base/BaseActivity.java
  5. 6
      app/src/mobile/res/layout/activity_detail.xml
  6. 8
      app/src/mobile/res/layout/fragment_vod.xml
  7. 3
      gradle.properties

@ -63,7 +63,7 @@ public abstract class BaseActivity extends AppCompatActivity {
private void setWall() {
try {
File file = FileUtil.getWall(Prefers.getWall());
if (file.exists() && file.length() > 0) getWindow().setBackgroundDrawable(WallConfig.drawable(Drawable.createFromPath(file.getPath())));
if (file.exists() && file.length() > 0) getWindow().setBackgroundDrawable(WallConfig.drawable(Drawable.createFromPath(file.getAbsolutePath())));
else getWindow().setBackgroundDrawableResource(ResUtil.getDrawable(file.getName()));
} catch (Exception e) {
getWindow().setBackgroundDrawableResource(R.drawable.wallpaper_1);

@ -163,7 +163,7 @@ public class FileUtil {
public static void clearDir(File dir) {
if (dir == null) return;
if (dir.isDirectory()) for (File file : dir.listFiles()) clearDir(file);
if (dir.delete()) Log.d(TAG, "Deleted:" + dir.getPath());
if (dir.delete()) Log.d(TAG, "Deleted:" + dir.getAbsolutePath());
}
public static void openFile(File file) {

@ -215,6 +215,7 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
protected void initEvent() {
mBinding.name.setOnClickListener(view -> onName());
mBinding.more.setOnClickListener(view -> onMore());
mBinding.actor.setOnClickListener(view -> onActor());
mBinding.content.setOnClickListener(view -> onContent());
mBinding.reverse.setOnClickListener(view -> onReverse());
mBinding.control.back.setOnClickListener(view -> onFull());
@ -427,9 +428,12 @@ public class DetailActivity extends BaseActivity implements CustomKeyDownVod.Lis
EpisodeDialog.create().reverse(mHistory.isRevSort()).episodes(mEpisodeAdapter.getItems()).show(getSupportFragmentManager(), null);
}
private void onActor() {
mBinding.actor.setMaxLines(mBinding.actor.getMaxLines() == 1 ? Integer.MAX_VALUE : 1);
}
private void onContent() {
boolean more = mBinding.content.getMaxLines() == 2;
mBinding.content.setMaxLines(more ? Integer.MAX_VALUE : 2);
mBinding.content.setMaxLines(mBinding.content.getMaxLines() == 2 ? Integer.MAX_VALUE : 2);
}
private void onReverse() {

@ -56,7 +56,7 @@ public abstract class BaseActivity extends AppCompatActivity {
private void setWall() {
try {
File file = FileUtil.getWall(Prefers.getWall());
if (file.exists() && file.length() > 0) getWindow().setBackgroundDrawable(WallConfig.drawable(Drawable.createFromPath(file.getPath())));
if (file.exists() && file.length() > 0) getWindow().setBackgroundDrawable(WallConfig.drawable(Drawable.createFromPath(file.getAbsolutePath())));
else getWindow().setBackgroundDrawableResource(ResUtil.getDrawable(file.getName()));
} catch (Exception e) {
getWindow().setBackgroundDrawableResource(R.drawable.wallpaper_1);

@ -89,7 +89,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
@ -150,7 +151,8 @@
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:singleLine="true"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="14sp"
tools:text="演員:FongMi" />

@ -57,16 +57,16 @@
<ImageView
android:id="@+id/keep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_vod_keep" />
<ImageView
android:id="@+id/history"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_vod_history" />

@ -19,4 +19,5 @@ android.enableJetifier=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
org.gradle.unsafe.configuration-cache=true
Loading…
Cancel
Save