diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java index 5311ce0113..4e96d5f6cc 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java @@ -268,7 +268,7 @@ public void onChanged(AbsXml absXml) { .load(mVideo.pic) .transform(new RoundTransformation(mVideo.pic) .centerCorp(true) - .override(AutoSizeUtils.mm2px(mContext, 212), AutoSizeUtils.mm2px(mContext, 300)) + .override(AutoSizeUtils.mm2px(mContext, 300), AutoSizeUtils.mm2px(mContext, 400)) .roundRadius(AutoSizeUtils.mm2px(mContext, 10), RoundTransformation.RoundType.ALL)) .placeholder(R.drawable.error_all_loading) .error(R.drawable.error_all_loading) diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/SettingActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/SettingActivity.java index 378ed3b38e..a1c090ebf3 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/SettingActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/SettingActivity.java @@ -14,7 +14,6 @@ import com.github.tvbox.osc.api.ApiConfig; import com.github.tvbox.osc.base.BaseActivity; import com.github.tvbox.osc.base.BaseLazyFragment; -import com.github.tvbox.osc.event.RefreshEvent; import com.github.tvbox.osc.ui.adapter.SettingPageAdapter; import com.github.tvbox.osc.ui.adapter.SettingSortAdapter; import com.github.tvbox.osc.ui.fragment.ModelSettingFragment; @@ -25,9 +24,6 @@ import com.owen.tvrecyclerview.widget.TvRecyclerView; import com.owen.tvrecyclerview.widget.V7LinearLayoutManager; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; - import java.util.ArrayList; import java.util.List; @@ -115,7 +111,7 @@ private void initData() { if (homeSourceSort == null) homeSourceSort = ""; List sortList = new ArrayList<>(); - sortList.add("站点数据源"); + sortList.add("数据源"); sortList.add("设置其他"); sortAdapter.setNewData(sortList); initViewPager(); diff --git a/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java b/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java index 89c93097cf..63a9f97fb6 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/adapter/GridAdapter.java @@ -65,7 +65,7 @@ protected void convert(BaseViewHolder helper, Movie.Video item) { .load(item.pic) .transform(new RoundTransformation(MD5.string2MD5(item.pic + "position=" + helper.getLayoutPosition())) .centerCorp(true) - .override(AutoSizeUtils.mm2px(mContext, 212), AutoSizeUtils.mm2px(mContext, 300)) + .override(AutoSizeUtils.mm2px(mContext, 300), AutoSizeUtils.mm2px(mContext, 400)) .roundRadius(AutoSizeUtils.mm2px(mContext, 10), RoundTransformation.RoundType.ALL)) .placeholder(R.drawable.error_loading) .error(R.drawable.error_loading) diff --git a/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java b/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java index d1f0ad995b..21bf438baf 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/adapter/HistoryAdapter.java @@ -60,7 +60,7 @@ protected void convert(BaseViewHolder helper, VodInfo item) { .load(item.pic) .transform(new RoundTransformation(MD5.string2MD5(item.pic + item.note)) .centerCorp(true) - .override(AutoSizeUtils.mm2px(mContext, 212), AutoSizeUtils.mm2px(mContext, 300)) + .override(AutoSizeUtils.mm2px(mContext, 300), AutoSizeUtils.mm2px(mContext, 400)) .roundRadius(AutoSizeUtils.mm2px(mContext, 10), RoundTransformation.RoundType.ALL)) .placeholder(R.drawable.error_loading) .error(R.drawable.error_loading) diff --git a/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java b/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java index 8e0d0dcf4f..87fbaf2f22 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java @@ -12,7 +12,6 @@ import com.github.tvbox.osc.base.BaseLazyFragment; import com.github.tvbox.osc.bean.AbsXml; import com.github.tvbox.osc.bean.Movie; -import com.github.tvbox.osc.event.TopStateEvent; import com.github.tvbox.osc.ui.activity.DetailActivity; import com.github.tvbox.osc.ui.adapter.GridAdapter; import com.github.tvbox.osc.ui.tv.widget.LoadMoreView; @@ -21,8 +20,6 @@ import com.owen.tvrecyclerview.widget.TvRecyclerView; import com.owen.tvrecyclerview.widget.V7GridLayoutManager; -import org.greenrobot.eventbus.EventBus; - /** * @author pj567 * @date :2020/12/21 @@ -80,7 +77,7 @@ public void onItemPreSelected(TvRecyclerView parent, View itemView, int position @Override public void onItemSelected(TvRecyclerView parent, View itemView, int position) { - itemView.animate().scaleX(1.1f).scaleY(1.1f).setDuration(300).setInterpolator(new BounceInterpolator()).start(); + itemView.animate().scaleX(1.05f).scaleY(1.05f).setDuration(300).setInterpolator(new BounceInterpolator()).start(); } @Override diff --git a/app/src/main/java/com/github/tvbox/osc/ui/fragment/ModelSettingFragment.java b/app/src/main/java/com/github/tvbox/osc/ui/fragment/ModelSettingFragment.java index e34a2d5150..c8b8d4f603 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/fragment/ModelSettingFragment.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/fragment/ModelSettingFragment.java @@ -35,7 +35,6 @@ */ public class ModelSettingFragment extends BaseLazyFragment { private TextView tvDebugOpen; - private TextView tvTestChannel; private TextView tvMediaCodec; private TextView tvParseWebView; private TextView tvPlay; @@ -59,7 +58,6 @@ protected int getLayoutResID() { @Override protected void init() { tvDebugOpen = findViewById(R.id.tvDebugOpen); - tvTestChannel = findViewById(R.id.tvTestChannel); tvParseWebView = findViewById(R.id.tvParseWebView); tvMediaCodec = findViewById(R.id.tvMediaCodec); tvPlay = findViewById(R.id.tvPlay); @@ -68,7 +66,6 @@ protected void init() { tvApi = findViewById(R.id.tvApi); tvMediaCodec.setText(Hawk.get(HawkConfig.IJK_CODEC, "")); tvDebugOpen.setText(Hawk.get(HawkConfig.DEBUG_OPEN, false) ? "已打开" : "已关闭"); - tvTestChannel.setText(Hawk.get(HawkConfig.TEST_CHANNEL, false) ? "已打开" : "已关闭"); tvParseWebView.setText(Hawk.get(HawkConfig.PARSE_WEBVIEW, true) ? "系统自带" : "XWalkView"); tvXWalkDown.setText(XWalkUtils.xWalkLibExist(mContext) ? "已下载" : "未下载"); tvApi.setText(Hawk.get(HawkConfig.API_URL, "")); @@ -83,14 +80,6 @@ public void onClick(View v) { tvDebugOpen.setText(Hawk.get(HawkConfig.DEBUG_OPEN, false) ? "已打开" : "已关闭"); } }); - findViewById(R.id.llTest).setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - FastClickCheckUtil.check(v); - Hawk.put(HawkConfig.TEST_CHANNEL, !Hawk.get(HawkConfig.TEST_CHANNEL, false)); - tvTestChannel.setText(Hawk.get(HawkConfig.TEST_CHANNEL, false) ? "已打开" : "已关闭"); - } - }); findViewById(R.id.llStorage).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -234,7 +223,6 @@ public void onChange() { @Override public void onChange() { findViewById(R.id.llDebug).setVisibility(View.VISIBLE); - findViewById(R.id.llTest).setVisibility(View.VISIBLE); } }; } diff --git a/app/src/main/java/com/github/tvbox/osc/ui/fragment/SourceSettingFragment.java b/app/src/main/java/com/github/tvbox/osc/ui/fragment/SourceSettingFragment.java index bc02c5ff3f..ec3ea40d0a 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/fragment/SourceSettingFragment.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/fragment/SourceSettingFragment.java @@ -13,7 +13,6 @@ import com.github.tvbox.osc.bean.SourceBean; import com.github.tvbox.osc.receiver.CustomWebReceiver; import com.github.tvbox.osc.ui.adapter.SourceSettingAdapter; -import com.github.tvbox.osc.ui.dialog.SourceSetDialog; import com.github.tvbox.osc.ui.dialog.SpeedTestDialog; import com.github.tvbox.osc.util.FastClickCheckUtil; import com.owen.tvrecyclerview.widget.TvRecyclerView; @@ -51,7 +50,7 @@ protected void init() { mGridView.setAdapter(settingAdapter); mGridView.setLayoutManager(new V7GridLayoutManager(getContext(), 5)); List sourceBeans = new ArrayList<>(); - sourceBeans.add(SourceBean.speedTestBean); + // sourceBeans.add(SourceBean.speedTestBean); sourceBeans.addAll(ApiConfig.get().getSourceBeanList()); settingAdapter.setNewData(sourceBeans); settingAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { @@ -63,7 +62,11 @@ public void onItemClick(BaseQuickAdapter adapter, View view, int position) { SpeedTestDialog dialog = new SpeedTestDialog().build(mContext); dialog.show(); } else { - SourceSetDialog dialog = new SourceSetDialog() + int preHome = settingAdapter.getData().indexOf(ApiConfig.get().getHomeSourceBean()); + ApiConfig.get().setSourceBean(sourceBean); + settingAdapter.notifyItemChanged(preHome); + settingAdapter.notifyItemChanged(position); + /*SourceSetDialog dialog = new SourceSetDialog() .bean(sourceBean) .OnChangeSrcListener(new SourceSetDialog.OnChangeSrcListener() { @Override @@ -84,7 +87,7 @@ public void onDelete() { settingAdapter.remove(position); } }).build(SourceSettingFragment.this); - dialog.show(); + dialog.show();*/ } } }); diff --git a/app/src/main/java/com/github/tvbox/osc/util/HawkConfig.java b/app/src/main/java/com/github/tvbox/osc/util/HawkConfig.java index d788bee9c5..ff9443efea 100644 --- a/app/src/main/java/com/github/tvbox/osc/util/HawkConfig.java +++ b/app/src/main/java/com/github/tvbox/osc/util/HawkConfig.java @@ -10,7 +10,6 @@ public class HawkConfig { public static final String DEFAULT_PARSE = "parse_default"; public static final String DEBUG_OPEN = "debug_open"; public static final String PARSE_WEBVIEW = "parse_webview"; // true 系统 false xwalk - public static final String TEST_CHANNEL = "test_channel"; // true 本地 false 远端 public static final String IJK_CODEC = "ijk_codec"; public static final String LIVE_CHANNEL = "last_live_channel_name"; public static final String PLAY_TYPE = "play_type";//0 系统;1 ijk;2 exo diff --git a/app/src/main/res/drawable/setting_model_focus.xml b/app/src/main/res/drawable/setting_model_focus.xml index 3283a6fdf9..da94567536 100644 --- a/app/src/main/res/drawable/setting_model_focus.xml +++ b/app/src/main/res/drawable/setting_model_focus.xml @@ -2,14 +2,14 @@ - + - + - + diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml index d1c4f5d63c..ca07ab9738 100644 --- a/app/src/main/res/layout/activity_setting.xml +++ b/app/src/main/res/layout/activity_setting.xml @@ -5,30 +5,20 @@ android:orientation="horizontal"> - - + android:paddingLeft="@dimen/vs_10" + android:paddingTop="@dimen/vs_20" + android:paddingRight="@dimen/vs_10" + android:paddingBottom="@dimen/vs_20"> + android:layout_gravity="center" /> - + android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" + android:orientation="vertical"> - \ No newline at end of file + app:tv_verticalSpacingWithMargins="@dimen/vs_10" /> + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_model.xml b/app/src/main/res/layout/fragment_model.xml index 62f0d07357..61493665c1 100644 --- a/app/src/main/res/layout/fragment_model.xml +++ b/app/src/main/res/layout/fragment_model.xml @@ -1,7 +1,8 @@ + android:layout_height="match_parent" + android:padding="@dimen/vs_20"> - - - - - - - - - - - + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> + android:paddingLeft="@dimen/vs_20" + android:paddingRight="@dimen/vs_20"> + android:textSize="@dimen/ts_24" /> + android:textSize="@dimen/ts_30" /> diff --git a/app/src/main/res/layout/fragment_source_grid.xml b/app/src/main/res/layout/fragment_source_grid.xml index d561834f95..b80acb077b 100644 --- a/app/src/main/res/layout/fragment_source_grid.xml +++ b/app/src/main/res/layout/fragment_source_grid.xml @@ -6,9 +6,7 @@ android:layout_height="match_parent" android:clipChildren="false" android:clipToPadding="false" - android:paddingLeft="30mm" - android:paddingTop="60mm" - android:paddingRight="30mm" - app:tv_horizontalSpacingWithMargins="10mm" + android:padding="@dimen/vs_20" + app:tv_horizontalSpacingWithMargins="@dimen/vs_10" app:tv_selectedItemIsCentered="true" - app:tv_verticalSpacingWithMargins="10mm" /> \ No newline at end of file + app:tv_verticalSpacingWithMargins="@dimen/vs_10" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_grid_layout.xml b/app/src/main/res/layout/item_grid_layout.xml index 37e5690c71..48f9293cd7 100644 --- a/app/src/main/res/layout/item_grid_layout.xml +++ b/app/src/main/res/layout/item_grid_layout.xml @@ -4,68 +4,71 @@ android:layout_height="wrap_content" android:background="@drawable/user_focus" android:focusable="true" - android:padding="1mm"> + android:padding="@dimen/vs_1"> + android:layout_width="@dimen/vs_214" + android:layout_height="@dimen/vs_280"> + android:textSize="@dimen/ts_16" /> + android:textSize="@dimen/ts_16" /> + android:textSize="@dimen/ts_16" /> @@ -75,24 +78,24 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:orientation="vertical" - android:padding="1mm"> + android:padding="@dimen/vs_1"> + android:textSize="@dimen/ts_16" /> + android:textSize="@dimen/ts_20" /> diff --git a/app/src/main/res/layout/item_sort_setting_layout.xml b/app/src/main/res/layout/item_sort_setting_layout.xml index baef759af9..3bd867759f 100644 --- a/app/src/main/res/layout/item_sort_setting_layout.xml +++ b/app/src/main/res/layout/item_sort_setting_layout.xml @@ -1,20 +1,19 @@ + android:textSize="@dimen/ts_24" /> \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 0af6f6c248..d3ee886e70 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,5 +1,6 @@ + 16mm 20mm 22mm 24mm @@ -56,6 +57,7 @@ 170mm 180mm 200mm + 214mm 220mm 230mm 240mm