Merge remote-tracking branch 'origin/main'

pull/71/head
okjackcaptain 3 years ago
commit 5935c02746
  1. 21
      app/src/main/java/com/github/tvbox/osc/api/ApiConfig.java
  2. 18
      app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java
  3. 9
      app/src/main/java/com/github/tvbox/osc/ui/activity/LivePlayActivity.java
  4. 9
      app/src/main/java/com/github/tvbox/osc/ui/activity/SearchActivity.java
  5. 152
      app/src/main/java/com/github/tvbox/osc/ui/dialog/EpgDialog.java
  6. 28
      app/src/main/java/com/github/tvbox/osc/ui/fragment/ModelSettingFragment.java
  7. 42
      app/src/main/res/layout/fragment_model.xml
  8. 6
      app/src/main/res/layout/item_series.xml
  9. 4
      app/src/main/res/layout/item_series_group.xml

@ -353,7 +353,8 @@ public class ApiConfig {
// 直播源
liveChannelGroupList.clear(); //修复从后台切换重复加载频道列表
try {
String lives = infoJson.get("lives").getAsJsonArray().get(0).getAsJsonObject().toString();
JsonObject livesOBJ = infoJson.get("lives").getAsJsonArray().get(0).getAsJsonObject();
String lives = livesOBJ.toString();
int index = lives.indexOf("proxy://");
if (index != -1) {
int endIndex = lives.lastIndexOf("\"");
@ -377,6 +378,13 @@ public class ApiConfig {
url = url.replace(extUrl, extUrlFix);
}
// System.out.println("urlLive :"+url);
//设置epg
if(livesOBJ.has("epg")){
String epg =livesOBJ.get("epg").getAsString();
Hawk.put(HawkConfig.EPG_URL,epg);
}
LiveChannelGroup liveChannelGroup = new LiveChannelGroup();
liveChannelGroup.setGroupName(url);
liveChannelGroupList.add(liveChannelGroup);
@ -388,6 +396,12 @@ public class ApiConfig {
String type=fengMiLives.get("type").getAsString();
if(type.equals("0")){
String url =fengMiLives.get("url").getAsString();
//设置epg
if(fengMiLives.has("epg")){
String epg =fengMiLives.get("epg").getAsString();
Hawk.put(HawkConfig.EPG_URL,epg);
}
if(url.startsWith("http")){
url = Base64.encodeToString(url.getBytes("UTF-8"), Base64.DEFAULT | Base64.URL_SAFE | Base64.NO_WRAP);
}
@ -432,7 +446,7 @@ public class ApiConfig {
}
}
String defaultIJKADS="{\"ijk\":[{\"options\":[{\"name\":\"opensles\",\"category\":4,\"value\":\"0\"},{\"name\":\"overlay-format\",\"category\":4,\"value\":\"842225234\"},{\"name\":\"framedrop\",\"category\":4,\"value\":\"1\"},{\"name\":\"soundtouch\",\"category\":4,\"value\":\"1\"},{\"name\":\"start-on-prepared\",\"category\":4,\"value\":\"1\"},{\"name\":\"http-detect-rangeupport\",\"category\":1,\"value\":\"0\"},{\"name\":\"fflags\",\"category\":1,\"value\":\"fastseek\"},{\"name\":\"skip_loop_filter\",\"category\":2,\"value\":\"48\"},{\"name\":\"reconnect\",\"category\":4,\"value\":\"1\"},{\"name\":\"enable-accurate-seek\",\"category\":4,\"value\":\"1\"},{\"name\":\"probesize\",\"category\":1,\"value\":\"10240\"},{\"name\":\"mediacodec\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-auto-rotate\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-handle-resolution-change\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-hevc\",\"category\":4,\"value\":\"0\"},{\"name\":\"dns_cache_timeout\",\"category\":1,\"value\":\"600000000\"}],\"group\":\"软解码\"},{\"options\":[{\"name\":\"opensles\",\"category\":4,\"value\":\"0\"},{\"name\":\"overlay-format\",\"category\":4,\"value\":\"842225234\"},{\"name\":\"framedrop\",\"category\":4,\"value\":\"1\"},{\"name\":\"soundtouch\",\"category\":4,\"value\":\"1\"},{\"name\":\"start-on-prepared\",\"category\":4,\"value\":\"1\"},{\"name\":\"http-detect-rangeupport\",\"category\":1,\"value\":\"0\"},{\"name\":\"fflags\",\"category\":1,\"value\":\"fastseek\"},{\"name\":\"skip_loop_filter\",\"category\":2,\"value\":\"48\"},{\"name\":\"reconnect\",\"category\":4,\"value\":\"1\"},{\"name\":\"enable-accurate-seek\",\"category\":4,\"value\":\"1\"},{\"name\":\"probesize\",\"category\":1,\"value\":\"10240\"},{\"name\":\"mediacodec\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-auto-rotate\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-handle-resolution-change\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-hevc\",\"category\":4,\"value\":\"1\"},{\"name\":\"dns_cache_timeout\",\"category\":1,\"value\":\"600000000\"}],\"group\":\"硬解码\"}],\"ads\":[\"mimg.0c1q0l.cn\",\"www.googletagmanager.com\",\"www.google-analytics.com\",\"mc.usihnbcq.cn\",\"mg.g1mm3d.cn\",\"mscs.svaeuzh.cn\",\"cnzz.hhttm.top\",\"tp.vinuxhome.com\",\"cnzz.mmstat.com\",\"www.baihuillq.com\",\"s23.cnzz.com\",\"z3.cnzz.com\",\"c.cnzz.com\",\"stj.v1vo.top\",\"z12.cnzz.com\",\"img.mosflower.cn\",\"tips.gamevvip.com\",\"ehwe.yhdtns.com\",\"xdn.cqqc3.com\",\"www.jixunkyy.cn\",\"sp.chemacid.cn\",\"hm.baidu.com\",\"s9.cnzz.com\",\"z6.cnzz.com\",\"um.cavuc.com\",\"mav.mavuz.com\",\"wofwk.aoidf3.com\",\"z5.cnzz.com\",\"xc.hubeijieshikj.cn\",\"tj.tianwenhu.com\",\"xg.gars57.cn\",\"k.jinxiuzhilv.com\",\"cdn.bootcss.com\",\"ppl.xunzhuo123.com\",\"xomk.jiangjunmh.top\",\"img.xunzhuo123.com\",\"z1.cnzz.com\",\"s13.cnzz.com\",\"xg.huataisangao.cn\",\"z7.cnzz.com\",\"xg.huataisangao.cn\",\"z2.cnzz.com\",\"s96.cnzz.com\",\"q11.cnzz.com\",\"thy.dacedsfa.cn\",\"xg.whsbpw.cn\",\"s19.cnzz.com\",\"z8.cnzz.com\",\"s4.cnzz.com\",\"f5w.as12df.top\",\"ae01.alicdn.com\",\"www.92424.cn\",\"k.wudejia.com\",\"vivovip.mmszxc.top\",\"qiu.xixiqiu.com\",\"cdnjs.hnfenxun.com\",\"cms.qdwght.com\"]}";
String defaultIJKADS="{\"ijk\":[{\"options\":[{\"name\":\"opensles\",\"category\":4,\"value\":\"0\"},{\"name\":\"overlay-format\",\"category\":4,\"value\":\"842225234\"},{\"name\":\"framedrop\",\"category\":4,\"value\":\"1\"},{\"name\":\"soundtouch\",\"category\":4,\"value\":\"1\"},{\"name\":\"start-on-prepared\",\"category\":4,\"value\":\"1\"},{\"name\":\"http-detect-rangeupport\",\"category\":1,\"value\":\"0\"},{\"name\":\"fflags\",\"category\":1,\"value\":\"fastseek\"},{\"name\":\"skip_loop_filter\",\"category\":2,\"value\":\"48\"},{\"name\":\"reconnect\",\"category\":4,\"value\":\"1\"},{\"name\":\"enable-accurate-seek\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-auto-rotate\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-handle-resolution-change\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec-hevc\",\"category\":4,\"value\":\"0\"},{\"name\":\"dns_cache_timeout\",\"category\":1,\"value\":\"600000000\"}],\"group\":\"软解码\"},{\"options\":[{\"name\":\"opensles\",\"category\":4,\"value\":\"0\"},{\"name\":\"overlay-format\",\"category\":4,\"value\":\"842225234\"},{\"name\":\"framedrop\",\"category\":4,\"value\":\"1\"},{\"name\":\"soundtouch\",\"category\":4,\"value\":\"1\"},{\"name\":\"start-on-prepared\",\"category\":4,\"value\":\"1\"},{\"name\":\"http-detect-rangeupport\",\"category\":1,\"value\":\"0\"},{\"name\":\"fflags\",\"category\":1,\"value\":\"fastseek\"},{\"name\":\"skip_loop_filter\",\"category\":2,\"value\":\"48\"},{\"name\":\"reconnect\",\"category\":4,\"value\":\"1\"},{\"name\":\"enable-accurate-seek\",\"category\":4,\"value\":\"0\"},{\"name\":\"mediacodec\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-auto-rotate\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-handle-resolution-change\",\"category\":4,\"value\":\"1\"},{\"name\":\"mediacodec-hevc\",\"category\":4,\"value\":\"1\"},{\"name\":\"dns_cache_timeout\",\"category\":1,\"value\":\"600000000\"}],\"group\":\"硬解码\"}],\"ads\":[\"mimg.0c1q0l.cn\",\"www.googletagmanager.com\",\"www.google-analytics.com\",\"mc.usihnbcq.cn\",\"mg.g1mm3d.cn\",\"mscs.svaeuzh.cn\",\"cnzz.hhttm.top\",\"tp.vinuxhome.com\",\"cnzz.mmstat.com\",\"www.baihuillq.com\",\"s23.cnzz.com\",\"z3.cnzz.com\",\"c.cnzz.com\",\"stj.v1vo.top\",\"z12.cnzz.com\",\"img.mosflower.cn\",\"tips.gamevvip.com\",\"ehwe.yhdtns.com\",\"xdn.cqqc3.com\",\"www.jixunkyy.cn\",\"sp.chemacid.cn\",\"hm.baidu.com\",\"s9.cnzz.com\",\"z6.cnzz.com\",\"um.cavuc.com\",\"mav.mavuz.com\",\"wofwk.aoidf3.com\",\"z5.cnzz.com\",\"xc.hubeijieshikj.cn\",\"tj.tianwenhu.com\",\"xg.gars57.cn\",\"k.jinxiuzhilv.com\",\"cdn.bootcss.com\",\"ppl.xunzhuo123.com\",\"xomk.jiangjunmh.top\",\"img.xunzhuo123.com\",\"z1.cnzz.com\",\"s13.cnzz.com\",\"xg.huataisangao.cn\",\"z7.cnzz.com\",\"xg.huataisangao.cn\",\"z2.cnzz.com\",\"s96.cnzz.com\",\"q11.cnzz.com\",\"thy.dacedsfa.cn\",\"xg.whsbpw.cn\",\"s19.cnzz.com\",\"z8.cnzz.com\",\"s4.cnzz.com\",\"f5w.as12df.top\",\"ae01.alicdn.com\",\"www.92424.cn\",\"k.wudejia.com\",\"vivovip.mmszxc.top\",\"qiu.xixiqiu.com\",\"cdnjs.hnfenxun.com\",\"cms.qdwght.com\"]}";
JsonObject defaultJson=new Gson().fromJson(defaultIJKADS, JsonObject.class);
// 广告地址
if(AdBlocker.isEmpty()){
@ -454,7 +468,8 @@ public class ApiConfig {
ijkCodes = new ArrayList<>();
boolean foundOldSelect = false;
String ijkCodec = Hawk.get(HawkConfig.IJK_CODEC, "");
for (JsonElement opt : defaultJson.get("ijk").getAsJsonArray()) {
JsonArray ijkJsonArray = infoJson.has("ijk")?infoJson.get("ijk").getAsJsonArray():defaultJson.get("ijk").getAsJsonArray();
for (JsonElement opt : ijkJsonArray) {
JsonObject obj = (JsonObject) opt;
String name = obj.get("group").getAsString();
LinkedHashMap<String, String> baseOpt = new LinkedHashMap<>();

@ -199,7 +199,7 @@ public class DetailActivity extends BaseActivity {
seriesGroupAdapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_series_group, seriesGroupOptions) {
@Override
protected void convert(BaseViewHolder helper, String item) {
TextView tvSeries = helper.getView(R.id.tvSeriesFlag);
TextView tvSeries = helper.getView(R.id.tvSeriesGroup);
tvSeries.setText(item);
}
};
@ -393,18 +393,18 @@ public class DetailActivity extends BaseActivity {
mSeriesGroupView.setOnItemListener(new TvRecyclerView.OnItemListener() {
@Override
public void onItemPreSelected(TvRecyclerView parent, View itemView, int position) {
TextView txtView = itemView.findViewById(R.id.tvSeriesFlag);
TextView txtView = itemView.findViewById(R.id.tvSeriesGroup);
txtView.setTextColor(Color.WHITE);
currentSeriesGroupView = null;
}
@Override
public void onItemSelected(TvRecyclerView parent, View itemView, int position) {
TextView txtView = itemView.findViewById(R.id.tvSeriesFlag);
TextView txtView = itemView.findViewById(R.id.tvSeriesGroup);
txtView.setTextColor(mContext.getResources().getColor(R.color.color_02F8E1));
if (vodInfo != null && vodInfo.seriesMap.get(vodInfo.playFlag).size() > 0) {
int targetPos = position * GroupCount;
mGridView.smoothScrollToPosition(targetPos);
mGridView.scrollToPosition(targetPos);
}
currentSeriesGroupView = itemView;
currentSeriesGroupView.isSelected();
@ -418,14 +418,14 @@ public class DetailActivity extends BaseActivity {
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
FastClickCheckUtil.check(view);
if(currentSeriesGroupView != null) {
TextView txtView = currentSeriesGroupView.findViewById(R.id.tvSeriesFlag);
TextView txtView = currentSeriesGroupView.findViewById(R.id.tvSeriesGroup);
txtView.setTextColor(Color.WHITE);
}
TextView newTxtView = view.findViewById(R.id.tvSeriesFlag);
TextView newTxtView = view.findViewById(R.id.tvSeriesGroup);
newTxtView.setTextColor(mContext.getResources().getColor(R.color.color_02F8E1));
if (vodInfo != null && vodInfo.seriesMap.get(vodInfo.playFlag).size() > 0) {
int targetPos = position * GroupCount;
mGridView.smoothScrollToPosition(targetPos);
mGridView.scrollToPosition(targetPos);
}
currentSeriesGroupView = view;
currentSeriesGroupView.isSelected();
@ -655,8 +655,8 @@ public class DetailActivity extends BaseActivity {
// startQuickSearch();
} else {
mGridViewFlag.setVisibility(View.GONE);
mSeriesGroupView.setVisibility(View.GONE);
mGridView.setVisibility(View.GONE);
mSeriesGroupView.setVisibility(View.GONE);
tvPlay.setVisibility(View.GONE);
mEmptyPlayList.setVisibility(View.VISIBLE);
}
@ -885,6 +885,8 @@ public class DetailActivity extends BaseActivity {
return;
toggleFullPreview();
mGridView.requestFocus();
List<VodInfo.VodSeries> list = vodInfo.seriesMap.get(vodInfo.playFlag);
mSeriesGroupView.setVisibility(list.size()>GroupCount ? View.VISIBLE : View.GONE);
return;
}
if (seriesSelect) {

@ -426,7 +426,14 @@ public class LivePlayActivity extends BaseActivity {
String finalChannelName = channelName;
epgListAdapter.CanBack(currentLiveChannelItem.getinclude_back());
//epgListAdapter.updateData(date, new ArrayList<>());
UrlHttpUtil.get(epgStringAddress + "?ch="+ URLEncoder.encode(epgTagName) + "&date=" + timeFormat.format(date), new CallBackUtil.CallBackString() {
String url;
if(epgStringAddress.contains("{name}") && epgStringAddress.contains("{date}")){
url= epgStringAddress.replace("{name}",URLEncoder.encode(epgTagName)).replace("{date}",timeFormat.format(date));
}else {
url= epgStringAddress + "?ch="+ URLEncoder.encode(epgTagName) + "&date=" + timeFormat.format(date);
}
UrlHttpUtil.get(url, new CallBackUtil.CallBackString() {
public void onFailure(int i, String str) {
showEpg(date, new ArrayList());
showBottomEpg();

@ -95,12 +95,14 @@ public class SearchActivity extends BaseActivity {
private static Boolean hasKeyBoard;
private static Boolean isSearchBack;
@Override
protected void init() {
initView();
initViewModel();
initData();
hasKeyBoard = true;
isSearchBack = false;
}
/*
@ -144,8 +146,10 @@ public class SearchActivity extends BaseActivity {
tvSearch.requestFocus();
tvSearch.requestFocusFromTouch();
}else {
etSearch.requestFocus();
etSearch.requestFocusFromTouch();
if(!isSearchBack){
etSearch.requestFocus();
etSearch.requestFocusFromTouch();
}
}
}
@ -196,6 +200,7 @@ public class SearchActivity extends BaseActivity {
th.printStackTrace();
}
hasKeyBoard = false;
isSearchBack = true;
Bundle bundle = new Bundle();
bundle.putString("id", video.id);
bundle.putString("sourceKey", video.sourceKey);

@ -1,152 +0,0 @@
package com.github.tvbox.osc.ui.dialog;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import com.github.tvbox.osc.R;
import com.github.tvbox.osc.event.RefreshEvent;
import com.github.tvbox.osc.server.ControlManager;
import com.github.tvbox.osc.ui.adapter.ApiHistoryDialogAdapter;
import com.github.tvbox.osc.ui.tv.QRCodeGen;
import com.github.tvbox.osc.util.HawkConfig;
import com.hjq.permissions.OnPermissionCallback;
import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions;
import com.orhanobut.hawk.Hawk;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import me.jessyan.autosize.utils.AutoSizeUtils;
/**
* 描述
*
* @author pj567
* @since 2020/12/27
*/
public class EpgDialog extends BaseDialog {
private ImageView ivQRCode;
private TextView tvAddress;
private EditText inputApi;
@Subscribe(threadMode = ThreadMode.MAIN)
public void refresh(RefreshEvent event) {
if (event.type == RefreshEvent.TYPE_EPG_URL_CHANGE) {
inputApi.setText((String) event.obj);
}
}
public EpgDialog(@NonNull @NotNull Context context) {
super(context);
setContentView(R.layout.dialog_api);
setCanceledOnTouchOutside(false);
ivQRCode = findViewById(R.id.ivQRCode);
tvAddress = findViewById(R.id.tvAddress);
inputApi = findViewById(R.id.input);
inputApi.setText(Hawk.get(HawkConfig.EPG_URL, ""));
findViewById(R.id.inputSubmit).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String newApi = inputApi.getText().toString().trim();
if (!newApi.isEmpty()) {
ArrayList<String> history = Hawk.get(HawkConfig.EPG_HISTORY, new ArrayList<String>());
if (!history.contains(newApi))
history.add(0, newApi);
if (history.size() > 10)
history.remove(10);
Hawk.put(HawkConfig.EPG_HISTORY, history);
listener.onchange(newApi);
dismiss();
}
}
});
findViewById(R.id.apiHistory).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ArrayList<String> history = Hawk.get(HawkConfig.EPG_HISTORY, new ArrayList<String>());
if (history.isEmpty())
return;
String current = Hawk.get(HawkConfig.EPG_URL, "");
int idx = 0;
if (history.contains(current))
idx = history.indexOf(current);
ApiHistoryDialog dialog = new ApiHistoryDialog(getContext());
dialog.setTip("历史配置列表");
dialog.setAdapter(new ApiHistoryDialogAdapter.SelectDialogInterface() {
@Override
public void click(String value) {
inputApi.setText(value);
listener.onchange(value);
dialog.dismiss();
}
@Override
public void del(String value, ArrayList<String> data) {
Hawk.put(HawkConfig.EPG_HISTORY, data);
}
}, history, idx);
dialog.show();
}
});
findViewById(R.id.storagePermission).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (XXPermissions.isGranted(getContext(), Permission.Group.STORAGE)) {
Toast.makeText(getContext(), "已获得存储权限", Toast.LENGTH_SHORT).show();
} else {
XXPermissions.with(getContext())
.permission(Permission.Group.STORAGE)
.request(new OnPermissionCallback() {
@Override
public void onGranted(List<String> permissions, boolean all) {
if (all) {
Toast.makeText(getContext(), "已获得存储权限", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onDenied(List<String> permissions, boolean never) {
if (never) {
Toast.makeText(getContext(), "获取存储权限失败,请在系统设置中开启", Toast.LENGTH_SHORT).show();
XXPermissions.startPermissionActivity((Activity) getContext(), permissions);
} else {
Toast.makeText(getContext(), "获取存储权限失败", Toast.LENGTH_SHORT).show();
}
}
});
}
}
});
refreshQRCode();
}
private void refreshQRCode() {
String address = ControlManager.get().getAddress(false);
tvAddress.setText(String.format("手机/电脑扫描上方二维码或者直接浏览器访问地址\n%s", address));
ivQRCode.setImageBitmap(QRCodeGen.generateBitmap(address, AutoSizeUtils.mm2px(getContext(), 300), AutoSizeUtils.mm2px(getContext(), 300)));
}
public void setOnListener(OnListener listener) {
this.listener = listener;
}
OnListener listener = null;
public interface OnListener {
void onchange(String api);
}
}

@ -24,7 +24,6 @@ import com.github.tvbox.osc.ui.adapter.SelectDialogAdapter;
import com.github.tvbox.osc.ui.dialog.AboutDialog;
import com.github.tvbox.osc.ui.dialog.ApiDialog;
import com.github.tvbox.osc.ui.dialog.BackupDialog;
import com.github.tvbox.osc.ui.dialog.EpgDialog;
import com.github.tvbox.osc.ui.dialog.SearchRemoteTvDialog;
import com.github.tvbox.osc.ui.dialog.SelectDialog;
import com.github.tvbox.osc.ui.dialog.XWalkInitDialog;
@ -62,7 +61,6 @@ public class ModelSettingFragment extends BaseLazyFragment {
private TextView tvRender;
private TextView tvScale;
private TextView tvApi;
private TextView tvEpgApi;
private TextView tvHomeApi;
private TextView tvDns;
private TextView tvHomeRec;
@ -100,7 +98,6 @@ public class ModelSettingFragment extends BaseLazyFragment {
tvRender = findViewById(R.id.tvRenderType);
tvScale = findViewById(R.id.tvScaleType);
tvApi = findViewById(R.id.tvApi);
tvEpgApi = findViewById(R.id.tvEpgApi);
tvHomeApi = findViewById(R.id.tvHomeApi);
tvDns = findViewById(R.id.tvDns);
tvHomeRec = findViewById(R.id.tvHomeRec);
@ -110,7 +107,7 @@ public class ModelSettingFragment extends BaseLazyFragment {
tvDebugOpen.setText(Hawk.get(HawkConfig.DEBUG_OPEN, false) ? "已打开" : "已关闭");
tvParseWebView.setText(Hawk.get(HawkConfig.PARSE_WEBVIEW, true) ? "系统自带" : "XWalkView");
tvApi.setText(Hawk.get(HawkConfig.API_URL, ""));
tvEpgApi.setText("EPG地址已隐藏");
tvDns.setText(OkGoHelper.dnsHttpsList.get(Hawk.get(HawkConfig.DOH_URL, 0)));
tvHomeRec.setText(getHomeRecName(Hawk.get(HawkConfig.HOME_REC, 0)));
tvHistoryNum.setText(HistoryHelper.getHistoryNumName(Hawk.get(HawkConfig.HISTORY_NUM, 0)));
@ -296,29 +293,6 @@ public class ModelSettingFragment extends BaseLazyFragment {
}
});
findViewById(R.id.epgApi).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FastClickCheckUtil.check(v);
EpgDialog dialog = new EpgDialog(mActivity);
EventBus.getDefault().register(dialog);
dialog.setOnListener(new EpgDialog.OnListener() {
@Override
public void onchange(String api) {
Hawk.put(HawkConfig.EPG_URL, api);
tvEpgApi.setText(api);
}
});
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
((BaseActivity) mActivity).hideSysBar();
EventBus.getDefault().unregister(dialog);
}
});
dialog.show();
}
});
findViewById(R.id.llMediaCodec).setOnClickListener(new View.OnClickListener() {

@ -151,48 +151,6 @@
android:textColor="@android:color/white"
android:textSize="@dimen/ts_30" />
</LinearLayout>
<LinearLayout
android:id="@+id/epgApi"
android:layout_width="match_parent"
android:layout_height="@dimen/vs_60"
android:layout_marginBottom="@dimen/vs_10"
android:background="@drawable/shape_setting_model_focus"
android:focusable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/vs_20"
android:paddingRight="@dimen/vs_20">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="EPG地址"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/tvEpgApi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="middle"
android:singleLine="true"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/vs_10"
android:layout_marginLeft="@dimen/vs_10"
android:text=">"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_30" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"

@ -11,13 +11,11 @@
android:id="@+id/tvSeries"
android:layout_width="match_parent"
android:layout_height="@dimen/vs_50"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:padding="@dimen/vs_10"
android:singleLine="true"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_20" />
</LinearLayout>

@ -13,13 +13,13 @@
android:paddingBottom="@dimen/vs_1">
<TextView
android:id="@+id/tvSeriesFlag"
android:id="@+id/tvSeriesGroup"
android:layout_width="wrap_content"
android:layout_height="@dimen/vs_30"
android:ellipsize="end"
android:gravity="center"
android:singleLine="true"
android:text="11111111111"
android:text=""
android:textColor="@android:color/white"
android:textSize="@dimen/ts_20" />
</LinearLayout>
Loading…
Cancel
Save