格式化部分代码

old
Administrator 5 years ago
parent 32c909adb8
commit ad9f40a665
  1. 2
      .idea/misc.xml
  2. 4
      app/src/main/java/com/novel/read/utlis/StringUtils.java
  3. 1
      app/src/main/java/com/novel/read/widget/dialog/ReadSettingDialog.kt
  4. 5
      app/src/main/java/com/novel/read/widget/page/LocalPageLoader.java
  5. 3
      app/src/main/java/com/novel/read/widget/page/NetPageLoader.java
  6. 3
      app/src/main/java/com/novel/read/widget/page/PageAnimation.java
  7. 3
      app/src/main/java/com/novel/read/widget/page/PageLoader.java
  8. 3
      app/src/main/java/com/novel/read/widget/page/PageMode.java
  9. 5
      app/src/main/java/com/novel/read/widget/page/PageStyle.java
  10. 3
      app/src/main/java/com/novel/read/widget/page/TxtChapter.java
  11. 4
      app/src/main/java/com/novel/read/widget/page/Void.java
  12. 3
      app/src/main/java/com/novel/read/widget/page/anim/CoverPageAnim.java
  13. 4
      app/src/main/java/com/novel/read/widget/page/anim/HorizonPageAnim.java
  14. 3
      app/src/main/java/com/novel/read/widget/page/anim/NonePageAnim.java
  15. 4
      app/src/main/java/com/novel/read/widget/page/anim/ScrollPageAnim.java
  16. 3
      app/src/main/java/com/novel/read/widget/page/anim/SimulationPageAnim.java
  17. 2
      app/src/main/java/com/novel/read/widget/page/anim/SlidePageAnim.java

@ -10,7 +10,7 @@
<item index="0" class="java.lang.String" itemvalue="com.squareup.otto.Subscribe" />
</list>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

@ -35,13 +35,13 @@ public class StringUtils {
}
private static String deleteImgs(String content) {
if (content!=null&&!TextUtils.isEmpty(content)){
if (content != null && !TextUtils.isEmpty(content)) {
// 去掉所有html元素,
String str = content.replaceAll("\\&[a-zA-Z]{1,10};", "").replaceAll(
"<[^>]*>", "");
str = str.replaceAll("[(/>)<]", "");
return str;
}else {
} else {
return "";
}
}

@ -91,7 +91,6 @@ class ReadSettingDialog(mActivity: Activity, private var mPageLoader: PageLoader
}
private fun getDrawable(drawRes: Int): Drawable? {
return ContextCompat.getDrawable(context, drawRes)
}

@ -34,11 +34,8 @@ import io.reactivex.SingleOnSubscribe;
import io.reactivex.disposables.Disposable;
/**
* Created by newbiechen on 17-7-1.
* 问题:
* 1. 异常处理没有做好
* Created by zlj
*/
public class LocalPageLoader extends PageLoader {
private static final String TAG = "LocalPageLoader";
//默认从文件中获取数据的长度

@ -17,10 +17,9 @@ import java.util.ArrayList;
import java.util.List;
/**
* Created by newbiechen on 17-5-29.
* Created by zlj
* 网络页面加载器
*/
public class NetPageLoader extends PageLoader {
private static final String TAG = "PageFactory";
private Context mContext;

@ -8,10 +8,9 @@ import android.view.animation.LinearInterpolator;
import android.widget.Scroller;
/**
* Created by newbiechen on 17-7-24.
* Created by zlj
* 翻页动画抽象类
*/
public abstract class PageAnimation {
//正在使用的View
protected View mView;

@ -46,9 +46,8 @@ import io.reactivex.SingleOnSubscribe;
import io.reactivex.disposables.Disposable;
/**
* Created by newbiechen on 17-7-1.
* Created by zlj
*/
public abstract class PageLoader {
private static final String TAG = "PageLoader";

@ -1,10 +1,9 @@
package com.novel.read.widget.page;
/**
* Created by newbiechen on 2018/2/5.
* Created by zlj
* 作用翻页动画的模式
*/
public enum PageMode {
SIMULATION, COVER, SLIDE, NONE, SCROLL
}

@ -6,10 +6,9 @@ import androidx.annotation.ColorRes;
import com.novel.read.R;
/**
* Created by newbiechen on 2018/2/5.
* 作用页面的展示风格
* Created by zlj
* 页面的展示风格
*/
public enum PageStyle {
BG_0(R.color.nb_read_font_1, R.color.nb_read_bg_1),
BG_1(R.color.nb_read_font_2, R.color.nb_read_bg_2),

@ -1,9 +1,8 @@
package com.novel.read.widget.page;
/**
* Created by newbiechen on 17-7-1.
* Created by zlj
*/
public class TxtChapter {
//章节所属的小说(网络)

@ -1,8 +1,4 @@
package com.novel.read.widget.page;
/**
* Created by newbiechen on 17-5-27.
*/
public final class Void {
}

@ -7,7 +7,8 @@ import android.graphics.drawable.GradientDrawable;
import android.view.View;
/**
* Created by newbiechen on 17-7-24.
* Created by zlj
* 覆盖动画
*/
public class CoverPageAnim extends HorizonPageAnim {

@ -9,8 +9,8 @@ import android.view.ViewConfiguration;
import com.novel.read.widget.page.PageAnimation;
/**
* Created by newbiechen on 17-7-24.
* 横向动画的模板
* Created by zlj
* 横向动画
*/
public abstract class HorizonPageAnim extends PageAnimation {

@ -4,7 +4,8 @@ import android.graphics.Canvas;
import android.view.View;
/**
* Created by newbiechen on 17-7-24.
* Created by zlj
*
*/
public class NonePageAnim extends HorizonPageAnim{

@ -14,10 +14,8 @@ import java.util.ArrayList;
import java.util.Iterator;
/**
* Created by newbiechen on 17-7-23.
* Created by zlj
* 原理:仿照ListView源码实现的上下滑动效果
* Alter by: zeroAngus
* <p>
* 问题:
* 1. 向上翻页重复的问题 (完成)
* 2. 滑动卡顿的问题原因:由于绘制的数据过多造成的卡顿问题 (主要是文字绘制需要的时长比较多) 解决办法做文字缓冲

@ -15,7 +15,8 @@ import android.os.Build;
import android.view.View;
/**
* Created by newbiechen on 17-7-24.
* Created by zlj
* 仿真动画
*/
public class SimulationPageAnim extends HorizonPageAnim {

@ -5,7 +5,7 @@ import android.graphics.Rect;
import android.view.View;
/**
* Created by newbiechen on 17-7-24.
* Created by zlj
*/
public class SlidePageAnim extends HorizonPageAnim {

Loading…
Cancel
Save