Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
670848654 committed Jul 29, 2020
1 parent 66bb42a commit 3b555c1
Show file tree
Hide file tree
Showing 36 changed files with 190 additions and 233 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "my.project.sakuraproject"
minSdkVersion 21
targetSdkVersion 29
versionCode 20
versionName "1.9.0"
versionCode 21
versionName "1.9.1"
ndk{abiFilters "armeabi"}
resConfigs"zh"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected void convert(final BaseViewHolder helper, MultiItemEntity item) {
break;
case TYPE_LEVEL_1:
TagBean homeBean = (TagBean) item;
helper.setText(R.id.tag_group, homeBean.getTitle());
helper.setText(R.id.tag_group, homeBean.getItemTitle());
break;
}
}
Expand Down
37 changes: 21 additions & 16 deletions app/src/main/java/my/project/sakuraproject/application/Sakura.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,31 @@ public void onLowMemory() {
}

public static void setApi() {
TAG_API = Sakura.DOMAIN + "/2019/";
TAG_API = Sakura.DOMAIN + "/sitemap/";
MOVIE_API = Sakura.DOMAIN + "/movie/";
ZT_API = Sakura.DOMAIN + "/topic/";
JCB_API = Sakura.DOMAIN + "/37/";
SEARCH_API = Sakura.DOMAIN + "/search/";
}

private void initTBS() {
//搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
QbSdk.setDownloadWithoutWifi(true);//非wifi条件下允许下载X5内核
QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
@Override
public void onViewInitFinished(boolean arg0) {
if (arg0) SharedPreferencesUtils.setParam(appContext, "X5State", true);
else SharedPreferencesUtils.setParam(appContext, "X5State", false);
}
@Override
public void onCoreInitFinished() {
}
};
//x5内核初始化接口
QbSdk.initX5Environment(getApplicationContext(), cb);
if (!android.os.Build.MODEL.contains("Pixel C")) {
//搜集本地tbs内核信息并上报服务器,服务器返回结果决定使用哪个内核。
QbSdk.setDownloadWithoutWifi(true);//非wifi条件下允许下载X5内核
QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
@Override
public void onViewInitFinished(boolean arg0) {
if (arg0) SharedPreferencesUtils.setParam(appContext, "X5State", true);
else SharedPreferencesUtils.setParam(appContext, "X5State", false);
}

@Override
public void onCoreInitFinished() {
}
};
//x5内核初始化接口
QbSdk.initX5Environment(getApplicationContext(), cb);
}
}

