Merge pull request #287 from okcaptain/release

update
pull/291/head^2
okcaptain 2 years ago committed by GitHub
commit 6a3ef01e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/build.gradle
  2. 12
      app/src/leanback/java/com/fongmi/android/tv/ui/activity/VideoActivity.java
  3. 4
      app/src/leanback/java/com/fongmi/android/tv/ui/dialog/EpisodeDialog.java
  4. 2
      app/src/main/res/values-zh-rCN/strings.xml
  5. 3
      app/src/mobile/AndroidManifest.xml
  6. 1
      app/src/mobile/java/com/fongmi/android/tv/ui/activity/VideoActivity.java
  7. 12
      app/src/mobile/res/layout/activity_collect.xml

@ -11,7 +11,7 @@ android {
minSdk 21
targetSdk 28
versionCode 225
versionName "0214"
versionName "0217"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]

@ -288,6 +288,11 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List
private void setEpisodeSelectedPosition(int position) {
getEpisodeView().setSelectedPosition(position);
if (hasKeyEvent) return;
getEpisodeView().postDelayed(() -> {
View selectedItem = getEpisodeView().getLayoutManager().findViewByPosition(position);
if (selectedItem != null) selectedItem.requestFocus();
}, 300);
}
private boolean isReplay() {
@ -367,10 +372,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List
mBinding.flag.addOnChildViewHolderSelectedListener(new OnChildViewHolderSelectedListener() {
@Override
public void onChildViewHolderSelected(@NonNull RecyclerView parent, @Nullable RecyclerView.ViewHolder child, int position, int subposition) {
if (mFlagAdapter.size() > 0) {
setFlagActivated((Flag) mFlagAdapter.get(position));
hasKeyEvent = false;
}
if (mFlagAdapter.size() > 0) setFlagActivated((Flag) mFlagAdapter.get(position));
}
});
getEpisodeView().addOnChildViewHolderSelectedListener(new OnChildViewHolderSelectedListener() {
@ -738,6 +740,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List
}
private void updateFocus() {
hasKeyEvent = false;
mEpisodePresenter.setNextFocusDown(findFocusDown(Setting.getEpisode() == 0 ? 2 : 4));
mEpisodePresenter.setNextFocusUp(findFocusUp(Setting.getEpisode() == 0 ? 2 : 4));
mQualityAdapter.setNextFocusDown(findFocusDown(1));
@ -1079,6 +1082,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List
private void showControl(View view) {
mBinding.control.danmu.setVisibility(mBinding.danmaku.isPrepared() ? View.VISIBLE : View.GONE);
mBinding.control.getRoot().setVisibility(View.VISIBLE);
mBinding.control.episodes.setVisibility(Setting.getFullscreenMenuKey() == 0 ? View.VISIBLE : View.GONE);
view.requestFocus();
setR1Callback();
}

@ -152,6 +152,10 @@ public class EpisodeDialog extends BaseDialog implements ArrayPresenter.OnClickL
this.binding.episodeVert.postDelayed(() -> {
int position = getEpisodePosition();
setEpisodeSelectedPosition(position);
binding.episodeVert.postDelayed(() -> {
View selectedItem = binding.episodeVert.getLayoutManager().findViewByPosition(position);
if (selectedItem != null) selectedItem.requestFocus();
}, 300);
}, 1000);
}

@ -78,7 +78,7 @@
<string name="setting_size">图片尺寸</string>
<string name="setting_fullscreen_menu_key">全屏菜单键</string>
<string name="setting_home_site_lock">首页源锁定</string>
<string name="setting_incognito">痕模式</string>
<string name="setting_incognito">痕模式</string>
<string name="setting_doh">DoH</string>
<string name="setting_proxy">Proxy</string>
<string name="setting_cache">缓存</string>

@ -72,7 +72,8 @@
<activity
android:name=".ui.activity.CollectActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout"
android:screenOrientation="fullUser" />
android:screenOrientation="fullUser"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.DetailActivity"

@ -1194,7 +1194,6 @@ public class VideoActivity extends BaseActivity implements Clock.Callback, Custo
mHistory.setPosition(position = mPlayers.getPosition());
mHistory.setDuration(duration = mPlayers.getDuration());
if (position >= 0 && duration > 0 && !Setting.isIncognito()) App.execute(() -> mHistory.update());
if (position >= 0 && duration > 0) App.execute(() -> mHistory.update());
if (mHistory.getEnding() > 0 && duration > 0 && mHistory.getEnding() + position >= duration) {
mClock.setCallback(null);
checkNext();

@ -63,6 +63,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/search_record"
android:textColor="@color/white"
android:textSize="18sp" />
@ -71,10 +72,13 @@
android:id="@+id/recordRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-8dp"
android:clipChildren="false"
android:clipToPadding="false"
android:overScrollMode="never"
android:padding="8dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
tools:itemCount="5"
tools:listitem="@layout/adapter_collect_record" />
@ -84,6 +88,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/search_hot"
android:textColor="@color/white"
android:textSize="18sp" />
@ -92,10 +97,13 @@
android:id="@+id/wordRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-8dp"
android:clipChildren="false"
android:clipToPadding="false"
android:overScrollMode="never"
android:padding="8dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
tools:itemCount="5"
tools:listitem="@layout/adapter_collect_word" />

Loading…
Cancel
Save