Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android-x 后续修改 #81

Open
wants to merge 26 commits into
base: android-x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7e7e20a
fork XDroidMvp 并修改support依赖为AndroidX依赖
lennon19940306 Nov 27, 2019
65223ee
Update Readme.md
lennon19940306 Nov 27, 2019
97b01b4
修改配置文件
lennon19940306 Nov 28, 2019
43a337b
Set theme jekyll-theme-hacker
lennon19940306 Nov 28, 2019
47cccc8
Set theme jekyll-theme-hacker
lennon19940306 Nov 28, 2019
75ee6b0
Merge branch 'master' of https://github.com/lennon19940306/XDroidMvp-…
lennon19940306 Nov 28, 2019
a42763b
修复recyclerview remove最后一项列表项时,会导致崩溃
lennon19940306 Dec 11, 2019
4750588
修复recyclerview remove最后一项列表项时,会导致崩溃
lennon19940306 Dec 11, 2019
5aefd7a
修复recyclerview remove最后一项列表项时,会导致崩溃
lennon19940306 Dec 11, 2019
78d10cd
更新
lennon19940306 Dec 25, 2019
0ef7021
新增日志输出文件配置,允许日志输出为文件,更新部分依赖的版本
lennon19940306 Apr 1, 2020
5d21e50
修改toast弹窗逻辑
lennon19940306 Apr 8, 2020
6ec8759
新增二维码生成工具包
lennon19940306 Apr 28, 2020
1448da2
新增屏幕适配控制开关
lennon19940306 Apr 28, 2020
43669fa
修改了部分代码,加入了定时结束弹窗
lennon19940306 Jun 22, 2020
603c744
配置修改,加入双屏异显base
lennon19940306 Jul 8, 2020
27e166c
加入AES加解密工具,并修改RSA解密兼容
lennon19940306 Aug 7, 2020
6d638fa
更新代码
lennon19940306 Dec 30, 2020
745982d
更新kotlin版本,支持最新的viewBinding
lennon19940306 Jan 6, 2021
dff0914
使用viewbinding
lennon19940306 Mar 16, 2021
df59689
修改gradle上传maven配置
lennon19940306 Jun 4, 2021
52dcb69
Update Readme.md
lennon19940306 Jun 17, 2021
57f5191
修改gradle上传maven配置
lennon19940306 Jun 24, 2021
3c4d954
更新部分SDK版本
lennon19940306 Jun 25, 2021
dae644e
Merge remote-tracking branch 'origin/master'
lennon19940306 Jun 25, 2021
4e0b4da
修改版本
lennon19940306 Jun 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#XDroidMvp 轻量级的Android MVP快速开发框架
#XDroidMvp 轻量级的Android MVP快速开发框架(AndroidX适配版本)

## 概述

Expand Down Expand Up @@ -196,10 +196,19 @@ dependencies {
* [ButterKnife](https://github.com/JakeWharton/butterknife)使用的是8.4.0版本,重点是 `@BindView`,可以去项目官网查看。
* [Rxlifecycle](https://github.com/trello/RxLifecycle)使用的是1.0版本,具体如何使用可以查看官网。
* [RxPermissions](https://github.com/tbruyelle/RxPermissions)使用的是0.9.1版本,具体如何使用可以查看官网。
* [retrofit](https://github.com/square/retrofit),具体如何使用可以查看官网。
* [retrofit](https://github.com/square/retrofit),具体如何使用可以查看官网。
* [一定]()要修改当前项目的 gradle.properties添加
android.useAndroidX=true
android.enableJetifier=true
* [注意]()使用viewBinding的模块需要在 build.gradle中的 android节点内添加
buildFeatures {
viewBinding true
}

## 更新日志

* 2021-01-06, 添加viewBinding支持
* 2019-11-27, 修改support依赖为AndroidX依赖
* 2017-04-23,新增proguard rules,upgrade to rx2
* 2016-12-23,新增mvp、base、cache、event、imageloader、log、router
* 2016-12-25,新增rxJava、rxAndroid、rxlifecycle、rxpermission、rxbus、net(retrofit)
Expand All @@ -225,8 +234,11 @@ dependencies {

**XDroid交流群**:153569290

**XDroid MVP原版**:[XDroidMvp](https://github.com/limedroid/XDroidMvp)

**XDroid MVC版本**:[XDroid](https://github.com/limedroid/XDroid)

若您在使用过程中遇到任何问题,欢迎加入 **153569290** 群或者是邮件反馈,谢谢您的关注。**XDroidMvp**会持续维护,如果喜欢,记得star fork。

[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)

1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-hacker
17 changes: 12 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.android.compileSdkVersion

buildToolsVersion "29.0.3"
defaultConfig {
applicationId 'cn.droidlover.xdroidmvp.demo'
minSdkVersion rootProject.ext.android.minSdkVersion
Expand All @@ -17,12 +17,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}

}


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
annotationProcessor rootProject.ext.dependencies["butterknife-apt"]
implementation rootProject.ext.dependencies["avi-loading"]
implementation project(":mvp")
api fileTree(dir: 'libs', include: ['*.jar'])
api rootProject.ext.dependencies["avi-loading"]
api "com.lennon.utill:xdroid-mvp:1.0.1"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.droidlover.xdroidmvp.demo.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cn.droidlover.xdroidmvp.demo.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.graphics.Color;
import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import cn.droidlover.xdroidmvp.demo.model.GankResults;
import cn.droidlover.xdroidmvp.demo.present.PBasePager;
import cn.droidlover.xdroidmvp.demo.widget.StateView;
import cn.droidlover.xdroidmvp.mvp.XLazyFragment;
import cn.droidlover.xdroidmvp.net.NetError;
import cn.droidlover.xrecyclerview.XRecyclerContentLayout;
import cn.droidlover.xrecyclerview.XRecyclerView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package cn.droidlover.xdroidmvp.demo.ui;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import android.view.MenuItem;

import java.util.ArrayList;
Expand All @@ -14,6 +13,7 @@
import cn.droidlover.xdroidmvp.base.XFragmentAdapter;
import cn.droidlover.xdroidmvp.demo.R;
import cn.droidlover.xdroidmvp.mvp.XActivity;
import com.google.android.material.tabs.TabLayout;

/**
* Created by wanglei on 2016/12/22.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.widget.Toolbar;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -13,6 +12,7 @@
import android.webkit.WebView;
import android.webkit.WebViewClient;

import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import cn.droidlover.xdroidmvp.demo.R;
import cn.droidlover.xdroidmvp.demo.kit.AppKit;
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
Expand All @@ -19,17 +19,17 @@
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

<android.support.design.widget.TabLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />


</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.widget.SwipeRefreshLayout
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand All @@ -21,7 +21,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />

</android.support.v4.widget.SwipeRefreshLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

</cn.droidlover.xstatecontroller.XStateController>

Expand Down
20 changes: 10 additions & 10 deletions app/src/main/res/layout/view_loading.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff">

<com.wang.avi.AVLoadingIndicatorView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
app:indicator="LineScale"
app:indicator_color="@color/colorPrimary" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
app:indicatorColor="@color/colorPrimary"
app:indicatorName="LineScale" />
</FrameLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/view_toolbar.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>
27 changes: 8 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "conf.gradle"

buildscript {
ext.kotlin_version = '1.5.10'
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven {url 'http://127.0.0.1:8081/repository/lennon/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
maven { url "https://jitpack.io" }
maven {url 'http://127.0.0.1:8081/repository/lennon/' }
}
tasks.withType(Javadoc).all {
enabled = false
}
}

Expand Down
Loading