Skip to content

Commit

Permalink
refactor project
Browse files Browse the repository at this point in the history
  • Loading branch information
sucese committed Oct 21, 2017
1 parent 5a6dcc9 commit 970ef17
Show file tree
Hide file tree
Showing 34 changed files with 49 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-rc2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

Expand Down
3 changes: 3 additions & 0 deletions phoenix-compress-picture/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.guoxiaoxing'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
3 changes: 3 additions & 0 deletions phoenix-compress-video/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.guoxiaoxing'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
3 changes: 3 additions & 0 deletions phoenix-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.guoxiaoxing'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
3 changes: 3 additions & 0 deletions phoenix-ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.guoxiaoxing'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import android.content.Context;
import android.content.Intent;

import com.guoxiaoxing.phoenix.R;
import com.guoxiaoxing.phoenix.core.PhoenixOption;
import com.guoxiaoxing.phoenix.core.listener.Starter;
import com.guoxiaoxing.phoenix.R;
import com.guoxiaoxing.phoenix.picker.ui.camera.CameraActivity;
import com.guoxiaoxing.phoenix.picker.ui.picker.PickerActivity;
import com.guoxiaoxing.phoenix.picker.ui.picker.PreviewActivity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,19 @@ import android.view.ViewGroup
import android.view.animation.Animation
import android.widget.ImageView
import android.widget.Toast

import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.bitmap.BitmapTransitionOptions
import com.bumptech.glide.request.RequestOptions
import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.picker.util.AnimationLoader
import com.guoxiaoxing.phoenix.core.PhoenixOption
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.core.model.MimeType
import com.guoxiaoxing.phoenix.picker.util.DateUtils
import com.guoxiaoxing.phoenix.picker.util.DebugUtil
import com.guoxiaoxing.phoenix.picker.util.StringUtils
import com.guoxiaoxing.phoenix.picker.util.VoiceUtils

import com.guoxiaoxing.phoenix.picker.util.*
import kotlinx.android.synthetic.main.item_camera.view.*
import kotlinx.android.synthetic.main.item_grid_media.view.*

import java.util.ArrayList
import java.util.*

class PickerAdapter(private val context: Context, private val config: PhoenixOption) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView

import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.RequestOptions
Expand All @@ -18,8 +17,7 @@ import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.core.model.MimeType
import com.guoxiaoxing.phoenix.picker.model.MediaFolder

import java.util.ArrayList
import java.util.*