public void showToastMsg(String msg){
Expand All @@ -115,7 +118,9 @@ public void showSnackbarMsgAction(View view, String msg, String actionMsg, View.
}

public void showSnackbarMsg(View view, String msg) {
Snackbar.make(view, msg, Snackbar.LENGTH_LONG).show();
Snackbar snackbar = Snackbar.make(view, msg, Snackbar.LENGTH_LONG);
snackbar.getView().setBackgroundColor(getResources().getColor(R.color.logo_bg));
snackbar.show();
}

public void addActivity(Activity activity) {
Expand Down
75 changes: 13 additions & 62 deletions app/src/main/java/my/project/sakuraproject/bean/TagBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,9 @@

public class TagBean implements MultiItemEntity {
private String title;
private String url;
private String type;
private String desc;
private boolean select;
private String witchTitle;
private String witchUrl;
private String itemTitle;
private String itemUrl;

public String getWitchTitle() {
return witchTitle;
}

public void setWitchTitle(String witchTitle) {
this.witchTitle = witchTitle;
}

public String getWitchUrl() {
return witchUrl;
}

public void setWitchUrl(String witchUrl) {
this.witchUrl = witchUrl;
}

public boolean isSelect() {
return select;
}

public void setSelect(boolean select) {
this.select = select;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getTitle() {
return title;
Expand All @@ -53,40 +18,26 @@ public void setTitle(String title) {
this.title = title;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
public String getItemTitle() {
return itemTitle;
}

public String getDesc() {
return desc;
public void setItemTitle(String itemTitle) {
this.itemTitle = itemTitle;
}

public void setDesc(String desc) {
this.desc = desc;
public String getItemUrl() {
return itemUrl;
}

public TagBean(String title, String url, String witchTitle, String witchUrl) {
this.title = title;
this.url = url;
this.witchTitle = witchTitle;
this.witchUrl = witchUrl;
}

public TagBean(String title, String url, String desc, boolean state) {
this.title = title;
this.url = url;
this.desc = desc;
public void setItemUrl(String itemUrl) {
this.itemUrl = itemUrl;
}

public TagBean(boolean select, String title, String url, String type) {
this.select = select;
public TagBean(String title, String itemTitle, String itemUrl) {
this.title = title;
this.url = url;
this.type = type;
this.itemTitle = itemTitle;
this.itemUrl = itemUrl;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.r0adkll.slidr.Slidr;

import org.json.JSONException;
Expand All @@ -23,11 +29,6 @@
import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.OnClick;
import my.project.sakuraproject.R;
Expand Down Expand Up @@ -98,7 +99,7 @@ private void initViews() {
LinearLayout.LayoutParams Params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, Utils.getNavigationBarHeight(this));
footer.findViewById(R.id.footer).setLayoutParams(Params);
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) show.getLayoutParams();
params.setMargins(0, 0, 0, Utils.getNavigationBarHeight(this) - 15);
params.setMargins(10, 0, 10, Utils.getNavigationBarHeight(this) - 5);
show.setLayoutParams(params);
version.setText(Utils.getASVersionName());
cache.setText(Environment.getExternalStorageDirectory() + Utils.getString(R.string.cache_text));
Expand Down Expand Up @@ -167,6 +168,7 @@ public void showUpdateLogs() {

public List createUpdateLogList() {
List logsList = new ArrayList();
logsList.add(new LogBean("版本:1.9.1", "修正动漫分类列表"));
logsList.add(new LogBean("版本:1.9.0", "修复一些Bug\n优化番剧详情界面\n内置播放器新增屏幕锁定、快进、后退操作"));
logsList.add(new LogBean("版本:1.8.9","修复解析时弹窗不关闭的问题"));
logsList.add(new LogBean("版本:1.8.8","修复已知问题"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package my.project.sakuraproject.main.about;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.r0adkll.slidr.Slidr;

import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import my.project.sakuraproject.R;
import my.project.sakuraproject.adapter.SourceAdapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
import android.view.View;
import android.view.ViewGroup;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.r0adkll.slidr.Slidr;

import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import butterknife.OnClick;
import my.project.sakuraproject.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
import android.view.View;
import android.view.ViewGroup;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.r0adkll.slidr.Slidr;

import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import butterknife.OnClick;
import my.project.sakuraproject.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
import android.view.WindowManager;
import android.widget.TextView;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import java.util.List;

import butterknife.ButterKnife;
import butterknife.Unbinder;
import my.project.sakuraproject.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
Expand All @@ -36,14 +45,6 @@
import java.util.ArrayList;
import java.util.List;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import butterknife.OnClick;
import my.project.sakuraproject.R;
Expand Down Expand Up @@ -148,7 +149,7 @@ protected void init() {
if ((Boolean) SharedPreferencesUtils.getParam(this, "darkTheme", false)) bg.setVisibility(View.GONE);
Slidr.attach(this, Utils.defaultInit());
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) msg.getLayoutParams();
params.setMargins(0, 0, 0, Utils.getNavigationBarHeight(this) - 15);
params.setMargins(10, 0, 10, 0);
getBundle();
initToolbar();
initSwipe();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public void onResponse(Call call, Response response) {
bean.setTitle(animeTitle);
//番剧简介
bean.setDesc(doc.select("div.info").text());
bean.setSy(doc.select("div.sinfo > span").get(0).text());
bean.setDq(doc.select("div.sinfo > span").get(1).text());
bean.setSy(doc.select("div.sinfo > span").get(0).text().replaceAll("上映:", "上映: "));
bean.setDq(doc.select("div.sinfo > span").get(1).text().replaceAll("地区:", "地区: "));
bean.setLx(doc.select("div.sinfo > span").get(2).text());
bean.setBq(doc.select("div.sinfo > span").get(4).text());
//番剧图片
Expand Down
Loading

0 comments on commit 3b555c1

Please sign in to comment.