Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
tingxue committed Apr 10, 2021
2 parents 10200e9 + 8e15063 commit 4c3a849
Show file tree
Hide file tree
Showing 65 changed files with 145 additions and 163 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
compileSdkVersion 30
buildToolsVersion '29.0.3'

defaultConfig {
applicationId "me.yluo.ruisiapp"
minSdkVersion 21
minSdkVersion 23
targetSdkVersion 29
versionCode 38
versionName '2.9.8'
Expand All @@ -18,7 +18,7 @@ android {
}

android {
viewBinding.enabled = true
buildFeatures.viewBinding = true
}
}

Expand All @@ -29,7 +29,7 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.fragment:fragment:1.2.4'
implementation 'androidx.fragment:fragment:1.2.5'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'org.jsoup:jsoup:1.13.1'
Expand All @@ -38,7 +38,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.browser:browser:1.2.0'
implementation "androidx.preference:preference:1.1.1"
implementation 'com.alibaba:fastjson:1.2.68'
implementation 'com.alibaba:fastjson:1.2.75'
implementation 'com.tencent.bugly:crashreport:3.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ChangePasswordActivity extends BaseActivity implements

private EditText password1, password2, password3;
private TextInputLayout passwordLayout;
private List<String> list = new ArrayList<>();
private final List<String> list = new ArrayList<>();
public int answerSelect = -1;
private EditText edAnswer;
private ProgressDialog dialog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
public class ChatActivity extends BaseActivity {

private RecyclerView list;
private List<ChatListData> datas = new ArrayList<>();
private final List<ChatListData> datas = new ArrayList<>();
private ChatListAdapter adapter;
private String replyUrl = "";
private String url = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class EditActivity extends BaseActivity implements View.OnClickListener {
private MySmileyPicker smileyPicker;
private TextView tvSelectType;
private MySpinner<Forum> typeidSpinner;
private List<Forum> typeiddatas = new ArrayList<>();
private final List<Forum> typeiddatas = new ArrayList<>();
private View typeIdContainer;
private int typeId;
private String pid, tid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,7 @@ private void removeFriend(String uid, final int pos) {
@Override
public void onSuccess(byte[] response) {
String s = new String(response);
if (s.contains("操作成功")) {
removeRes(true, pos);
} else {
removeRes(false, pos);
}
removeRes(s.contains("操作成功"), pos);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class HomeActivity extends BaseActivity
private SharedPreferences sharedPreferences;
private boolean isNeedCheckUpdate = false;
private ViewPager viewPager;
private List<BaseLazyFragment> fragments = new ArrayList<>();
private final List<BaseLazyFragment> fragments = new ArrayList<>();

private static final int MSG_HAVE_REPLY = 1;
private static final int MSG_NO_REPLY = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class LoginActivity extends BaseActivity implements InputValidDialog.OnIn
private View btnLogin;

private SharedPreferences shp;
private List<String> list = new ArrayList<>();
private final List<String> list = new ArrayList<>();
private String loginUrl;
private int answerSelect = 0;
private ProgressDialog dialog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class NewPostActivity extends BaseActivity implements View.OnClickListene
private String validValue = null; //验证码输入值

//子版块列表
private List<Forum> typeiddatas = new ArrayList<>();
private final List<Forum> typeiddatas = new ArrayList<>();
private String uploadHash = null;
private ProgressDialog uploadDialog;
private ProgressDialog postDialog;
Expand Down
7 changes: 3 additions & 4 deletions app/src/main/java/me/yluo/ruisiapp/activity/PostActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ public class PostActivity extends BaseActivity
//回复楼主的链接
private String replyUrl = "";
private PostAdapter adapter;
private List<SingleArticleData> datas = new ArrayList<>();
private final List<SingleArticleData> datas = new ArrayList<>();
private Map<String, Editable> tempDatas = new HashMap<>();

private boolean isSaveToDataBase = false;
private String title, authorName, tid, fid, redirectPid = "";
private boolean showPlainText = false;
Expand Down Expand Up @@ -139,7 +138,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
// 浏览器网址跳转
url = i.getDataString();
if (url != null) {
url = url.substring(App.BASE_URL_RS.length(), url.length());
url = url.substring(App.BASE_URL_RS.length());
Log.i("PostActivity", "浏览器跳转网址:" + url);
}
tid = i.getData().getQueryParameter("tid");
Expand Down Expand Up @@ -570,7 +569,7 @@ private class DealWithArticleData extends AsyncTask<String, Void, List<SingleArt

private String errorText = "";
private int pageLoad = 1;
private Context context;
private final Context context;

DealWithArticleData(Context context) {
this.context = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class SearchActivity extends BaseActivity implements LoadMoreListener.OnL
private String searchid = "";
private boolean isEnableLoadMore = false;
private SimpleListAdapter adapter;
private List<SimpleListData> datas = new ArrayList<>();
private final List<SimpleListData> datas = new ArrayList<>();
private EditText searchInput;
private CardView searchCard;
private Animator animator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ public class ThemeActivity extends BaseActivity implements AdapterView.OnItemCli
public static final int THEME_DEFAULT = R.style.AppTheme;
public static final int THEME_NIGHT = 1;

private int[] colors = new int[]{
private final int[] colors = new int[]{
0xd12121, 0x1e1e1e, 0xf44836, 0xf2821e, 0x7bb736, 0x16c24b,
0x16a8c2, 0x2b86e3, 0x3f51b5, 0x9c27b0, 0xcc268f, 0x39c5bb
};

private int[] colorsDark = new int[]{
private final int[] colorsDark = new int[]{
0xac1c1b, 0x141414, 0xf44836, 0xf2821e, 0x7bb736, 0x16c24b,
0x16a8c2, 0x2b86e3, 0x3f51b5, 0x9c27b0, 0xcc268f, 0x39c5bb
};

private int[] themeIds = new int[]{
private final int[] themeIds = new int[]{
R.style.AppTheme, THEME_NIGHT, R.style.AppTheme_2,
R.style.AppTheme_3, R.style.AppTheme_4, R.style.AppTheme_5,
R.style.AppTheme_6, R.style.AppTheme_7, R.style.AppTheme_8,
R.style.AppTheme_9, R.style.AppTheme_10, R.style.AppTheme_11,
};

private String[] names = new String[]{
private final String[] names = new String[]{
"默认", "黑色", "橘红", "橘黄", "原谅", "翠绿",
"青色", "天蓝", "蓝色", "紫色", "紫红", "初音"
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class UserDetailActivity extends BaseActivity implements AddFriendDialog.
protected RecyclerView infoList;
protected CoordinatorLayout coordinatorLayout;
private CollapsingToolbarLayout collapsingToolbarLayout;
private List<SimpleListData> datas = new ArrayList<>();
private final List<SimpleListData> datas = new ArrayList<>();
private SimpleListAdapter adapter = null;
private GradeProgressView progressView;
private TextView progressText;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class ChatListAdapter extends BaseAdapter {
private final int LEFT_ITEM = 0;
private final int RIGHT_ITEM = 1;

private List<ChatListData> listData;
private Activity context;
private final List<ChatListData> listData;
private final Activity context;

public ChatListAdapter(Activity context, List<ChatListData> datas) {
listData = datas;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/me/yluo/ruisiapp/adapter/FriendAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
public class FriendAdapter extends BaseAdapter {

private List<FriendData> datas;
private Context context;
private ListItemLongClickListener listener;
private final List<FriendData> datas;
private final Context context;
private final ListItemLongClickListener listener;

public FriendAdapter(Context context, List<FriendData> datas, ListItemLongClickListener l) {
this.datas = datas;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
public class HistoryAdapter extends BaseAdapter {

private static final int CONTENT = 0;
private List<ReadHistoryData> datas;
private Context context;
private final List<ReadHistoryData> datas;
private final Context context;
private ListItemLongClickListener longClickListener;

public HistoryAdapter(Context context, List<ReadHistoryData> datas) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public class HotNewListAdapter extends BaseAdapter {
private static final int TYPE_ARTICLE_LIST = 3;
private static final int TYPE_ARTICLE_HEADER = 2;

private List<ArticleListData> dataSet;
private List<GalleryData> galleryDatas;
private Activity activity;
private int readcolor;
private final List<ArticleListData> dataSet;
private final List<GalleryData> galleryDatas;
private final Activity activity;
private final int readcolor;

public HotNewListAdapter(Activity activity, List<ArticleListData> dataSet, @Nullable List<GalleryData> galleryDatas) {
this.dataSet = dataSet;
Expand Down Expand Up @@ -120,7 +120,7 @@ void onBtnItemClick() {

//图片切换view
private class HeadViewHolder extends BaseViewHolder {
private MyGuildView guildView;
private final MyGuildView guildView;

HeadViewHolder(View itemView) {
super(itemView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class MainPageAdapter extends FragmentStatePagerAdapter {

private List<BaseLazyFragment> fragments;
private final List<BaseLazyFragment> fragments;

public MainPageAdapter(FragmentManager fm, List<BaseLazyFragment> fragments) {
super(fm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class MessageAdapter extends BaseAdapter {
protected Activity activity;
private List<MessageData> dataList;
private final List<MessageData> dataList;

public MessageAdapter(Activity activity, List<MessageData> dataSet) {
dataList = dataSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class MyPostsListAdapter extends BaseAdapter {

private List<SimpleListData> data = new ArrayList<>();
private Activity activity;
private final Activity activity;
private ListItemClickListener clickListener;

public MyPostsListAdapter(Activity activity, List<SimpleListData> datas) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class MyStarAdapter extends BaseAdapter {

private static final int CONTENT = 0;
private List<MyStarData> data = new ArrayList<>();
private Activity activity;
private final Activity activity;
private ListItemClickListener clickListener;
private ListItemLongClickListener longClickListener;

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/me/yluo/ruisiapp/adapter/PostAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class PostAdapter extends BaseAdapter {


//数据
private List<SingleArticleData> datalist;
private Activity activity;
private final List<SingleArticleData> datalist;
private final Activity activity;

public PostAdapter(
Activity activity, ListItemClickListener itemListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public class PostListAdapter extends BaseAdapter {
private int size = 0;
private int type = 3;

private List<ArticleListData> dataSet;
private Activity activity;
private final List<ArticleListData> dataSet;
private final Activity activity;

public PostListAdapter(Activity activity, List<ArticleListData> data, int type) {
dataSet = data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class SimpleListAdapter extends BaseAdapter {

private static final int CONTENT = 0;
private List<SimpleListData> data = new ArrayList<>();
private Activity activity;
private ListType type;
private final Activity activity;
private final ListType type;
private ListItemClickListener clickListener;

public SimpleListAdapter(ListType type, Activity activity, List<SimpleListData> datas) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/me/yluo/ruisiapp/adapter/SmileyAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
public class SmileyAdapter extends RecyclerView.Adapter<SmileyAdapter.SmileyViewHolder> {

private List<Pair<String, String>> smileys = new ArrayList<>();
private ListItemClickListener itemListener;
private Context context;
private final ListItemClickListener itemListener;
private final Context context;

public SmileyAdapter(Context context,ListItemClickListener itemListener, List<Pair<String, String>> smileys) {
this.smileys = smileys;
Expand All @@ -51,7 +51,7 @@ public int getItemCount() {
}

class SmileyViewHolder extends RecyclerView.ViewHolder {
private ImageView image;
private final ImageView image;

SmileyViewHolder(View itemView) {
super(itemView);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/me/yluo/ruisiapp/checknet/CheckNet.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class CheckNet {

private static final ExecutorService THREAD_POOL = Executors.newCachedThreadPool();
private Context context;
private final Context context;

public CheckNet(Context context) {
this.context = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* 检查网络回调
*/
public abstract class CheckNetResponse {
private Handler handler;
private final Handler handler;
private Looper looper = null;

protected CheckNetResponse() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/me/yluo/ruisiapp/database/MyDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


public class MyDB {
private Context context;
private final Context context;
/**
* 浏览历史表
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected void onCreate(Bundle savedInstanceState) {
int progress = getIntent().getIntExtra("progress", 0);
//FileUtil.requestHandleFile(this,fileName);
Log.i("fileInfo", fileName);
TextView downPath = (TextView) findViewById(R.id.down_path);
TextView downPath = findViewById(R.id.down_path);
downPath.setText("文件下载目录:" + FileUtil.DOWNLOAD_PATH);

downloadInfo = findViewById(R.id.download_info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DownloadService extends Service {

private Notification.Builder mBuilder;
private NotificationManager mNotifyManager;
private Intent intent = new Intent("me.yluo.ruisiapp.download");
private final Intent intent = new Intent("me.yluo.ruisiapp.download");

private FileResponseHandler handler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public class FrageHistory extends BaseFragment {

private List<ReadHistoryData> datas = new ArrayList<>();
private final List<ReadHistoryData> datas = new ArrayList<>();
private HistoryAdapter adapter;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public class FrageHotsNews extends BaseLazyFragment implements LoadMoreListener.
private int currentType = 1;
protected RecyclerView postList;
protected SwipeRefreshLayout refreshLayout;
private List<GalleryData> galleryDatas = new ArrayList<>();
private List<ArticleListData> mydataset = new ArrayList<>();
private final List<GalleryData> galleryDatas = new ArrayList<>();
private final List<ArticleListData> mydataset = new ArrayList<>();
private HotNewListAdapter adapter;
private boolean isEnableLoadMore = false;
private int currentPage = 1;
Expand Down
Loading

0 comments on commit 4c3a849

Please sign in to comment.