class PickerAlbumAdapter(private val mContext: Context) : RecyclerView.Adapter<PickerAlbumAdapter.ViewHolder>() {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.souche.android.sdk.media.editor.operation

import com.guoxiaoxing.phoenix.picture.edit.operation.Operation

interface OperationListener {

fun onOperationSelected(operation: com.guoxiaoxing.phoenix.picture.edit.operation.Operation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ import android.support.v4.app.LoaderManager
import android.support.v4.content.CursorLoader
import android.support.v4.content.Loader
import android.text.TextUtils

import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.core.model.MimeType
import com.guoxiaoxing.phoenix.picker.util.DebugUtil

import java.io.File
import java.util.ArrayList
import java.util.Collections
import java.util.Comparator
import java.util.*

class MediaLoader(private val activity: FragmentActivity, type: Int, private val isGif: Boolean, videoS: Long) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package com.guoxiaoxing.phoenix.picker.rx.bus
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.picker.model.MediaFolder
import com.guoxiaoxing.phoenix.picker.util.DebugUtil

import java.util.ArrayList
import java.util.*

class ImagesObservable private constructor() : SubjectListener {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.guoxiaoxing.phoenix.picker.rx.bus

import java.util.ArrayList
import java.util.HashMap

import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable
import io.reactivex.Scheduler
Expand All @@ -11,6 +8,7 @@ import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import io.reactivex.subjects.PublishSubject
import io.reactivex.subjects.Subject
import java.util.*

class RxBus private constructor() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import android.annotation.TargetApi
import android.app.Activity
import android.os.Build
import android.text.TextUtils

import java.util.ArrayList

import io.reactivex.Observable
import io.reactivex.ObservableSource
import io.reactivex.ObservableTransformer
import io.reactivex.functions.Function
import io.reactivex.subjects.PublishSubject
import java.util.*

class RxPermissions(activity: Activity) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.util.Log

import java.util.HashMap

import io.reactivex.subjects.PublishSubject
import java.util.*

class RxPermissionsFragment : Fragment() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,28 @@ import android.os.Bundle
import android.provider.MediaStore
import android.support.v4.app.FragmentActivity
import android.widget.Toast

import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.picker.Phoenix
import com.guoxiaoxing.phoenix.core.PhoenixOption
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.listener.OnPickerListener
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.core.model.MimeType
import com.guoxiaoxing.phoenix.core.util.ReflectUtils
import com.guoxiaoxing.phoenix.picker.Phoenix
import com.guoxiaoxing.phoenix.picker.model.MediaFolder
import com.guoxiaoxing.phoenix.picker.util.AttrsUtils
import com.guoxiaoxing.phoenix.picker.util.DateUtils
import com.guoxiaoxing.phoenix.picker.util.DoubleUtils
import com.guoxiaoxing.phoenix.picker.util.PictureFileUtils
import com.guoxiaoxing.phoenix.picker.widget.dialog.PhoenixLoadingDialog

import java.io.File
import java.util.ArrayList

import io.reactivex.Observable
import io.reactivex.ObservableOnSubscribe
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import java.io.File
import java.util.*


open class BaseActivity : FragmentActivity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@ import android.content.Context
import android.os.Bundle
import android.support.v4.app.Fragment
import android.widget.Toast

import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.picker.Phoenix
import com.guoxiaoxing.phoenix.core.PhoenixOption
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.listener.OnPickerListener
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.core.model.MimeType
import com.guoxiaoxing.phoenix.core.util.ReflectUtils
import com.guoxiaoxing.phoenix.picker.Phoenix
import com.guoxiaoxing.phoenix.picker.util.AttrsUtils
import com.guoxiaoxing.phoenix.picker.widget.dialog.PhoenixLoadingDialog

import java.util.ArrayList

import io.reactivex.Observable
import io.reactivex.ObservableOnSubscribe
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
import java.util.*

/**
* For more information, you can visit https://github.com/guoxiaoxing or contact me by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ import android.Manifest
import android.os.Bundle
import android.util.Log
import android.widget.Toast

import com.amap.api.location.AMapLocationClient
import com.amap.api.location.AMapLocationClientOption
import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.picker.rx.permission.RxPermissions
import com.guoxiaoxing.phoenix.picker.ui.BaseActivity

import java.util.ArrayList

import io.reactivex.Observer
import io.reactivex.disposables.Disposable
import java.util.*

class CameraActivity : BaseActivity() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,23 @@ import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.hardware.Camera
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.hardware.*
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Message
import android.text.TextUtils
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.OrientationEventListener
import android.view.SurfaceHolder
import android.view.View
import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.view.*
import android.widget.Toast

import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.picker.ui.BaseFragment
import kotlinx.android.synthetic.main.fragment_camera.*
import kotlinx.android.synthetic.main.include_camera_bottom_tool.*
import kotlinx.android.synthetic.main.include_camera_hint.*
import kotlinx.android.synthetic.main.include_camera_top_tool.*

import java.io.IOException
import java.util.HashMap
import java.util.*

class CameraFragment : BaseFragment(), SurfaceHolder.Callback, Camera.PictureCallback, View.OnClickListener
, SensorEventListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.guoxiaoxing.phoenix.picker.ui.picker

import android.Manifest
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.support.v4.content.ContextCompat
Expand Down Expand Up @@ -36,7 +35,7 @@ import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.activity_picker.*
import kotlinx.android.synthetic.main.include_title_bar.*
import java.io.Serializable
import java.util.ArrayList
import java.util.*

/**
* For more information, you can visit https://github.com/guoxiaoxing or contact me by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package com.guoxiaoxing.phoenix.picker.ui.picker

import android.os.Bundle
import android.os.Parcelable

import com.guoxiaoxing.phoenix.R
import com.guoxiaoxing.phoenix.core.common.PhoenixConstant
import com.guoxiaoxing.phoenix.core.model.MediaEntity
import com.guoxiaoxing.phoenix.picker.rx.bus.ImagesObservable
import com.guoxiaoxing.phoenix.picker.ui.BaseActivity

import java.util.ArrayList
import java.util.*

class PreviewActivity : BaseActivity() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import android.view.View
import android.view.ViewGroup
import android.view.animation.Animation
import android.widget.ImageView

import com.bumptech.glide.Glide
import com.bumptech.glide.Priority
import com.bumptech.glide.load.engine.DiskCacheStrategy
Expand All @@ -32,10 +31,8 @@ import com.guoxiaoxing.phoenix.picker.util.*
import com.guoxiaoxing.phoenix.picker.widget.photoview.OnPhotoTapListener
import com.guoxiaoxing.phoenix.picker.widget.photoview.PhotoView
import com.guoxiaoxing.phoenix.picker.widget.videoview.PhoenixVideoView

import kotlinx.android.synthetic.main.fragment_preview.*

import java.util.ArrayList
import java.util.*

class PreviewFragment : BaseFragment(), View.OnClickListener, Animation.AnimationListener, OnPictureEditListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ import android.content.res.Resources
import android.content.res.XmlResourceParser
import android.util.AttributeSet
import android.util.Xml
import android.view.animation.AlphaAnimation
import android.view.animation.Animation
import android.view.animation.AnimationSet
import android.view.animation.RotateAnimation
import android.view.animation.ScaleAnimation
import android.view.animation.TranslateAnimation

import android.view.animation.*
import org.xmlpull.v1.XmlPullParser
import org.xmlpull.v1.XmlPullParserException

import java.io.IOException

object AnimationLoader {
Expand Down
Loading

0 comments on commit 970ef17

Please sign in to comment.