├── README.md
├── advanced
├── .gitignore
├── advanced.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── advanced
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── aidl
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── advanced
│ │ │ └── aidl
│ │ │ ├── INoteManager.aidl
│ │ │ └── Note.aidl
│ ├── debug
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── advanced
│ │ │ ├── Activity2.java
│ │ │ ├── MainActivity.java
│ │ │ ├── ModuleAdvancedApp.java
│ │ │ ├── aidl
│ │ │ ├── Note.java
│ │ │ └── NoteService.java
│ │ │ ├── callback
│ │ │ ├── ActResultRequest.java
│ │ │ └── OnActResultEventDispatcherFragment.java
│ │ │ ├── keepalive
│ │ │ └── LongLiveService.java
│ │ │ ├── messenger
│ │ │ └── MessengerService.java
│ │ │ └── remote
│ │ │ ├── Remote2Activity.java
│ │ │ └── RemoteActivity.java
│ └── res
│ │ ├── layout
│ │ ├── activity_2.xml
│ │ ├── activity_advanced.xml
│ │ └── activity_remote.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── advanced
│ └── ExampleUnitTest.java
├── animations
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── animations
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── debug
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── animations
│ │ │ ├── DrawableActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── ModuleAnimationsApp.java
│ │ │ └── reveal
│ │ │ └── CircleRevealActivity.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── drawable_bitmap.xml
│ │ ├── drawable_bitmap_no_filter.xml
│ │ ├── drawable_layer.xml
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_anim.xml
│ │ ├── activity_circle_reveal.xml
│ │ └── activity_drawable.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── animations
│ └── ExampleUnitTest.java
├── client
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── channel
│ ├── fabric.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── me
│ │ │ └── shouheng
│ │ │ └── references
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ │ ├── camera.aar
│ │ │ ├── guokr.articleInline.js
│ │ │ ├── guokr.base.js
│ │ │ └── guokr_master.css
│ │ ├── java
│ │ │ └── me
│ │ │ │ └── shouheng
│ │ │ │ └── references
│ │ │ │ ├── MyApplication.java
│ │ │ │ ├── view
│ │ │ │ ├── intro
│ │ │ │ │ ├── AppIntroActivity.java
│ │ │ │ │ ├── IntroFragment.java
│ │ │ │ │ ├── IntroSlide1.java
│ │ │ │ │ ├── IntroSlide2.java
│ │ │ │ │ ├── IntroSlide3.java
│ │ │ │ │ └── IntroSlide4.java
│ │ │ │ └── main
│ │ │ │ │ └── MainActivity.java
│ │ │ │ └── viewmodel
│ │ │ │ └── MainViewModel.java
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ └── fragment_intro_slide.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ ├── provider_paths.xml
│ │ │ └── shortcuts.xml
│ │ └── test
│ │ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── references
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── palm.jks
└── settings.gradle
├── commons
├── .gitignore
├── build.gradle
├── libs
│ ├── armeabi-v7a
│ │ └── libpldroidplayer.so
│ ├── armeabi
│ │ └── libpldroidplayer.so
│ └── pldroid-player-1.5.0.jar
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── commons
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── commons
│ │ │ ├── BaseApplication.java
│ │ │ ├── config
│ │ │ ├── BaseConstants.java
│ │ │ └── Configs.java
│ │ │ ├── di
│ │ │ ├── AppComponent.java
│ │ │ ├── enums
│ │ │ │ ├── ActivityScoped.java
│ │ │ │ └── ViewModelKey.java
│ │ │ └── module
│ │ │ │ └── AppModule.java
│ │ │ ├── model
│ │ │ ├── Resource.java
│ │ │ └── Status.java
│ │ │ ├── rxbus
│ │ │ └── RxBus.java
│ │ │ ├── tools
│ │ │ ├── ColorUtils.java
│ │ │ ├── FragmentHelper.java
│ │ │ ├── LogUtils.java
│ │ │ ├── NetworkUtils.java
│ │ │ ├── PalmUtils.java
│ │ │ ├── StringUtils.java
│ │ │ ├── TimeUtils.java
│ │ │ ├── ToastUtils.java
│ │ │ ├── ViewUtils.java
│ │ │ ├── glide
│ │ │ │ └── MyAppGlideModule.java
│ │ │ ├── permission
│ │ │ │ ├── OnGetPermissionCallback.java
│ │ │ │ └── PermissionUtils.java
│ │ │ └── theme
│ │ │ │ ├── SystemUiVisibilityUtil.java
│ │ │ │ └── ThemeUtils.java
│ │ │ └── view
│ │ │ ├── activity
│ │ │ ├── BaseActivity.java
│ │ │ ├── CommonActivity.java
│ │ │ ├── CommonDaggerActivity.java
│ │ │ └── UMengActivity.java
│ │ │ ├── fragment
│ │ │ ├── CommonDaggerFragment.java
│ │ │ └── CommonFragment.java
│ │ │ └── widget
│ │ │ ├── CircleImageView.java
│ │ │ ├── DividerItemDecoration.java
│ │ │ ├── DragSortRecycler.java
│ │ │ ├── EmptyView.java
│ │ │ ├── SpaceItemDecoration.java
│ │ │ ├── SquareFrameLayout.java
│ │ │ └── SquareImageView.java
│ └── res
│ │ ├── drawable
│ │ ├── bg_toolbar_shade.xml
│ │ ├── header_bg.jpg
│ │ ├── ic_account.jpg
│ │ ├── ic_account_circle_black_24dp.xml
│ │ ├── ic_add_black_24dp.xml
│ │ ├── ic_autorenew_black_24dp.xml
│ │ ├── ic_check_circle_black_24dp.xml
│ │ ├── ic_close_black_24dp.xml
│ │ ├── ic_favorite_black_24dp.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_launcher_foreground.xml
│ │ ├── ic_slide1.png
│ │ ├── ic_slide2.png
│ │ ├── ic_slide3.png
│ │ ├── ic_slide4.png
│ │ ├── ic_widgets_black_24dp.xml
│ │ ├── item_divider_black.xml
│ │ ├── item_divider_white.xml
│ │ └── nav_item_color.xml
│ │ ├── layout
│ │ ├── layout_toolbar.xml
│ │ └── widget_empty_view.xml
│ │ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── network_security_config.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── commons
│ └── ExampleUnitTest.java
├── eyepetizer
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── eyepetizer
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── debug
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── eyepetizer
│ │ │ ├── ModuleEyepetizerApp.java
│ │ │ ├── mvp
│ │ │ ├── base
│ │ │ │ ├── BasePresenter.java
│ │ │ │ └── BaseView.java
│ │ │ ├── contract
│ │ │ │ └── HomeContract.java
│ │ │ ├── model
│ │ │ │ ├── HomeModel.java
│ │ │ │ └── bean
│ │ │ │ │ └── HomeBean.java
│ │ │ └── presenter
│ │ │ │ └── HomePresenter.java
│ │ │ ├── net
│ │ │ ├── APIRetrofit.java
│ │ │ └── APIService.java
│ │ │ └── ui
│ │ │ ├── activity
│ │ │ ├── ContainerActivity.java
│ │ │ └── HomeActivity.java
│ │ │ ├── adapter
│ │ │ └── HomeAdapter.java
│ │ │ └── fragment
│ │ │ └── VideoFragment.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable-xxxhdpi
│ │ └── recommend_summary_card_bg_unlike.jpg
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_container.xml
│ │ ├── activity_eyepetizer_menu.xml
│ │ ├── fragment_eye_video.xml
│ │ └── item_home.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── eyepetizer.png
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── eyepetizer
│ └── ExampleUnitTest.java
├── guokr
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── guokr
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── debug
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── guokr
│ │ │ ├── ModuleGuokrApp.java
│ │ │ ├── model
│ │ │ ├── data
│ │ │ │ ├── GuokrNews.java
│ │ │ │ └── GuokrNewsContent.java
│ │ │ └── repository
│ │ │ │ ├── GuokrRetrofit.java
│ │ │ │ └── GuokrService.java
│ │ │ ├── view
│ │ │ ├── GuokrNewsActivity.java
│ │ │ ├── adapter
│ │ │ │ └── GuokrNewsAdapter.java
│ │ │ └── fragment
│ │ │ │ ├── NewsDetailFragment.java
│ │ │ │ └── NewsListFragment.java
│ │ │ └── viewmodel
│ │ │ └── GuokrViewModel.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── guokr.jpg
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_guokr_bews.xml
│ │ ├── fragment_news_detail.xml
│ │ ├── fragment_news_list.xml
│ │ └── item_guokr_news.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── guokr
│ └── ExampleUnitTest.java
├── images
├── 1_0.png
├── 1_1.png
├── 1_2.png
├── 1_3.png
├── 2_1.png
├── 2_2.png
├── 3_1.png
├── 3_2.png
├── 3_3.png
├── 3_4.png
└── 3_5.png
├── knife-annotation
├── .gitignore
├── build.gradle
└── src
│ └── main
│ └── java
│ └── me
│ └── shouheng
│ └── knife
│ └── annotation
│ ├── BindView.java
│ └── OnClick.java
├── knife-api
├── .gitignore
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── me
│ │ └── shouheng
│ │ └── knife
│ │ └── api
│ │ ├── Injector.java
│ │ ├── MyKnife.java
│ │ ├── Unbinder.java
│ │ └── finder
│ │ ├── ActivityFinder.java
│ │ ├── Finder.java
│ │ └── ViewFinder.java
│ └── res
│ └── values
│ └── strings.xml
├── knife-compiler
├── .gitignore
├── build.gradle
└── src
│ └── main
│ └── java
│ └── me
│ └── shouheng
│ └── knife
│ └── compiler
│ ├── BindViewProcessor.java
│ ├── TypeUtils.java
│ └── model
│ ├── AnnotatedClass.java
│ ├── BindViewField.java
│ └── OnClickMethod.java
├── layout
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── shouheng
│ │ └── layout
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── debug
│ │ └── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── shouheng
│ │ │ └── layout
│ │ │ ├── ModuleLayoutApp.java
│ │ │ ├── common
│ │ │ └── NormalTipsFragment.java
│ │ │ └── view
│ │ │ ├── ActivityEditLayout.java
│ │ │ ├── DrawerActivity.java
│ │ │ ├── LayoutMenuActivity.java
│ │ │ ├── adapter
│ │ │ ├── AdapterUtils.java
│ │ │ └── BeforeAdapter.java
│ │ │ ├── bottomsheet
│ │ │ └── BottomSheetActivity.java
│ │ │ ├── collapse
│ │ │ └── CollapseBarStructure.java
│ │ │ ├── custom
│ │ │ └── CustomView.java
│ │ │ ├── navigation
│ │ │ ├── NavigationActivity.java
│ │ │ └── fragment
│ │ │ │ └── PagerFragment.java
│ │ │ ├── scrolling
│ │ │ └── ScrollingActivity.java
│ │ │ ├── support28
│ │ │ ├── BottomAppBarActivity.java
│ │ │ └── Support28Activity.java
│ │ │ ├── swipe
│ │ │ └── SwipeBackDemoActivity.java
│ │ │ ├── tabbed
│ │ │ └── TabbedActivity.java
│ │ │ └── views
│ │ │ ├── CustomView.java
│ │ │ ├── ViewAnimateActivity.java
│ │ │ └── ViewSystemActivity.java
│ └── res
│ │ ├── anim
│ │ ├── cycle_7.xml
│ │ ├── layout_anim.xml
│ │ └── shake.xml
│ │ ├── drawable-v21
│ │ ├── ic_menu_camera.xml
│ │ ├── ic_menu_gallery.xml
│ │ ├── ic_menu_manage.xml
│ │ ├── ic_menu_send.xml
│ │ ├── ic_menu_share.xml
│ │ └── ic_menu_slideshow.xml
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── branded_background.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── mark_note.png
│ │ ├── record0.png
│ │ ├── record1.png
│ │ ├── record2.png
│ │ ├── record3.png
│ │ ├── record4.png
│ │ ├── record5.png
│ │ ├── record6.png
│ │ ├── record_anim.xml
│ │ └── side_nav_bar.xml
│ │ ├── layout
│ │ ├── activity_adapter.xml
│ │ ├── activity_bottom_app_bar.xml
│ │ ├── activity_bottom_sheet.xml
│ │ ├── activity_collapse_bar_structure.xml
│ │ ├── activity_drawer.xml
│ │ ├── activity_edit_layout.xml
│ │ ├── activity_layout_menu.xml
│ │ ├── activity_navigation.xml
│ │ ├── activity_scrolling.xml
│ │ ├── activity_support_28.xml
│ │ ├── activity_swipe_back.xml
│ │ ├── activity_tabbed.xml
│ │ ├── activity_view_animate.xml
│ │ ├── activity_view_system.xml
│ │ ├── app_bar_drawer.xml
│ │ ├── bottom_sheet_dialog.xml
│ │ ├── content_drawer.xml
│ │ ├── fragment_normal_tips.xml
│ │ ├── fragment_pager.xml
│ │ └── nav_header_drawer.xml
│ │ ├── menu
│ │ ├── activity_drawer_drawer.xml
│ │ ├── bottom_navigation.xml
│ │ └── drawer.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── drawables.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── shouheng
│ └── layout
│ └── ExampleUnitTest.java
├── libraries
├── .gitignore
├── build.gradle
├── libs
│ └── libtest.so
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── debug
│ └── AndroidManifest.xml
│ ├── java
│ └── me
│ │ └── shouheng
│ │ └── libraries
│ │ ├── FingerprintIdentifyActivity.java
│ │ ├── MenuActivity.java
│ │ ├── ModuleLibraryApp.java
│ │ ├── MyKnifeActivity.java
│ │ ├── TimberActivity.java
│ │ ├── eventbus
│ │ ├── EventBusActivity1.java
│ │ ├── EventBusActivity2.java
│ │ └── MessageWrap.java
│ │ ├── handler
│ │ ├── FileRecognizeTask.java
│ │ └── HandlerActivity.java
│ │ ├── image
│ │ ├── ClipPictureActivity.java
│ │ └── ImageCompressActivity.java
│ │ ├── rxjava
│ │ ├── DemoFragment.java
│ │ ├── RxBusActivity.java
│ │ ├── RxJavaActivity.java
│ │ └── RxMessage.java
│ │ ├── serial
│ │ ├── SerializeActivity.java
│ │ └── SerializeUtils.java
│ │ └── workmanager
│ │ ├── PeriodicTask.java
│ │ ├── SingleTask.java
│ │ ├── SingleTask2.java
│ │ └── WorkManagerActivity.java
│ └── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ ├── ic_launcher_background.xml
│ └── ice_land.jpg
│ ├── layout
│ ├── activity_clip_picture.xml
│ ├── activity_event_bus1.xml
│ ├── activity_event_bus2.xml
│ ├── activity_fingerprint_identify.xml
│ ├── activity_handler.xml
│ ├── activity_image_compress.xml
│ ├── activity_menu.xml
│ ├── activity_my_knife.xml
│ ├── activity_rx_bus.xml
│ ├── activity_rxjava.xml
│ ├── activity_serialize.xml
│ ├── activity_timber.xml
│ ├── activity_work_manager.xml
│ └── fragment_demo.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── raw
│ ├── ice_land.jpg
│ └── test_pic.png
│ └── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
└── live
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
├── androidTest
└── java
│ └── me
│ └── shouheng
│ └── live
│ └── ExampleInstrumentedTest.java
├── main
├── AndroidManifest.xml
├── debug
│ └── AndroidManifest.xml
├── java
│ └── me
│ │ └── shouheng
│ │ └── live
│ │ ├── LiveModuleApp.java
│ │ ├── common
│ │ ├── DecimalFormatUtil.java
│ │ └── widget
│ │ │ └── FlutteringLayout.java
│ │ ├── model
│ │ ├── LiveService.java
│ │ ├── data
│ │ │ ├── AppStart.java
│ │ │ ├── Banner.java
│ │ │ ├── LiveInfo.java
│ │ │ ├── Recommend.java
│ │ │ ├── Room.java
│ │ │ ├── RoomLine.java
│ │ │ └── StreamSrc.java
│ │ └── repository
│ │ │ └── LiveRetrofit.java
│ │ ├── view
│ │ ├── Constant.java
│ │ ├── activity
│ │ │ ├── LiveActivity.java
│ │ │ └── LiveRoomActivity.java
│ │ ├── adapter
│ │ │ ├── RecommendAdapter.java
│ │ │ └── RecommendChildAdapter.java
│ │ └── fragment
│ │ │ ├── FullscreenFragment.java
│ │ │ ├── RoomFragment.java
│ │ │ └── VideoFragment.java
│ │ └── viewmodel
│ │ └── LiveViewModel.java
└── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable-xxhdpi
│ ├── ic_dot_normal.png
│ ├── ic_dot_pressed.png
│ └── viewer.png
│ ├── drawable
│ ├── full_room_avatar_bg.xml
│ ├── ic_arrow_back_black_24dp.xml
│ ├── ic_card_giftcard_black_24dp.xml
│ ├── ic_forum_black_24dp.xml
│ ├── ic_fullscreen_black_24dp.xml
│ ├── ic_launcher_background.xml
│ ├── ic_mail_black_24dp.xml
│ ├── ic_more_vert_black_24dp.xml
│ ├── ic_person_add_black_24dp.xml
│ ├── ic_send_black_24dp.xml
│ ├── ic_share_black_24dp.xml
│ ├── live_default.png
│ ├── live_default_recommend_icon.png
│ ├── mine_default_avatar.png
│ ├── resource_heart0.png
│ ├── resource_heart1.png
│ ├── resource_heart10.png
│ ├── resource_heart2.png
│ ├── resource_heart3.png
│ ├── resource_heart4.png
│ ├── resource_heart5.png
│ ├── resource_heart6.png
│ ├── resource_heart7.png
│ ├── resource_heart8.png
│ └── resource_heart9.png
│ ├── layout
│ ├── activity_live.xml
│ ├── activity_live_room.xml
│ ├── fragment_fullscreen.xml
│ ├── fragment_room.xml
│ ├── fragment_video.xml
│ ├── item_remmend.xml
│ ├── item_remmend_child.xml
│ └── layout_banner.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ └── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
└── test
└── java
└── me
└── shouheng
└── live
└── ExampleUnitTest.java
/advanced/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/advanced/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/advanced/src/androidTest/java/me/shouheng/advanced/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced;
2 |
3 | import android.content.Context;
4 |
5 | import org.junit.Test;
6 | import org.junit.runner.RunWith;
7 |
8 | import androidx.test.InstrumentationRegistry;
9 | import androidx.test.runner.AndroidJUnit4;
10 |
11 | import static androidx.test.espresso.Espresso.onView;
12 | import static androidx.test.espresso.action.ViewActions.click;
13 | import static androidx.test.espresso.matcher.ViewMatchers.withId;
14 | import static org.junit.Assert.assertEquals;
15 |
16 | /**
17 | * Instrumented test, which will execute on an Android device.
18 | *
19 | * @see Testing documentation
20 | */
21 | @RunWith(AndroidJUnit4.class)
22 | public class ExampleInstrumentedTest {
23 |
24 | @Test
25 | public void useAppContext() {
26 | // Context of the app under test.
27 | Context appContext = InstrumentationRegistry.getTargetContext();
28 |
29 | assertEquals("me.shouheng.advanced.test", appContext.getPackageName());
30 | }
31 |
32 | public void testClick(int id) {
33 | onView(withId(id)).perform(click());
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/advanced/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
14 |
16 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/advanced/src/main/aidl/me/shouheng/advanced/aidl/INoteManager.aidl:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced.aidl;
2 |
3 | import me.shouheng.advanced.aidl.Note;
4 |
5 | interface INoteManager {
6 | Note getNote(long id);
7 | void addNote(long id, String name);
8 | }
9 |
--------------------------------------------------------------------------------
/advanced/src/main/aidl/me/shouheng/advanced/aidl/Note.aidl:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced.aidl;
2 |
3 | parcelable Note;
--------------------------------------------------------------------------------
/advanced/src/main/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
23 |
25 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/advanced/src/main/java/me/shouheng/advanced/Activity2.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 |
7 | import me.shouheng.advanced.databinding.Activity2Binding;
8 | import me.shouheng.commons.view.activity.CommonActivity;
9 |
10 | /**
11 | * Created on 2018/12/26.
12 | */
13 | public class Activity2 extends CommonActivity {
14 |
15 | public static final String EXTRA_KEY_NAME = "EXTRA";
16 |
17 | @Override
18 | protected int getLayoutResId() {
19 | return R.layout.activity_2;
20 | }
21 |
22 | @Override
23 | protected void doCreateView(Bundle savedInstanceState) {
24 | getBinding().cfrm.setOnClickListener(v -> {
25 | Intent intent = new Intent();
26 | intent.putExtra(EXTRA_KEY_NAME, getBinding().et.getText().toString());
27 | setResult(Activity.RESULT_OK, intent);
28 | finish();
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/advanced/src/main/java/me/shouheng/advanced/ModuleAdvancedApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleAdvancedApp extends BaseApplication {
12 |
13 | private static ModuleAdvancedApp application;
14 |
15 | public static ModuleAdvancedApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/advanced/src/main/java/me/shouheng/advanced/aidl/Note.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced.aidl;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | /**
7 | * @author shouh
8 | * @version $Id: Note, v 0.1 2018/10/22 22:27 shouh Exp$
9 | */
10 | public class Note implements Parcelable {
11 |
12 | public final long id;
13 |
14 | public final String name;
15 |
16 | public Note(long id, String name) {
17 | this.id = id;
18 | this.name = name;
19 | }
20 |
21 | protected Note(Parcel in) {
22 | id = in.readLong();
23 | name = in.readString();
24 | }
25 |
26 | public static final Creator CREATOR = new Creator() {
27 | @Override
28 | public Note createFromParcel(Parcel in) {
29 | return new Note(in);
30 | }
31 |
32 | @Override
33 | public Note[] newArray(int size) {
34 | return new Note[size];
35 | }
36 | };
37 |
38 | @Override
39 | public String toString() {
40 | return "Note{" +
41 | "id=" + id +
42 | ", name='" + name + '\'' +
43 | '}';
44 | }
45 |
46 | @Override
47 | public int describeContents() {
48 | return 0;
49 | }
50 |
51 | @Override
52 | public void writeToParcel(Parcel dest, int flags) {
53 | dest.writeLong(id);
54 | dest.writeString(name);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/advanced/src/main/java/me/shouheng/advanced/remote/Remote2Activity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced.remote;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 |
7 | import me.shouheng.advanced.R;
8 | import me.shouheng.advanced.databinding.ActivityRemoteBinding;
9 | import me.shouheng.commons.config.BaseConstants;
10 | import me.shouheng.commons.view.activity.CommonActivity;
11 |
12 | /**
13 | * @author shouh
14 | * @version $Id: Remote2Activity, v 0.1 2018/10/22 22:15 shouh Exp$
15 | */
16 | @Route(path = BaseConstants.ADVANCED_REMOTE2)
17 | public class Remote2Activity extends CommonActivity {
18 |
19 | @Override
20 | protected int getLayoutResId() {
21 | return R.layout.activity_remote;
22 | }
23 |
24 | @Override
25 | protected void doCreateView(Bundle savedInstanceState) {
26 | String content = getIntent().getStringExtra(BaseConstants.ADVANCED_REMOTE2_ARG_CONTENT);
27 | getBinding().tvContent.setText(content);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/advanced/src/main/java/me/shouheng/advanced/remote/RemoteActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced.remote;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 |
7 | import me.shouheng.advanced.R;
8 | import me.shouheng.advanced.databinding.ActivityRemoteBinding;
9 | import me.shouheng.commons.config.BaseConstants;
10 | import me.shouheng.commons.view.activity.CommonActivity;
11 |
12 | /**
13 | * @author shouh
14 | * @version $Id: RemoteActivity, v 0.1 2018/10/22 22:03 shouh Exp$
15 | */
16 | @Route(path = BaseConstants.ADVANCED_REMOTE)
17 | public class RemoteActivity extends CommonActivity {
18 |
19 | @Override
20 | protected int getLayoutResId() {
21 | return R.layout.activity_remote;
22 | }
23 |
24 | @Override
25 | protected void doCreateView(Bundle savedInstanceState) {
26 | String content = getIntent().getStringExtra(BaseConstants.ADVANCED_REMOTE_ARG_CONTENT);
27 | getBinding().tvContent.setText(content);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/advanced/src/main/res/layout/activity_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/advanced/src/main/res/layout/activity_remote.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/advanced/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/advanced/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/advanced/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Advanced
3 |
4 |
--------------------------------------------------------------------------------
/advanced/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/advanced/src/test/java/me/shouheng/advanced/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.advanced;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/animations/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/animations/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/animations/src/androidTest/java/me/shouheng/animations/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.animations;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.animations", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/animations/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/animations/src/main/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/animations/src/main/java/me/shouheng/animations/DrawableActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.animations;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 |
7 | import me.shouheng.animations.databinding.ActivityDrawableBinding;
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.view.activity.CommonActivity;
10 |
11 | /**
12 | * Created by WngShhng on 2018/10/17.
13 | */
14 | @Route(path = BaseConstants.ANIMATIONS_DRAWABLE)
15 | public class DrawableActivity extends CommonActivity {
16 |
17 | @Override
18 | protected int getLayoutResId() {
19 | return R.layout.activity_drawable;
20 | }
21 |
22 | @Override
23 | protected void doCreateView(Bundle savedInstanceState) {
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/animations/src/main/java/me/shouheng/animations/ModuleAnimationsApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.animations;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleAnimationsApp extends BaseApplication {
12 |
13 | private static ModuleAnimationsApp application;
14 |
15 | public static ModuleAnimationsApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/animations/src/main/res/drawable/drawable_bitmap.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/animations/src/main/res/drawable/drawable_bitmap_no_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/animations/src/main/res/drawable/drawable_layer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/animations/src/main/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/animations/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/animations/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/animations/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | animations
3 |
4 |
--------------------------------------------------------------------------------
/animations/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/animations/src/test/java/me/shouheng/animations/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.animations;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 | .idea
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/workspace.xml
39 | .idea/tasks.xml
40 | .idea/gradle.xml
41 | .idea/dictionaries
42 | .idea/libraries
43 |
44 | # Keystore files
45 | # Uncomment the following line if you do not want to check your keystore files in.
46 | #*.jks
47 |
48 | # External native build folder generated in Android Studio 2.2 and later
49 | .externalNativeBuild
50 |
51 | # Google Services (e.g. APIs or Firebase)
52 | google-services.json
53 |
54 | # Freeline
55 | freeline.py
56 | freeline/
57 | freeline_project_description.json
58 |
--------------------------------------------------------------------------------
/client/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/client/app/channel:
--------------------------------------------------------------------------------
1 | meituan # 美团
2 | samsungapps #三星
3 | hiapk
4 | anzhi
5 | xiaomi # 小米
6 | 91com
7 | gfan
8 | appchina
9 | nduoa
10 | 3gcn
11 | mumayi
12 | 10086com
13 | wostore
14 | 189store
15 | lenovomm
16 | hicloud
17 | meizu
18 | wandou
19 | # Google Play
20 | # googleplay
21 | # 百度
22 | baidu
23 | #
24 | # 360
25 | 360cn
26 | #
27 | # 应用宝
28 | myapp
--------------------------------------------------------------------------------
/client/app/fabric.properties:
--------------------------------------------------------------------------------
1 | #Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public.
2 | #Wed Jun 06 19:20:45 CST 2018
3 | apiSecret=e4664a037aa796ecf2f8c00b5160724ef5056a17cd29ee650f42b1bc0bc067e6
4 |
--------------------------------------------------------------------------------
/client/app/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/client/app/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Jun 06 19:41:09 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
7 |
--------------------------------------------------------------------------------
/client/app/src/androidTest/java/me/shouheng/references/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.references", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/client/app/src/main/assets/camera.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/assets/camera.aar
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/AppIntroActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 | import com.github.paolorotolo.appintro.AppIntro;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 |
10 | @Route(path = BaseConstants.INTRO)
11 | public class AppIntroActivity extends AppIntro {
12 |
13 | @Override
14 | public void init(Bundle savedInstanceState) {
15 | addSlide(new IntroSlide1(), getApplicationContext());
16 | addSlide(new IntroSlide2(), getApplicationContext());
17 | addSlide(new IntroSlide3(), getApplicationContext());
18 | addSlide(new IntroSlide4(), getApplicationContext());
19 | }
20 |
21 | @Override
22 | public void onSkipPressed() {
23 |
24 | }
25 |
26 | @Override
27 | public void onDonePressed() {
28 | finish();
29 | }
30 |
31 | @Override
32 | public void onBackPressed() {}
33 | }
34 |
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/IntroFragment.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.Nullable;
6 | import androidx.fragment.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | import me.shouheng.references.R;
14 |
15 |
16 | public class IntroFragment extends Fragment {
17 |
18 | protected View background;
19 | protected TextView title;
20 | protected ImageView image;
21 | protected ImageView imageSmall;
22 | protected TextView description;
23 |
24 | @Override
25 | public View onCreateView(@Nullable LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
26 | if (inflater == null) {
27 | throw new IllegalArgumentException("The inflater is null exception.");
28 | }
29 | View root = inflater.inflate(R.layout.fragment_intro_slide, container, false);
30 | background = root.findViewById(R.id.intro_background);
31 | title = root.findViewById(R.id.intro_title);
32 | image = root.findViewById(R.id.intro_image);
33 | imageSmall = root.findViewById(R.id.intro_image_small);
34 | description = root.findViewById(R.id.intro_description);
35 | return root;
36 | }
37 | }
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/IntroSlide1.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import me.shouheng.references.R;
6 |
7 |
8 | /**
9 | * Created by Wang Shouheng on 2017/12/6. */
10 | public class IntroSlide1 extends IntroFragment {
11 |
12 | @Override
13 | public void onActivityCreated(Bundle savedInstanceState) {
14 | super.onActivityCreated(savedInstanceState);
15 | background.setBackgroundResource(R.color.intro_color_5);
16 | title.setText("intro_1_title");
17 | image.setImageResource(R.drawable.ic_slide1);
18 | description.setText("intro_1_description");
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/IntroSlide2.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import me.shouheng.references.R;
6 |
7 |
8 | public class IntroSlide2 extends IntroFragment {
9 |
10 | @Override
11 | public void onActivityCreated(Bundle savedInstanceState) {
12 | super.onActivityCreated(savedInstanceState);
13 | background.setBackgroundResource(R.color.intro_color_2);
14 | title.setText("intro_2_title");
15 | image.setImageResource(R.drawable.ic_slide2);
16 | description.setText("intro_2_description");
17 | }
18 | }
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/IntroSlide3.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import me.shouheng.references.R;
6 |
7 |
8 | public class IntroSlide3 extends IntroFragment {
9 |
10 | @Override
11 | public void onActivityCreated(Bundle savedInstanceState) {
12 | super.onActivityCreated(savedInstanceState);
13 | background.setBackgroundResource(R.color.intro_color_3);
14 | title.setText("intro_3_title");
15 | image.setImageResource(R.drawable.ic_slide3);
16 | description.setText("intro_3_description");
17 | }
18 | }
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/view/intro/IntroSlide4.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.view.intro;
2 |
3 | import android.os.Bundle;
4 |
5 | import me.shouheng.references.R;
6 |
7 |
8 | public class IntroSlide4 extends IntroFragment {
9 |
10 | @Override
11 | public void onActivityCreated(Bundle savedInstanceState) {
12 | super.onActivityCreated(savedInstanceState);
13 | background.setBackgroundResource(R.color.intro_color_4);
14 | title.setText("intro_4_title");
15 | image.setImageResource(R.drawable.ic_slide4);
16 | description.setText("intro_4_description");
17 | }
18 | }
--------------------------------------------------------------------------------
/client/app/src/main/java/me/shouheng/references/viewmodel/MainViewModel.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references.viewmodel;
2 |
3 | import android.app.Application;
4 | import androidx.lifecycle.AndroidViewModel;
5 | import androidx.annotation.NonNull;
6 |
7 | import javax.inject.Inject;
8 |
9 | /**
10 | * Created by WngShhng on 2018/6/7. */
11 | public class MainViewModel extends AndroidViewModel {
12 |
13 | @Inject
14 | public MainViewModel(@NonNull Application application) {
15 | super(application);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/client/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/client/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FAFAFA
4 | #FAFAFA
5 | #0078FF
6 |
7 | #2E2E2E
8 | #3F3F3F
9 |
10 | #FAFAFA
11 |
12 | #222222
13 | #c52829
14 | #f77910
15 | #21dba4
16 | #9C27B0
17 |
18 | #757575
19 | @color/colorAccent
20 |
21 |
--------------------------------------------------------------------------------
/client/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 32dp
4 | 24dp
5 | 64dp
6 |
7 | 56dp
8 |
9 |
--------------------------------------------------------------------------------
/client/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 安卓开发参考
3 |
4 | short name
5 | long name
6 | disable message
7 |
8 |
--------------------------------------------------------------------------------
/client/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/client/app/src/test/java/me/shouheng/references/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.references;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/client/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.daemon=true
2 | org.gradle.configureondemond=true
3 | org.gradle.jvmargs=-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
4 | org.gradle.parallel=true
5 | org.gradle.caching=true
6 |
7 | isModuleApp=false
8 | isGuokrModuleApp=isModuleApp
9 | isLiveModuleApp=isModuleApp
10 | isLayoutModuleApp=isModuleApp
11 | isLibraryModuleApp=isModuleApp
12 | isEyepetizerModuleApp=isModuleApp
13 | isAnimationsModuleApp=isModuleApp
14 | isAdvancedModuleApp=isModuleApp
15 |
16 | android.useAndroidX=true
17 | android.enableJetifier=true
--------------------------------------------------------------------------------
/client/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/client/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Oct 30 20:12:17 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
7 |
--------------------------------------------------------------------------------
/client/palm.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/client/palm.jks
--------------------------------------------------------------------------------
/client/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':commons', ':guokr', ':live', ':layout', ':libraries', ':eyepetizer', ':knife-annotation', ':knife-api', ':knife-compiler', ':animations', ':advanced'
2 | project(':commons').projectDir = new File('../commons')
3 | project(':guokr').projectDir = new File('../guokr')
4 | project(':live').projectDir = new File('../live')
5 | project(':layout').projectDir = new File('../layout')
6 | project(':libraries').projectDir = new File('../libraries')
7 | project(':eyepetizer').projectDir = new File('../eyepetizer')
8 | project(':knife-annotation').projectDir = new File('../knife-annotation')
9 | project(':knife-api').projectDir = new File('../knife-api')
10 | project(':knife-compiler').projectDir = new File('../knife-compiler')
11 | project(':animations').projectDir = new File('../animations')
12 | project(':advanced').projectDir = new File('../advanced')
--------------------------------------------------------------------------------
/commons/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 | .idea
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/workspace.xml
39 | .idea/tasks.xml
40 | .idea/gradle.xml
41 | .idea/dictionaries
42 | .idea/libraries
43 |
44 | # Keystore files
45 | # Uncomment the following line if you do not want to check your keystore files in.
46 | #*.jks
47 |
48 | # External native build folder generated in Android Studio 2.2 and later
49 | .externalNativeBuild
50 |
51 | # Google Services (e.g. APIs or Firebase)
52 | google-services.json
53 |
54 | # Freeline
55 | freeline.py
56 | freeline/
57 | freeline_project_description.json
58 |
--------------------------------------------------------------------------------
/commons/libs/armeabi-v7a/libpldroidplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/libs/armeabi-v7a/libpldroidplayer.so
--------------------------------------------------------------------------------
/commons/libs/armeabi/libpldroidplayer.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/libs/armeabi/libpldroidplayer.so
--------------------------------------------------------------------------------
/commons/libs/pldroid-player-1.5.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/libs/pldroid-player-1.5.0.jar
--------------------------------------------------------------------------------
/commons/proguard-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/proguard-rules.pro
--------------------------------------------------------------------------------
/commons/src/androidTest/java/me/shouheng/commons/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.commons.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/commons/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/BaseApplication.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons;
2 |
3 | import android.app.Application;
4 | import androidx.multidex.MultiDex;
5 |
6 | import com.alibaba.android.arouter.launcher.ARouter;
7 | import com.crashlytics.android.Crashlytics;
8 | import com.facebook.stetho.Stetho;
9 | import com.squareup.leakcanary.LeakCanary;
10 |
11 | import io.fabric.sdk.android.Fabric;
12 | import timber.log.Timber;
13 | import timber.log.Timber.DebugTree;
14 |
15 | /**
16 | * @author shouh
17 | * @version $Id: BaseApplication, v 0.1 2018/6/6 21:58 shouh Exp$
18 | */
19 | public abstract class BaseApplication extends Application {
20 |
21 | private static BaseApplication instance;
22 |
23 | public static BaseApplication getContext() {
24 | return instance;
25 | }
26 |
27 | @Override
28 | public void onCreate() {
29 | super.onCreate();
30 |
31 | instance = this;
32 |
33 | MultiDex.install(this);
34 |
35 | LeakCanary.install(this);
36 |
37 | Fabric.with(this, new Crashlytics());
38 |
39 | if (BuildConfig.DEBUG) {
40 | Stetho.initializeWithDefaults(this);
41 | ARouter.openLog();
42 | ARouter.openDebug();
43 | }
44 |
45 | if (BuildConfig.DEBUG) {
46 | Timber.plant(new DebugTree());
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/config/Configs.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.config;
2 |
3 | /**
4 | * Created by WngShhng on 2018/8/2.*/
5 | public interface Configs {
6 | String APP_KEY = "5b62ef2df43e4841b70003cb";
7 | String UMENG_MESSAGE_SECRET = "9d944b47eaf95b1d4c200bed2a93c3eb";
8 | }
9 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/di/AppComponent.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.di;
2 |
3 | import android.app.Application;
4 |
5 | import javax.inject.Singleton;
6 |
7 | import dagger.BindsInstance;
8 | import dagger.Component;
9 | import dagger.android.AndroidInjector;
10 | import me.shouheng.commons.BaseApplication;
11 | import me.shouheng.commons.di.module.AppModule;
12 |
13 | /**
14 | * Will auto-generate {@link DaggerAppComponent} see more details in it.
15 | *
16 | * @author shouh
17 | * @version $Id: AppComponent, v 0.1 2018/6/6 22:34 shouh Exp$
18 | */
19 | @Singleton
20 | @Component(modules = {AppModule.class})
21 | public interface AppComponent extends AndroidInjector {
22 |
23 | @Component.Builder
24 | interface Builder {
25 |
26 | @BindsInstance Builder application(Application application);
27 |
28 | AppComponent build();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/di/enums/ActivityScoped.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.di.enums;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 |
7 | import javax.inject.Scope;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: ActivityScoped, v 0.1 2018/6/6 22:48 shouh Exp$
12 | */
13 | @Documented
14 | @Scope
15 | @Retention(RetentionPolicy.RUNTIME)
16 | public @interface ActivityScoped {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/di/enums/ViewModelKey.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.di.enums;
2 |
3 | import androidx.lifecycle.ViewModel;
4 |
5 | import java.lang.annotation.Documented;
6 | import java.lang.annotation.ElementType;
7 | import java.lang.annotation.Retention;
8 | import java.lang.annotation.RetentionPolicy;
9 | import java.lang.annotation.Target;
10 |
11 | import dagger.MapKey;
12 |
13 | /**
14 | * Created by WngShhng on 2018/6/7.*/
15 | @Documented
16 | @Target({ElementType.METHOD})
17 | @Retention(RetentionPolicy.RUNTIME)
18 | @MapKey
19 | public @interface ViewModelKey {
20 | Class extends ViewModel> value();
21 | }
22 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/di/module/AppModule.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.di.module;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import javax.inject.Singleton;
6 |
7 | import dagger.Module;
8 | import dagger.Provides;
9 | import okhttp3.OkHttpClient;
10 |
11 | /**
12 | * @author shouh
13 | * @version $Id: AppModule, v 0.1 2018/6/8 22:04 shouh Exp$
14 | */
15 | @Module
16 | public class AppModule {
17 |
18 | @Provides
19 | @Singleton
20 | OkHttpClient provideOkHttpClient() {
21 | return new OkHttpClient.Builder()
22 | .connectTimeout(10, TimeUnit.SECONDS)
23 | .readTimeout(10, TimeUnit.SECONDS)
24 | .writeTimeout(10, TimeUnit.SECONDS)
25 | .build();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/model/Status.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.model;
2 |
3 | /**
4 | * Created by wang shouheng on 2018/3/13. */
5 | public enum Status {
6 | SUCCESS,
7 | FAILED,
8 | LOADING
9 | }
10 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/tools/NetworkUtils.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.tools;
2 |
3 | import android.content.Context;
4 | import android.net.ConnectivityManager;
5 | import android.net.NetworkInfo;
6 |
7 | /**
8 | * Created by wangshouheng on 2017/2/26. */
9 | public class NetworkUtils {
10 |
11 | public static boolean isNetworkAvailable(Context context){
12 | ConnectivityManager connectivityManager =
13 | (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
14 | NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
15 | return ((networkInfo != null) && (networkInfo.isAvailable()));
16 | }
17 |
18 | public static boolean isWifi(Context mContext) {
19 | ConnectivityManager connectivityManager =
20 | (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
21 | NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
22 | return activeNetInfo != null && activeNetInfo.getType() == ConnectivityManager.TYPE_WIFI;
23 | }
24 | }
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/tools/ToastUtils.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.tools;
2 |
3 | import androidx.annotation.StringRes;
4 | import android.widget.Toast;
5 |
6 | import me.shouheng.commons.BaseApplication;
7 |
8 | public class ToastUtils {
9 |
10 | private static Toast toast;
11 |
12 | public static void makeToast(String msg) {
13 | if (toast == null){
14 | toast = Toast.makeText(BaseApplication.getContext(), msg, Toast.LENGTH_SHORT);
15 | toast.show();
16 | } else {
17 | toast.setText(msg);
18 | toast.show();
19 | }
20 | }
21 |
22 | public static void makeToast(@StringRes int msgRes) {
23 | if (toast == null){
24 | toast = Toast.makeText(BaseApplication.getContext(), msgRes, Toast.LENGTH_SHORT);
25 | toast.show();
26 | } else {
27 | toast.setText(msgRes);
28 | toast.show();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/tools/permission/OnGetPermissionCallback.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.tools.permission;
2 |
3 | /**
4 | * Created by WngShhng on 2018/6/7.*/
5 | public interface OnGetPermissionCallback {
6 | void onGetPermission();
7 | }
8 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/activity/CommonDaggerActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.activity;
2 |
3 | import androidx.databinding.ViewDataBinding;
4 | import android.os.Bundle;
5 |
6 | import dagger.android.AndroidInjection;
7 |
8 | /**
9 | * @author shouh
10 | * @version $Id: CommonDaggerActivity, v 0.1 2018/6/6 22:46 shouh Exp$
11 | */
12 | public abstract class CommonDaggerActivity extends CommonActivity {
13 |
14 | @Override
15 | protected void beforeCreate(Bundle savedInstanceState) {
16 | AndroidInjection.inject(this);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/activity/UMengActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.activity;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.umeng.message.PushAgent;
6 |
7 | /**
8 | * @author WngShhng (shouheng2015@gmail.com)
9 | * @version $Id: UMengActivity, v 0.1 2018/12/26 23:47 shouh Exp$
10 | */
11 | public class UMengActivity extends BaseActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | PushAgent.getInstance(this).onAppStart();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/fragment/CommonDaggerFragment.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.fragment;
2 |
3 | import androidx.lifecycle.LifecycleRegistry;
4 | import androidx.lifecycle.LifecycleRegistryOwner;
5 | import androidx.databinding.ViewDataBinding;
6 | import android.os.Bundle;
7 | import androidx.annotation.NonNull;
8 | import androidx.annotation.Nullable;
9 |
10 | import dagger.android.support.AndroidSupportInjection;
11 |
12 | /**
13 | * @author shouh
14 | * @version $Id: CommonDaggerFragment, v 0.1 2018/6/9 13:40 shouh Exp$
15 | */
16 | public abstract class CommonDaggerFragment extends CommonFragment implements LifecycleRegistryOwner {
17 |
18 | private LifecycleRegistry lifecycleRegistry = new LifecycleRegistry(this);
19 |
20 | @Override
21 | public void onCreate(@Nullable Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | AndroidSupportInjection.inject(this);
24 | }
25 |
26 | @Override
27 | @NonNull
28 | public LifecycleRegistry getLifecycle() {
29 | return lifecycleRegistry;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/widget/SpaceItemDecoration.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.widget;
2 |
3 | import android.graphics.Rect;
4 | import androidx.recyclerview.widget.RecyclerView;
5 | import android.view.View;
6 |
7 | import me.shouheng.commons.tools.ViewUtils;
8 |
9 | public class SpaceItemDecoration extends RecyclerView.ItemDecoration {
10 |
11 | private int leftDp, upDp, rightDp, downDp;
12 |
13 | public SpaceItemDecoration(int leftDp, int upDp, int rightDp, int downDp) {
14 | this.leftDp = ViewUtils.dp2Px(leftDp);
15 | this.upDp = ViewUtils.dp2Px(upDp);
16 | this.rightDp = ViewUtils.dp2Px(rightDp);
17 | this.downDp = ViewUtils.dp2Px(downDp);
18 | }
19 |
20 | @Override
21 | public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
22 | super.getItemOffsets(outRect, view, parent, state);
23 | outRect.set(leftDp, upDp, rightDp, downDp);
24 | }
25 | }
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/widget/SquareFrameLayout.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.widget;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.widget.FrameLayout;
6 |
7 | public class SquareFrameLayout extends FrameLayout {
8 |
9 | public SquareFrameLayout(Context context, AttributeSet attrs, int defStyle) {
10 | super(context, attrs, defStyle);
11 | }
12 |
13 | public SquareFrameLayout(Context context, AttributeSet attrs) {
14 | super(context, attrs);
15 | }
16 |
17 | public SquareFrameLayout(Context context) {
18 | super(context);
19 | }
20 |
21 | @SuppressWarnings("unused")
22 | @Override
23 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
24 | setMeasuredDimension(getDefaultSize(0, widthMeasureSpec), getDefaultSize(0, heightMeasureSpec));
25 | int childWidthSize = getMeasuredWidth();
26 | int childHeightSize = getMeasuredHeight();
27 | heightMeasureSpec = widthMeasureSpec = MeasureSpec.makeMeasureSpec(childWidthSize, MeasureSpec.EXACTLY);
28 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/commons/src/main/java/me/shouheng/commons/view/widget/SquareImageView.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons.view.widget;
2 |
3 | import android.content.Context;
4 | import androidx.appcompat.widget.AppCompatImageView;
5 | import android.util.AttributeSet;
6 |
7 | public class SquareImageView extends AppCompatImageView {
8 |
9 | public SquareImageView(Context context) {
10 | super(context);
11 | }
12 |
13 | public SquareImageView(Context context, AttributeSet attrs) {
14 | super(context, attrs);
15 | }
16 |
17 | public SquareImageView(Context context, AttributeSet attrs, int defStyle) {
18 | super(context, attrs, defStyle);
19 | }
20 |
21 | @Override
22 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
23 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
24 | setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth());
25 | }
26 | }
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/bg_toolbar_shade.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/header_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/header_bg.jpg
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_account.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/ic_account.jpg
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_account_circle_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_add_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_autorenew_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_check_circle_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_close_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_favorite_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_slide1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/ic_slide1.png
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_slide2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/ic_slide2.png
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_slide3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/ic_slide3.png
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_slide4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/commons/src/main/res/drawable/ic_slide4.png
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/ic_widgets_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/item_divider_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/item_divider_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/commons/src/main/res/drawable/nav_item_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/commons/src/main/res/layout/layout_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/commons/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/commons/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 120dp
4 |
5 | 16dp
6 |
--------------------------------------------------------------------------------
/commons/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/commons/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | kaiyanapp.com
5 | guokr.com
6 | quanmin.tv
7 | amdcopen.m.taobao.com
8 |
9 |
--------------------------------------------------------------------------------
/commons/src/test/java/me/shouheng/commons/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.commons;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/eyepetizer/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/eyepetizer/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/eyepetizer/src/androidTest/java/me/shouheng/eyepetizer/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.eyepetizer", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/ModuleEyepetizerApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleEyepetizerApp extends BaseApplication {
12 |
13 | private static ModuleEyepetizerApp application;
14 |
15 | public static ModuleEyepetizerApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/mvp/base/BasePresenter.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.mvp.base;
2 |
3 | /**
4 | * @author shouh
5 | * @version $Id: BasePresenter, v 0.1 2018/8/19 17:14 shouh Exp$
6 | */
7 | public interface BasePresenter {
8 | }
9 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/mvp/base/BaseView.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.mvp.base;
2 |
3 | /**
4 | * @author shouh
5 | * @version $Id: BaseView, v 0.1 2018/8/19 17:13 shouh Exp$
6 | */
7 | public interface BaseView {
8 | }
9 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/mvp/contract/HomeContract.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.mvp.contract;
2 |
3 | import java.util.List;
4 |
5 | import me.shouheng.eyepetizer.mvp.base.BasePresenter;
6 | import me.shouheng.eyepetizer.mvp.base.BaseView;
7 | import me.shouheng.eyepetizer.mvp.model.bean.HomeBean;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: HomeContract, v 0.1 2018/8/19 17:10 shouh Exp$
12 | */
13 | public interface HomeContract {
14 |
15 | interface IView extends BaseView {
16 | void setFirstPage(List itemLists);
17 | void setNextPage(List itemLists);
18 | void onError(String msg);
19 | }
20 |
21 | interface IPresenter extends BasePresenter {
22 | void requestFirstPage();
23 | void requestNextPage();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/mvp/model/HomeModel.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.mvp.model;
2 |
3 | import io.reactivex.Observable;
4 | import me.shouheng.eyepetizer.mvp.model.bean.HomeBean;
5 | import me.shouheng.eyepetizer.net.APIRetrofit;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: HomeModel, v 0.1 2018/8/19 17:27 shouh Exp$
10 | */
11 | public class HomeModel {
12 |
13 | public Observable getFirstHomeData() {
14 | return APIRetrofit.getEyepetizerService().getFirstHomeData(System.currentTimeMillis());
15 | }
16 |
17 | public Observable getMoreHomeData(String url) {
18 | return APIRetrofit.getEyepetizerService().getMoreHomeData(url);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/net/APIRetrofit.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.net;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import okhttp3.OkHttpClient;
6 | import retrofit2.Retrofit;
7 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
8 | import retrofit2.converter.gson.GsonConverterFactory;
9 |
10 | /**
11 | * @author shouh
12 | * @version $Id: APIRetrofit, v 0.1 2018/8/19 17:29 shouh Exp$
13 | */
14 | public class APIRetrofit {
15 |
16 | public static APIService getEyepetizerService() {
17 | return new Retrofit.Builder()
18 | .baseUrl("http://baobab.kaiyanapp.com/api/")
19 | .addConverterFactory(GsonConverterFactory.create())
20 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
21 | .client(getOkHttpClient())
22 | .build().create(APIService.class);
23 | }
24 |
25 | private static OkHttpClient getOkHttpClient() {
26 | return new OkHttpClient.Builder()
27 | .connectTimeout(10, TimeUnit.SECONDS)
28 | .readTimeout(10, TimeUnit.SECONDS)
29 | .writeTimeout(10, TimeUnit.SECONDS)
30 | .build();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/java/me/shouheng/eyepetizer/net/APIService.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer.net;
2 |
3 | import io.reactivex.Observable;
4 | import me.shouheng.eyepetizer.mvp.model.bean.HomeBean;
5 | import retrofit2.http.GET;
6 | import retrofit2.http.Query;
7 | import retrofit2.http.Url;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: APIService, v 0.1 2018/8/19 17:30 shouh Exp$
12 | */
13 | public interface APIService {
14 |
15 | @GET("v2/feed?&num=1")
16 | Observable getFirstHomeData(@Query("date") Long date);
17 |
18 | @GET
19 | Observable getMoreHomeData(@Url String url);
20 | }
21 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/drawable-xxxhdpi/recommend_summary_card_bg_unlike.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/drawable-xxxhdpi/recommend_summary_card_bg_unlike.jpg
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/layout/activity_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/layout/activity_eyepetizer_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
12 |
13 |
18 |
19 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/layout/fragment_eye_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xhdpi/eyepetizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xhdpi/eyepetizer.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/eyepetizer/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | eyepetizer
3 |
4 |
--------------------------------------------------------------------------------
/eyepetizer/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/eyepetizer/src/test/java/me/shouheng/eyepetizer/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.eyepetizer;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/guokr/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/guokr/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/guokr/src/androidTest/java/me/shouheng/guokr/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.guokr;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.guokr", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/guokr/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/guokr/src/main/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/guokr/src/main/java/me/shouheng/guokr/ModuleGuokrApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.guokr;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleGuokrApp extends BaseApplication {
12 |
13 | private static ModuleGuokrApp application;
14 |
15 | public static ModuleGuokrApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/guokr/src/main/java/me/shouheng/guokr/model/repository/GuokrRetrofit.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.guokr.model.repository;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import okhttp3.OkHttpClient;
6 | import retrofit2.Retrofit;
7 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
8 | import retrofit2.converter.gson.GsonConverterFactory;
9 |
10 | /**
11 | * Created by WngShhng on 2018/7/30.*/
12 | public class GuokrRetrofit {
13 |
14 | public static GuokrService getGuokrService() {
15 | return new Retrofit.Builder()
16 | .baseUrl("http://apis.guokr.com/minisite/")
17 | .addConverterFactory(GsonConverterFactory.create())
18 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
19 | .client(getOkHttpClient())
20 | .build().create(GuokrService.class);
21 | }
22 |
23 | private static OkHttpClient getOkHttpClient() {
24 | return new OkHttpClient.Builder()
25 | .connectTimeout(10, TimeUnit.SECONDS)
26 | .readTimeout(10, TimeUnit.SECONDS)
27 | .writeTimeout(10, TimeUnit.SECONDS)
28 | .build();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/guokr/src/main/java/me/shouheng/guokr/model/repository/GuokrService.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.guokr.model.repository;
2 |
3 | import io.reactivex.Observable;
4 | import me.shouheng.guokr.model.data.GuokrNews;
5 | import me.shouheng.guokr.model.data.GuokrNewsContent;
6 | import retrofit2.http.GET;
7 | import retrofit2.http.Path;
8 | import retrofit2.http.Query;
9 |
10 | /**
11 | * @author shouh
12 | * @version $Id: GuokrService, v 0.1 2018/6/10 11:11 shouh Exp$
13 | */
14 | public interface GuokrService {
15 |
16 | @GET("article.json?retrieve_type=by_minisite")
17 | Observable getNews(@Query("offset") int offset, @Query("limit") int limit);
18 |
19 | @GET("article/{id}.json")
20 | Observable getGuokrContent(@Path("id") int id);
21 | }
22 |
--------------------------------------------------------------------------------
/guokr/src/main/res/drawable/guokr.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/drawable/guokr.jpg
--------------------------------------------------------------------------------
/guokr/src/main/res/layout/activity_guokr_bews.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
12 |
13 |
18 |
19 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/guokr/src/main/res/layout/fragment_news_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/guokr/src/main/res/layout/fragment_news_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/guokr/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/guokr/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/guokr/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Guokr
3 |
4 |
--------------------------------------------------------------------------------
/guokr/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/guokr/src/test/java/me/shouheng/guokr/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.guokr;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/images/1_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/1_0.png
--------------------------------------------------------------------------------
/images/1_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/1_1.png
--------------------------------------------------------------------------------
/images/1_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/1_2.png
--------------------------------------------------------------------------------
/images/1_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/1_3.png
--------------------------------------------------------------------------------
/images/2_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/2_1.png
--------------------------------------------------------------------------------
/images/2_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/2_2.png
--------------------------------------------------------------------------------
/images/3_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/3_1.png
--------------------------------------------------------------------------------
/images/3_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/3_2.png
--------------------------------------------------------------------------------
/images/3_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/3_3.png
--------------------------------------------------------------------------------
/images/3_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/3_4.png
--------------------------------------------------------------------------------
/images/3_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/images/3_5.png
--------------------------------------------------------------------------------
/knife-annotation/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/knife-annotation/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java-library'
2 |
3 | dependencies {
4 | implementation fileTree(dir: 'libs', include: ['*.jar'])
5 | }
6 |
7 | sourceCompatibility = "1.8"
8 | targetCompatibility = "1.8"
9 |
--------------------------------------------------------------------------------
/knife-annotation/src/main/java/me/shouheng/knife/annotation/BindView.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 用来将View与指定的id进行绑定
10 | *
11 | * @author shouh
12 | * @version $Id: BindView, v 0.1 2018/8/22 22:22 shouh Exp$
13 | */
14 | @Target(ElementType.FIELD)
15 | @Retention(RetentionPolicy.CLASS)
16 | public @interface BindView {
17 |
18 | /**
19 | * 与该View进行绑定的id
20 | *
21 | * @return id
22 | */
23 | int id();
24 | }
25 |
--------------------------------------------------------------------------------
/knife-annotation/src/main/java/me/shouheng/knife/annotation/OnClick.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * 将单击事件与指定的多个id绑定到一起
10 | *
11 | * @author shouh
12 | * @version $Id: OnClick, v 0.1 2018/8/22 22:20 shouh Exp$
13 | */
14 | @Target(ElementType.METHOD)
15 | @Retention(RetentionPolicy.CLASS)
16 | public @interface OnClick {
17 |
18 | /**
19 | * 与该单击事件进行绑定的多个 id
20 | *
21 | * @return 用于绑定的多个 id
22 | */
23 | int[] ids();
24 | }
25 |
--------------------------------------------------------------------------------
/knife-api/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/knife-api/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 27
5 | defaultConfig {
6 | minSdkVersion 17
7 | targetSdkVersion 27
8 | versionCode 1
9 | versionName "1.0"
10 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
11 | }
12 | buildTypes {
13 | release {
14 | minifyEnabled false
15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
16 | }
17 | }
18 | compileOptions {
19 | sourceCompatibility JavaVersion.VERSION_1_8
20 | targetCompatibility JavaVersion.VERSION_1_8
21 | }
22 | }
23 |
24 | dependencies {
25 | implementation fileTree(include: ['*.jar'], dir: 'libs')
26 | testImplementation 'junit:junit:4.12'
27 | androidTestImplementation 'androidx.test:runner:1.1.0'
28 | }
29 |
--------------------------------------------------------------------------------
/knife-api/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/knife-api/src/main/java/me/shouheng/knife/api/Injector.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.api;
2 |
3 | import me.shouheng.knife.api.finder.Finder;
4 |
5 | /**
6 | * @author shouh
7 | * @version $Id: Injector, v 0.1 2018/8/22 22:41 shouh Exp$
8 | */
9 | public interface Injector {
10 |
11 | void inject(T host, Object source, Finder finder);
12 | }
13 |
--------------------------------------------------------------------------------
/knife-api/src/main/java/me/shouheng/knife/api/Unbinder.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.api;
2 |
3 | /**
4 | * @author shouh
5 | * @version $Id: Unbinder, v 0.1 2018/8/22 22:42 shouh Exp$
6 | */
7 | public interface Unbinder {
8 |
9 | void unbind();
10 |
11 | Unbinder EMPTY = new Unbinder() {
12 | @Override
13 | public void unbind() {
14 |
15 | }
16 | };
17 | }
18 |
--------------------------------------------------------------------------------
/knife-api/src/main/java/me/shouheng/knife/api/finder/ActivityFinder.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.api.finder;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.view.View;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ActivityFinder, v 0.1 2018/8/22 22:34 shouh Exp$
10 | */
11 | public class ActivityFinder implements Finder {
12 |
13 | @Override
14 | public Context getContext(Object source) {
15 | return (Activity) source;
16 | }
17 |
18 | @Override
19 | public View findView(Object source, int id) {
20 | return ((Activity) source).findViewById(id);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/knife-api/src/main/java/me/shouheng/knife/api/finder/Finder.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.api.finder;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | /**
7 | * @author shouh
8 | * @version $Id: Finder, v 0.1 2018/8/22 22:27 shouh Exp$
9 | */
10 | public interface Finder {
11 |
12 | Context getContext(Object source);
13 |
14 | View findView(Object source, int id);
15 | }
16 |
--------------------------------------------------------------------------------
/knife-api/src/main/java/me/shouheng/knife/api/finder/ViewFinder.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.api.finder;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | /**
7 | * @author shouh
8 | * @version $Id: ViewFinder, v 0.1 2018/8/22 22:45 shouh Exp$
9 | */
10 | public class ViewFinder implements Finder {
11 |
12 | @Override
13 | public Context getContext(Object source) {
14 | return ((View) source).getContext();
15 | }
16 |
17 | @Override
18 | public View findView(Object source, int id) {
19 | return ((View) source).findViewById(id);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/knife-api/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Knife api
4 |
--------------------------------------------------------------------------------
/knife-compiler/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/knife-compiler/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java-library'
2 |
3 | dependencies {
4 | implementation fileTree(dir: 'libs', include: ['*.jar'])
5 | compile 'com.squareup:javapoet:1.8.0'
6 | compile 'com.google.auto.service:auto-service:1.0-rc2'
7 | compile project(':knife-annotation')
8 | }
9 |
10 | sourceCompatibility = "1.8"
11 | targetCompatibility = "1.8"
12 |
--------------------------------------------------------------------------------
/knife-compiler/src/main/java/me/shouheng/knife/compiler/TypeUtils.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.knife.compiler;
2 |
3 | import com.squareup.javapoet.ClassName;
4 |
5 | /**
6 | * @author shouh
7 | * @version $Id: TypeUtils, v 0.1 2018/8/22 22:54 shouh Exp$
8 | */
9 | public class TypeUtils {
10 |
11 | public final static ClassName FINDER = ClassName.get("me.shouheng.knife.api.finder", "Finder");
12 |
13 | public final static ClassName ONCLICK_LISTENER = ClassName.get("android.view", "View", "OnClickListener");
14 |
15 | public final static ClassName ANDROID_VIEW = ClassName.get("android.view", "View");
16 |
17 | public static final ClassName INJECTOR = ClassName.get("me.shouheng.knife.api", "Injector");
18 | }
19 |
--------------------------------------------------------------------------------
/layout/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/layout/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/layout/src/androidTest/java/me/shouheng/layout/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.layout", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/ModuleLayoutApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleLayoutApp extends BaseApplication {
12 |
13 | private static ModuleLayoutApp application;
14 |
15 | public static ModuleLayoutApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/adapter/BeforeAdapter.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.adapter;
2 |
3 | import android.os.Bundle;
4 | import androidx.appcompat.app.AlertDialog;
5 |
6 | import com.alibaba.android.arouter.facade.annotation.Route;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.tools.LogUtils;
10 | import me.shouheng.commons.view.activity.CommonActivity;
11 | import me.shouheng.layout.R;
12 | import me.shouheng.layout.databinding.ActivityAdapterBinding;
13 |
14 | /**
15 | * Created by WngShhng on 2018/10/29.
16 | */
17 | @Route(path = BaseConstants.LAYOUT_ADAPTER)
18 | public class BeforeAdapter extends CommonActivity {
19 |
20 | @Override
21 | protected int getLayoutResId() {
22 | return R.layout.activity_adapter;
23 | }
24 |
25 | @Override
26 | protected void doCreateView(Bundle savedInstanceState) {
27 | boolean useAdapter = getIntent().getBooleanExtra(BaseConstants.LAYOUT_ADAPTER_ARG_USE_ADAPTER, false);
28 | LogUtils.d("should use screen adapter " + useAdapter);
29 | if (useAdapter) {
30 | AdapterUtils.setCustomDensity(this, getApplication());
31 | }
32 |
33 | new AlertDialog.Builder(this)
34 | .setTitle("测试对话框")
35 | .setMessage("用来测试布局适配性的对话框")
36 | .create().show();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/bottomsheet/BottomSheetActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.bottomsheet;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 |
6 | import com.alibaba.android.arouter.facade.annotation.Route;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.view.activity.CommonActivity;
10 | import me.shouheng.layout.R;
11 | import me.shouheng.layout.databinding.ActivityBottomSheetBinding;
12 |
13 | @Route(path = BaseConstants.LAYOUT_BOTTOM_SHEET)
14 | public class BottomSheetActivity extends CommonActivity {
15 |
16 | @Override
17 | protected int getLayoutResId() {
18 | return R.layout.activity_bottom_sheet;
19 | }
20 |
21 | @Override
22 | protected void doCreateView(Bundle savedInstanceState) {
23 | getBinding().toolbar.setTitle(R.string.menu_item_sub_title_3);
24 | getBinding().toolbar.setTitleTextColor(Color.BLACK);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/collapse/CollapseBarStructure.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.collapse;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 |
6 | import com.alibaba.android.arouter.facade.annotation.Route;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.view.activity.CommonActivity;
10 | import me.shouheng.layout.R;
11 | import me.shouheng.layout.databinding.ActivityCollapseBarStructureBinding;
12 |
13 | @Route(path = BaseConstants.LAYOUT_COLLAPSE_BAR)
14 | public class CollapseBarStructure extends CommonActivity {
15 |
16 | @Override
17 | protected int getLayoutResId() {
18 | return R.layout.activity_collapse_bar_structure;
19 | }
20 |
21 | @Override
22 | protected void doCreateView(Bundle savedInstanceState) {
23 | getBinding().toolbar.setTitle("");
24 | getBinding().toolbar.setTitleTextColor(Color.BLACK);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/custom/CustomView.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.custom;
2 |
3 | import android.content.Context;
4 | import android.graphics.Canvas;
5 | import androidx.annotation.Nullable;
6 | import android.util.AttributeSet;
7 | import android.view.View;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: CustomView, v 0.1 2018/10/13 11:31 shouh Exp$
12 | */
13 | public class CustomView extends View {
14 |
15 | public CustomView(Context context) {
16 | super(context);
17 | }
18 |
19 | public CustomView(Context context, @Nullable AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | public CustomView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
24 | super(context, attrs, defStyleAttr);
25 | }
26 |
27 | @Override
28 | protected void onDraw(Canvas canvas) {
29 | super.onDraw(canvas);
30 | }
31 |
32 | @Override
33 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
34 | super.onLayout(changed, left, top, right, bottom);
35 | }
36 |
37 | @Override
38 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
39 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/scrolling/ScrollingActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.scrolling;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import com.google.android.material.snackbar.Snackbar;
6 |
7 | import com.alibaba.android.arouter.facade.annotation.Route;
8 |
9 | import me.shouheng.commons.config.BaseConstants;
10 | import me.shouheng.commons.view.activity.CommonActivity;
11 | import me.shouheng.layout.R;
12 | import me.shouheng.layout.databinding.ActivityScrollingBinding;
13 |
14 | @Route(path = BaseConstants.LAYOUT_SCROLLING)
15 | public class ScrollingActivity extends CommonActivity {
16 |
17 | @Override
18 | protected int getLayoutResId() {
19 | return R.layout.activity_scrolling;
20 | }
21 |
22 | @Override
23 | protected void doCreateView(Bundle savedInstanceState) {
24 | getBinding().toolbar.setTitle(R.string.menu_item_sub_title_4);
25 | getBinding().toolbar.setTitleTextColor(Color.BLACK);
26 |
27 | getBinding().fab.setOnClickListener(v ->
28 | Snackbar.make(v, "Replace with your own action", Snackbar.LENGTH_LONG)
29 | .setAction("Action", null).show());
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/support28/Support28Activity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.support28;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 | import com.alibaba.android.arouter.launcher.ARouter;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.view.activity.CommonActivity;
10 | import me.shouheng.layout.R;
11 | import me.shouheng.layout.databinding.ActivitySupport28Binding;
12 |
13 | /**
14 | * Created by WngShhng on 2018/9/11.
15 | */
16 | @Route(path = BaseConstants.LAYOUT_SUPPORT_28)
17 | public class Support28Activity extends CommonActivity {
18 |
19 | @Override
20 | protected int getLayoutResId() {
21 | return R.layout.activity_support_28;
22 | }
23 |
24 | @Override
25 | protected void doCreateView(Bundle savedInstanceState) {
26 | getBinding().btnBottomBar.setOnClickListener(v ->
27 | ARouter.getInstance()
28 | .build(BaseConstants.LAYOUT_BOTTOM_APP_BAR)
29 | .navigation());
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/swipe/SwipeBackDemoActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.swipe;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 |
7 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.layout.R;
10 |
11 | /**
12 | * Created by WngShhng on 2018/10/19.
13 | */
14 | @Route(path = BaseConstants.LAYOUT_SWIPE_BACK)
15 | public class SwipeBackDemoActivity extends SwipeBackActivity {
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_swipe_back);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/layout/src/main/java/me/shouheng/layout/view/views/CustomView.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout.view.views;
2 |
3 | import android.content.Context;
4 | import androidx.annotation.Nullable;
5 | import android.util.AttributeSet;
6 | import android.view.View;
7 | import android.widget.Scroller;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: CustomView, v 0.1 2018/10/5 16:34 shouh Exp$
12 | */
13 | public class CustomView extends View {
14 |
15 | private Scroller scroller = new Scroller(getContext());
16 |
17 | public CustomView(Context context) {
18 | super(context);
19 | }
20 |
21 | public CustomView(Context context, @Nullable AttributeSet attrs) {
22 | super(context, attrs);
23 | }
24 |
25 | public CustomView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
26 | super(context, attrs, defStyleAttr);
27 | }
28 |
29 | @Override
30 | public void computeScroll() {
31 | super.computeScroll();
32 | if (scroller.computeScrollOffset()) {
33 | ((View) getParent()).scrollTo(scroller.getCurrX(), scroller.getCurrY());
34 | invalidate();
35 | }
36 | }
37 |
38 | public void smoothScrollTo(int descX, int descY) {
39 | scroller.startScroll(getScrollX(), getScrollY(), descX - getScrollX(), descY - getScrollY(), 2000);
40 | invalidate();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/layout/src/main/res/anim/cycle_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
--------------------------------------------------------------------------------
/layout/src/main/res/anim/layout_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layout/src/main/res/anim/shake.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/branded_background.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/mark_note.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/mark_note.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record0.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record1.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record2.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record3.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record4.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record5.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/drawable/record6.png
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/record_anim.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/layout/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/activity_adapter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
12 |
13 |
21 |
22 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/activity_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/activity_edit_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
20 |
21 |
26 |
27 |
28 |
29 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/activity_navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
17 |
18 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/activity_swipe_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/bottom_sheet_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/content_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
--------------------------------------------------------------------------------
/layout/src/main/res/layout/nav_header_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
21 |
22 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/layout/src/main/res/menu/bottom_navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layout/src/main/res/menu/drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/layout/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/layout/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/layout/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/layout/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FAFAFA
4 | #FAFAFA
5 | #0078FF
6 |
7 |
--------------------------------------------------------------------------------
/layout/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 176dp
7 | 16dp
8 |
--------------------------------------------------------------------------------
/layout/src/main/res/values/drawables.xml:
--------------------------------------------------------------------------------
1 |
2 | - @android:drawable/ic_menu_camera
3 | - @android:drawable/ic_menu_gallery
4 | - @android:drawable/ic_menu_slideshow
5 | - @android:drawable/ic_menu_manage
6 | - @android:drawable/ic_menu_share
7 | - @android:drawable/ic_menu_send
8 |
9 |
--------------------------------------------------------------------------------
/layout/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | layout
3 | DrawerActivity
4 | Open navigation drawer
5 | Close navigation drawer
6 | Android Studio
7 | android.studio@android.com
8 | Navigation header
9 | Settings
10 |
11 |
--------------------------------------------------------------------------------
/layout/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/layout/src/test/java/me/shouheng/layout/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.layout;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 |
14 | @Test
15 | public void dpTestCase1() {
16 | int width = 720, height = 1280;
17 | float inch = 4.7f;
18 | float result = (float) (Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)) / inch);
19 | assertEquals(360, result, 0.1);
20 | }
21 |
22 | @Test
23 | public void dpTestCase2() {
24 | int width = 1920, height = 1080;
25 | float inch = 5f;
26 | float result = (float) (Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2)) / inch);
27 | assertEquals(440, result, 0.1);
28 | }
29 | }
--------------------------------------------------------------------------------
/libraries/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/libraries/libs/libtest.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/libs/libtest.so
--------------------------------------------------------------------------------
/libraries/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # EventBus
2 | -keepattributes *Annotation*
3 | -keepclassmembers class * {
4 | @org.greenrobot.eventbus.Subscribe ;
5 | }
6 | -keep enum org.greenrobot.eventbus.ThreadMode { *; }
7 | # Only required if you use AsyncExecutor
8 | -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
9 | (java.lang.Throwable);
10 | }
11 |
12 |
13 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/ModuleLibraryApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: ModuleGuokrApp, v 0.1 2018/6/6 22:30 shouh Exp$
10 | */
11 | public class ModuleLibraryApp extends BaseApplication {
12 |
13 | private static ModuleLibraryApp application;
14 |
15 | public static ModuleLibraryApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/MyKnifeActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries;
2 |
3 | import android.os.Bundle;
4 | import android.widget.TextView;
5 |
6 | import com.alibaba.android.arouter.facade.annotation.Route;
7 |
8 | import me.shouheng.commons.config.BaseConstants;
9 | import me.shouheng.commons.tools.ToastUtils;
10 | import me.shouheng.commons.view.activity.CommonActivity;
11 | import me.shouheng.knife.api.MyKnife;
12 | import me.shouheng.libraries.databinding.ActivityMyKnifeBinding;
13 |
14 | /**
15 | * @Warn Test my knife activity, delete the annotations if you set this module as lib instead of application. */
16 | @Route(path = BaseConstants.LIBRARY_MY_KNIFE)
17 | public class MyKnifeActivity extends CommonActivity {
18 |
19 | // @BindView(id = R.id.tv)
20 | public TextView textView;
21 |
22 | // @OnClick(ids = {R.id.btn})
23 | public void OnClick() {
24 | ToastUtils.makeToast("OnClick");
25 | }
26 |
27 | @Override
28 | protected int getLayoutResId() {
29 | return R.layout.activity_my_knife;
30 | }
31 |
32 | @Override
33 | protected void doCreateView(Bundle savedInstanceState) {
34 | MyKnife.bind(this);
35 | textView.setText("This is MyKnife demo!");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/eventbus/MessageWrap.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.eventbus;
2 |
3 | /**
4 | * @author shouh
5 | * @version $Id: MessageWrap, v 0.1 2018/8/5 15:18 shouh Exp$
6 | */
7 | public class MessageWrap {
8 |
9 | public final String message;
10 |
11 | public static MessageWrap getInstance(String message) {
12 | return new MessageWrap(message);
13 | }
14 |
15 | private MessageWrap(String message) {
16 | this.message = message;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/handler/FileRecognizeTask.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.handler;
2 |
3 | import android.app.IntentService;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | import me.shouheng.commons.tools.LogUtils;
8 |
9 | /**
10 | * @author shouh
11 | * @version $Id: FileRecognizeTask, v 0.1 2018/11/4 23:40 shouh Exp$
12 | */
13 | public class FileRecognizeTask extends IntentService {
14 |
15 | public static void start(Context context) {
16 | Intent intent = new Intent(context, FileRecognizeTask.class);
17 | context.startService(intent);
18 | }
19 |
20 | public FileRecognizeTask() {
21 | super("FileRecognizeTask");
22 | }
23 |
24 |
25 | @Override
26 | protected void onHandleIntent(@androidx.annotation.Nullable Intent intent) {
27 | // do something
28 | LogUtils.d("=========================================");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/rxjava/RxBusActivity.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.rxjava;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.alibaba.android.arouter.facade.annotation.Route;
6 |
7 | import me.shouheng.commons.config.BaseConstants;
8 | import me.shouheng.commons.view.activity.CommonActivity;
9 | import me.shouheng.libraries.R;
10 | import me.shouheng.libraries.databinding.ActivityRxBusBinding;
11 |
12 | /**
13 | * Created by WngShhng on 2018/8/17.
14 | */
15 | @Route(path = BaseConstants.LIBRARY_RX_JAVA_BUS)
16 | public class RxBusActivity extends CommonActivity {
17 |
18 | @Override
19 | protected int getLayoutResId() {
20 | return R.layout.activity_rx_bus;
21 | }
22 |
23 | @Override
24 | protected void doCreateView(Bundle savedInstanceState) {
25 | getBinding().btnSendEvent.setOnClickListener(v -> {
26 | postEvent(new RxMessage("Hello world!"));
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/rxjava/RxMessage.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.rxjava;
2 |
3 | /**
4 | * Created by WngShhng on 2018/8/17.*/
5 | public class RxMessage {
6 |
7 | public final String message;
8 |
9 | RxMessage(String message) {
10 | this.message = message;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/workmanager/PeriodicTask.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.workmanager;
2 |
3 | import android.content.Context;
4 | import androidx.annotation.NonNull;
5 |
6 | import androidx.work.Worker;
7 | import androidx.work.WorkerParameters;
8 | import io.reactivex.Observable;
9 | import io.reactivex.disposables.Disposable;
10 | import me.shouheng.commons.tools.LogUtils;
11 |
12 | /**
13 | * Created by WngShhng on 2018/9/13.
14 | */
15 | public class PeriodicTask extends Worker {
16 |
17 | private static int repeatCountStatic = 0;
18 |
19 | private int repeatCount = 0;
20 |
21 | public PeriodicTask(@NonNull Context context, @NonNull WorkerParameters workerParams) {
22 | super(context, workerParams);
23 | }
24 |
25 | @NonNull
26 | @Override
27 | public Result doWork() {
28 | repeatCount++;
29 | repeatCountStatic++;
30 | LogUtils.d("PeriodicTask " + repeatCount + "/" + repeatCountStatic + ". begins ......");
31 | LogUtils.d(Thread.currentThread());
32 | Disposable disposable = Observable.range(1, 10).subscribe(integer -> {
33 | System.out.println(Thread.currentThread());
34 | System.out.println("PeriodicTask " + repeatCount + "/" + repeatCountStatic + " : " + integer);
35 | Thread.sleep(1000);
36 | });
37 | return Result.SUCCESS;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/workmanager/SingleTask.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.workmanager;
2 |
3 | import android.content.Context;
4 | import androidx.annotation.NonNull;
5 |
6 | import androidx.work.Worker;
7 | import androidx.work.WorkerParameters;
8 | import io.reactivex.Observable;
9 | import io.reactivex.disposables.Disposable;
10 | import me.shouheng.commons.tools.LogUtils;
11 |
12 | /**
13 | * Created by WngShhng on 2018/9/13.
14 | */
15 | public class SingleTask extends Worker {
16 |
17 | public SingleTask(@NonNull Context context, @NonNull WorkerParameters workerParams) {
18 | super(context, workerParams);
19 | }
20 |
21 | @NonNull
22 | @Override
23 | public Result doWork() {
24 | LogUtils.d("SingleTask 1. begins ......");
25 | LogUtils.d(Thread.currentThread());
26 | Disposable disposable = Observable.range(1, 10).subscribe(integer -> {
27 | System.out.println(Thread.currentThread());
28 | System.out.println("SingleTask 1 : " + integer);
29 | Thread.sleep(1000);
30 | });
31 | return Result.SUCCESS;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/libraries/src/main/java/me/shouheng/libraries/workmanager/SingleTask2.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.libraries.workmanager;
2 |
3 | import android.content.Context;
4 | import androidx.annotation.NonNull;
5 |
6 | import androidx.work.Worker;
7 | import androidx.work.WorkerParameters;
8 | import io.reactivex.Observable;
9 | import io.reactivex.disposables.Disposable;
10 | import me.shouheng.commons.tools.LogUtils;
11 |
12 | /**
13 | * Created by WngShhng on 2018/9/13.
14 | */
15 | public class SingleTask2 extends Worker {
16 |
17 | public SingleTask2(@NonNull Context context, @NonNull WorkerParameters workerParams) {
18 | super(context, workerParams);
19 | }
20 |
21 | @NonNull
22 | @Override
23 | public Result doWork() {
24 | LogUtils.d("SingleTask 2. begins ......");
25 | LogUtils.d(Thread.currentThread());
26 | Disposable disposable = Observable.range(1, 10).subscribe(integer -> {
27 | System.out.println(Thread.currentThread());
28 | System.out.println("SingleTask 2 : " + integer);
29 | Thread.sleep(1000);
30 | });
31 | return Result.SUCCESS;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/libraries/src/main/res/drawable/ice_land.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/drawable/ice_land.jpg
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_clip_picture.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_fingerprint_identify.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
17 |
18 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_handler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_my_knife.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_rx_bus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/activity_serialize.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/libraries/src/main/res/layout/fragment_demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/libraries/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/src/main/res/raw/ice_land.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/raw/ice_land.jpg
--------------------------------------------------------------------------------
/libraries/src/main/res/raw/test_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/libraries/src/main/res/raw/test_pic.png
--------------------------------------------------------------------------------
/libraries/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FAFAFA
4 | #FAFAFA
5 | #0078FF
6 |
7 |
--------------------------------------------------------------------------------
/libraries/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | libraries
3 |
4 |
--------------------------------------------------------------------------------
/libraries/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/live/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/live/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/live/src/androidTest/java/me/shouheng/live/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.assertEquals;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.shouheng.live", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/live/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/LiveModuleApp.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live;
2 |
3 | import com.alibaba.android.arouter.launcher.ARouter;
4 |
5 | import me.shouheng.commons.BaseApplication;
6 |
7 | /**
8 | * @author shouh
9 | * @version $Id: LiveModuleApp, v 0.1 2018/7/30 20:40 shouh Exp$
10 | */
11 | public class LiveModuleApp extends BaseApplication {
12 |
13 | private static LiveModuleApp application;
14 |
15 | public static LiveModuleApp getContext() {
16 | return application;
17 | }
18 |
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | application = this;
23 |
24 | ARouter.init(this);
25 | }
26 | }
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/common/DecimalFormatUtil.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live.common;
2 |
3 | import java.text.DecimalFormat;
4 |
5 | public class DecimalFormatUtil {
6 |
7 | private static final DecimalFormat decimalFormat = new DecimalFormat();
8 |
9 | public static String formatW(int vaule){
10 | if(vaule >= 10000){
11 | float l = vaule / 10000.0f;
12 | return format(l,"#.#'W'");
13 | }
14 | return String.valueOf(vaule);
15 | }
16 |
17 | public static String format(float vaule, String pattern){
18 | decimalFormat.applyPattern(pattern);
19 | return decimalFormat.format(vaule);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/model/LiveService.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live.model;
2 |
3 | import io.reactivex.Observable;
4 | import me.shouheng.live.model.data.AppStart;
5 | import me.shouheng.live.model.data.Recommend;
6 | import me.shouheng.live.model.data.Room;
7 | import retrofit2.http.GET;
8 | import retrofit2.http.Path;
9 |
10 | /**
11 | * @author shouh
12 | * @version $Id: LiveService, v 0.1 2018/6/8 21:49 shouh Exp$
13 | */
14 | public interface LiveService {
15 |
16 | @GET("json/page/app-data/info.json?v=3.0.1&os=1&ver=4")
17 | Observable getAppStartInfo();
18 |
19 | @GET("json/app/index/recommend/list-android.json?v=3.0.1&os=1&ver=4")
20 | Observable getRecommend();
21 |
22 | @GET("json/rooms/{uid}/info.json?v=3.0.1&os=1&ver=4")
23 | Observable enterRoom(@Path("uid") String uid);
24 | }
25 |
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/model/data/StreamSrc.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live.model.data;
2 |
3 | public class StreamSrc {
4 |
5 | private String name;
6 |
7 | private String src;
8 |
9 | public String getName() {
10 | return name;
11 | }
12 |
13 | public void setName(String name) {
14 | this.name = name;
15 | }
16 |
17 | public String getSrc() {
18 | return src;
19 | }
20 |
21 | public void setSrc(String src) {
22 | this.src = src;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | return "StreamSrc{" +
28 | "name='" + name + '\'' +
29 | ", src='" + src + '\'' +
30 | '}';
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/model/repository/LiveRetrofit.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live.model.repository;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import me.shouheng.live.model.LiveService;
6 | import okhttp3.OkHttpClient;
7 | import retrofit2.Retrofit;
8 | import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
9 | import retrofit2.converter.gson.GsonConverterFactory;
10 |
11 | /**
12 | * Created by WngShhng on 2018/7/30.*/
13 | public class LiveRetrofit {
14 |
15 | public static LiveService getLiveService() {
16 | return new Retrofit.Builder()
17 | .baseUrl("http://www.quanmin.tv/")
18 | .addConverterFactory(GsonConverterFactory.create())
19 | .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
20 | .client(getOkHttpClient())
21 | .build()
22 | .create(LiveService.class);
23 | }
24 |
25 | private static OkHttpClient getOkHttpClient() {
26 | return new OkHttpClient.Builder()
27 | .connectTimeout(10, TimeUnit.SECONDS)
28 | .readTimeout(10, TimeUnit.SECONDS)
29 | .writeTimeout(10, TimeUnit.SECONDS)
30 | .build();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/live/src/main/java/me/shouheng/live/view/Constant.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live.view;
2 |
3 | /**
4 | * @author shouh
5 | * @version $Id: Constant, v 0.1 2018/6/9 10:46 shouh Exp$
6 | */
7 | public class Constant {
8 |
9 | public static final String SHOWING = "showing";
10 | }
11 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable-xxhdpi/ic_dot_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable-xxhdpi/ic_dot_normal.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable-xxhdpi/ic_dot_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable-xxhdpi/ic_dot_pressed.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable-xxhdpi/viewer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable-xxhdpi/viewer.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/full_room_avatar_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_arrow_back_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_card_giftcard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_forum_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_fullscreen_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_mail_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_more_vert_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_person_add_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_send_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/ic_share_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/main/res/drawable/live_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/live_default.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/live_default_recommend_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/live_default_recommend_icon.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/mine_default_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/mine_default_avatar.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart0.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart1.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart10.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart2.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart3.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart4.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart5.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart6.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart7.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart8.png
--------------------------------------------------------------------------------
/live/src/main/res/drawable/resource_heart9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/drawable/resource_heart9.png
--------------------------------------------------------------------------------
/live/src/main/res/layout/activity_live.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
13 |
14 |
19 |
20 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/live/src/main/res/layout/activity_live_room.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/live/src/main/res/layout/fragment_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/live/src/main/res/layout/layout_banner.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/live/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shouheng88/Android-references/82aeb9174f28bef322fba62e07a68f9b5d12ee68/live/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/live/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/live/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/live/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | live
3 |
4 |
--------------------------------------------------------------------------------
/live/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/live/src/test/java/me/shouheng/live/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.shouheng.live;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------