Skip to content

Commit

Permalink
Add find back password
Browse files Browse the repository at this point in the history
  • Loading branch information
DanteAndroid committed Oct 23, 2019
1 parent f99b464 commit 0bc745a
Show file tree
Hide file tree
Showing 103 changed files with 545 additions and 477 deletions.
40 changes: 20 additions & 20 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ apply plugin: 'realm-android'
apply plugin: 'com.bugtags.library.plugin'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "com.dante.diary"
minSdkVersion 19
targetSdkVersion 27
versionCode 52
versionName "2.1"
targetSdkVersion 29
versionCode 53
versionName "2.2"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
manifestPlaceholders = [
Expand Down Expand Up @@ -83,9 +83,9 @@ dependencies {
implementation 'moe.feng:AlipayZeroSdk:1.1'
implementation 'com.github.jaychang0917:SimpleText:1.2.1'
implementation 'com.bugtags.library:bugtags-lib:2.3.1'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.jakewharton:butterknife:10.2.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.blankj:utilcode:1.3.6'
implementation 'com.hwangjr.proguard:proguardconfig:1.0.1@aar'
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.34'
Expand All @@ -99,9 +99,9 @@ dependencies {
implementation 'com.artemzin.rxjava:proguard-rules:1.3.3.0'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.1.0'
//============== custom ==============
implementation 'uk.co.samuelwall:material-tap-target-prompt:2.1.0'
implementation 'com.github.deano2390:FlowTextView:2.0.5'
Expand All @@ -113,24 +113,24 @@ dependencies {
implementation 'com.github.XunMengWinter:CircularAnim:0.3.4'
implementation 'io.github.yavski:fab-speed-dial:1.0.6'
implementation 'com.classic.common:multiple-status-view:1.2'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'jp.wasabeef:glide-transformations:4.1.0'
implementation 'cn.leancloud.android:avoscloud-sdk:v4.6.4'
implementation('cn.leancloud.android:avoscloud-push:v4.6.4@aar') { transitive = true }
// 推送与实时聊天需要的包

//============== official ==============
implementation "com.android.support:design:$supportVersion"
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:support-v4:$supportVersion"
implementation "com.android.support:cardview-v7:$supportVersion"
implementation "com.android.support:recyclerview-v7:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

//============== debug ==============
// implementation 'cn.jiguang.sdk:jpush:3.0.3'
// implementation 'cn.jiguang.sdk:jcore:1.1.1'
implementation "com.android.support:support-vector-drawable:$supportVersion"
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
// releaseimplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
// debugimplementation 'com.squareup.leakcanary:leakcanary-android:1.5'

Expand Down
12 changes: 8 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>


<application
android:name=".base.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar" tools:ignore="GoogleAppIndexingWarning">
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme.NoActionBar"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<activity
android:name=".main.MainActivity"
android:launchMode="singleTop">
Expand Down Expand Up @@ -60,7 +64,7 @@
android:name=".login.LoginActivity"
android:theme="@style/ViewerTheme.TransNav.Placeholder"
android:launchMode="singleTask"
android:windowSoftInputMode="stateHidden|adjustPan">
android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down Expand Up @@ -91,7 +95,7 @@
android:windowSoftInputMode="stateHidden"/>

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/dante/diary/base/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
Expand All @@ -15,6 +14,7 @@
import com.dante.diary.utils.AppUtil;
import com.dante.diary.utils.SpUtil;

import androidx.annotation.Nullable;
import butterknife.BindView;

import static com.dante.diary.base.App.context;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/dante/diary/base/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.dante.diary.chat.PMMessageHandler;
import com.dante.diary.login.LoginActivity;

import androidx.appcompat.app.AppCompatDelegate;
import io.realm.Realm;

/**
Expand Down Expand Up @@ -51,5 +52,6 @@ public void onCreate() {
Utils.init(this);
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
}
10 changes: 5 additions & 5 deletions app/src/main/java/com/dante/diary/base/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.annotation.CallSuper;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MotionEvent;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
Expand All @@ -14,6 +10,10 @@
import com.dante.diary.R;
import com.dante.diary.model.DataBase;

import androidx.annotation.CallSuper;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import butterknife.ButterKnife;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
Expand Down Expand Up @@ -66,7 +66,7 @@ private void initSDK() {


public void initAppBar() {
toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar = findViewById(R.id.toolbar);
if (null != toolbar) {
setSupportActionBar(toolbar);
}
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/dante/diary/base/BaseFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.AppBarLayout;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.transition.Fade;
import android.transition.Transition;
import android.util.Log;
Expand All @@ -19,7 +13,13 @@
import com.dante.diary.BuildConfig;
import com.dante.diary.R;
import com.dante.diary.model.DataBase;
import com.google.android.material.appbar.AppBarLayout;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import butterknife.ButterKnife;
import rx.Observable;
import rx.Subscription;
Expand Down
7 changes: 3 additions & 4 deletions app/src/main/java/com/dante/diary/base/BottomBarActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.View;

Expand All @@ -19,6 +16,8 @@
import com.ncapdevi.fragnav.FragNavController;
import com.roughike.bottombar.BottomBar;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import butterknife.BindView;
import rx.Subscription;

Expand Down Expand Up @@ -46,7 +45,7 @@ protected void initViews(@Nullable Bundle savedInstanceState) {
}

controller = new FragNavController(savedInstanceState, getSupportFragmentManager(), R.id.container, this, 4, MAIN);
controller.setTransitionMode(FragmentTransaction.TRANSIT_NONE);
// controller.setTransitionMode(FragmentTransaction.TRANSIT_NONE);
initBottomBar();
fetchNotifications();
}
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/dante/diary/base/RecyclerFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@


import android.os.Handler;
import android.support.annotation.CallSuper;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.dante.diary.R;
import com.dante.diary.utils.SpUtil;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

import androidx.annotation.CallSuper;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;

/**
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/dante/diary/base/TabPagerAdapter.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.dante.diary.base;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

/**
* Created by yons on 17/3/17.
*/
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/dante/diary/base/ViewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;

import com.dante.diary.R;
import com.dante.diary.detail.DiaryDetailFragment;
import com.dante.diary.profile.DiaryListFragment;
import com.dante.diary.profile.ProfileFragment;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class ViewActivity extends BaseActivity {
public static final String TYPE_PROFILE = "profile";

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/dante/diary/chat/ChatService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.dante.diary.chat;

import android.support.annotation.NonNull;
import android.util.Log;

import com.avos.avoscloud.im.v2.AVIMClient;
Expand All @@ -17,6 +16,8 @@
import java.util.Collections;
import java.util.List;

import androidx.annotation.NonNull;

/**
* Created by yons on 17/4/14.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.Menu;
import android.widget.Toast;
Expand Down Expand Up @@ -37,6 +36,7 @@
import java.util.Date;
import java.util.List;

import androidx.annotation.Nullable;
import butterknife.BindView;
import rx.Subscriber;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.util.SparseArray;
import android.view.Gravity;
Expand All @@ -19,6 +15,11 @@

import com.dante.diary.R;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;

/**
* A BottomDialogFragment that uses for comment.
*/
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/dante/diary/custom/DownloadHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.support.v4.content.FileProvider;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.MimeTypeMap;
Expand All @@ -20,12 +19,14 @@

import java.io.File;

import static com.bumptech.glide.gifdecoder.GifHeaderParser.TAG;
import androidx.core.content.FileProvider;


/**
* Download and install apk file.
*/
public class DownloadHelper {
private static final String TAG = "DownloadHelper";
private BroadcastReceiver receiver;
private String url;
private String apkName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.dante.diary.custom;

import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.LinearInterpolator;

import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.ViewCompat;
import io.github.yavski.fabspeeddial.FabSpeedDial;
import io.github.yavski.fabspeeddial.FabSpeedDialBehaviour;

Expand Down
Loading

0 comments on commit 0bc745a

Please sign in to comment.