├── .gitignore
├── .idea
├── gradle.xml
├── misc.xml
├── modules.xml
└── runConfigurations.xml
├── README.md
├── build.gradle
├── complex
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── complex
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── complex
│ │ │ ├── AppbarNestedActivity.kt
│ │ │ ├── AppbarRecyclerActivity.kt
│ │ │ ├── BroadSystemActivity.kt
│ │ │ ├── BroadTempActivity.kt
│ │ │ ├── CollapseParallaxActivity.kt
│ │ │ ├── CollapsePinActivity.kt
│ │ │ ├── CoordinatorActivity.kt
│ │ │ ├── DepartmentChannelActivity.kt
│ │ │ ├── FragmentDynamicActivity.kt
│ │ │ ├── GridViewActivity.kt
│ │ │ ├── ImageFadeActivity.kt
│ │ │ ├── ListViewActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── RecyclerGridActivity.kt
│ │ │ ├── RecyclerLinearActivity.kt
│ │ │ ├── RecyclerStaggeredActivity.kt
│ │ │ ├── ScrollAlipayActivity.kt
│ │ │ ├── ScrollFlagActivity.kt
│ │ │ ├── SpinnerDialogActivity.kt
│ │ │ ├── SwipeRecyclerActivity.kt
│ │ │ ├── TabLayoutActivity.kt
│ │ │ ├── ToolbarActivity.kt
│ │ │ ├── ViewPagerActivity.kt
│ │ │ ├── adapter
│ │ │ ├── BroadcastPagerAdapter.kt
│ │ │ ├── ChannelPagerAdapter.kt
│ │ │ ├── GoodsPagerAdapter.kt
│ │ │ ├── ImagePagerAdapater.kt
│ │ │ ├── MobilePagerAdapter.kt
│ │ │ ├── PlanetGridAdapter.kt
│ │ │ ├── PlanetListAdapter.kt
│ │ │ ├── RecyclerBaseAdapter.kt
│ │ │ ├── RecyclerCollapseAdapter.kt
│ │ │ ├── RecyclerCommonAdapter.kt
│ │ │ ├── RecyclerExtras.kt
│ │ │ ├── RecyclerGridAdapter.kt
│ │ │ ├── RecyclerLifeAdapter.kt
│ │ │ ├── RecyclerLinearAdapter.kt
│ │ │ ├── RecyclerStaggeredAdapter.kt
│ │ │ └── RecyclerSwipeAdapter.kt
│ │ │ ├── bean
│ │ │ ├── GoodsInfo.kt
│ │ │ ├── LifeItem.kt
│ │ │ ├── Planet.kt
│ │ │ └── RecyclerInfo.kt
│ │ │ ├── fragment
│ │ │ ├── AppliancesFragment.kt
│ │ │ ├── BookCoverFragment.kt
│ │ │ ├── BookDetailFragment.kt
│ │ │ ├── BroadcastFragment.kt
│ │ │ ├── ClothesFragment.kt
│ │ │ └── DynamicFragment.kt
│ │ │ ├── util
│ │ │ └── DateUtil.kt
│ │ │ └── widget
│ │ │ └── SpacesItemDecoration.kt
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── arrow_down.png
│ │ ├── big_chat.png
│ │ ├── big_pay.png
│ │ ├── big_qrcode.png
│ │ ├── big_scan.png
│ │ ├── diqiu.jpg
│ │ ├── divider_red.png
│ │ ├── divider_red2.png
│ │ ├── float_btn.png
│ │ ├── huoxing.jpg
│ │ ├── ic_back.png
│ │ ├── ic_launcher.png
│ │ ├── icon_contact.png
│ │ ├── icon_plus.png
│ │ ├── icon_search.png
│ │ ├── icon_transfer.png
│ │ ├── jinxing.jpg
│ │ ├── muxing.jpg
│ │ ├── null_point.png
│ │ ├── pic_01.png
│ │ ├── pic_02.png
│ │ ├── pic_03.png
│ │ ├── pic_04.png
│ │ ├── pic_05.png
│ │ ├── pic_06.png
│ │ ├── pic_07.png
│ │ ├── pic_08.png
│ │ ├── pic_09.png
│ │ ├── pic_10.png
│ │ ├── pic_11.png
│ │ ├── pic_12.png
│ │ ├── pic_13.png
│ │ ├── pic_14.png
│ │ ├── pic_15.png
│ │ ├── pic_16.png
│ │ ├── public_01.png
│ │ ├── public_02.png
│ │ ├── public_03.png
│ │ ├── public_04.png
│ │ ├── public_05.png
│ │ ├── red_point.png
│ │ ├── shuixing.jpg
│ │ ├── small_charge.png
│ │ ├── small_money.png
│ │ ├── small_pay.png
│ │ ├── small_scan.png
│ │ ├── top_pic.png
│ │ └── tuxing.jpg
│ │ ├── drawable-xhdpi
│ │ ├── book_cover.png
│ │ ├── book_detail.png
│ │ ├── dian01.png
│ │ ├── dian02.png
│ │ ├── dian03.png
│ │ ├── dian04.png
│ │ ├── dian05.png
│ │ ├── dian06.png
│ │ ├── dian07.png
│ │ ├── dian08.png
│ │ ├── dian09.png
│ │ ├── dian10.png
│ │ ├── dian11.png
│ │ ├── dian12.png
│ │ ├── dian13.png
│ │ ├── dian14.png
│ │ ├── dian15.png
│ │ ├── guide_bg1.jpg
│ │ ├── guide_bg2.jpg
│ │ ├── guide_bg3.jpg
│ │ ├── guide_bg4.jpg
│ │ ├── huawei.jpg
│ │ ├── huawei_s.jpg
│ │ ├── ic_launcher.png
│ │ ├── iphone.jpg
│ │ ├── iphone_s.jpg
│ │ ├── meizu.jpg
│ │ ├── meizu_s.jpg
│ │ ├── oppo.jpg
│ │ ├── oppo_s.jpg
│ │ ├── skirt01.png
│ │ ├── skirt02.png
│ │ ├── skirt03.png
│ │ ├── skirt04.png
│ │ ├── skirt05.png
│ │ ├── skirt06.png
│ │ ├── skirt07.png
│ │ ├── skirt08.png
│ │ ├── skirt09.png
│ │ ├── skirt10.png
│ │ ├── skirt11.png
│ │ ├── skirt12.png
│ │ ├── skirt13.png
│ │ ├── skirt14.png
│ │ ├── skirt15.png
│ │ ├── skirt16.png
│ │ ├── skirt17.png
│ │ ├── skirt18.png
│ │ ├── skirt19.png
│ │ ├── skirt20.png
│ │ ├── skirt21.png
│ │ ├── skirt22.png
│ │ ├── skirt23.png
│ │ ├── vivo.jpg
│ │ ├── vivo_s.jpg
│ │ ├── xiaomi.jpg
│ │ └── xiaomi_s.jpg
│ │ ├── drawable
│ │ ├── editext_selector.xml
│ │ ├── shape_edit_focus.xml
│ │ ├── shape_edit_normal.xml
│ │ ├── shape_search.xml
│ │ ├── toolbar_image_selector.xml
│ │ └── toolbar_text_selector.xml
│ │ ├── layout
│ │ ├── activity_appbar_nested.xml
│ │ ├── activity_appbar_recycler.xml
│ │ ├── activity_broadcast_system.xml
│ │ ├── activity_broadcast_temp.xml
│ │ ├── activity_collapse_parallax.xml
│ │ ├── activity_collapse_pin.xml
│ │ ├── activity_coordinator.xml
│ │ ├── activity_department_channel.xml
│ │ ├── activity_fragment_dynamic.xml
│ │ ├── activity_grid_view.xml
│ │ ├── activity_image_fade.xml
│ │ ├── activity_list_view.xml
│ │ ├── activity_main.xml
│ │ ├── activity_recycler_grid.xml
│ │ ├── activity_recycler_linear.xml
│ │ ├── activity_recycler_staggered.xml
│ │ ├── activity_scroll_alipay.xml
│ │ ├── activity_scroll_flag.xml
│ │ ├── activity_spinner_dialog.xml
│ │ ├── activity_swipe_recycler.xml
│ │ ├── activity_tab_layout.xml
│ │ ├── activity_toolbar.xml
│ │ ├── activity_view_pager.xml
│ │ ├── fragment_appliances.xml
│ │ ├── fragment_book_cover.xml
│ │ ├── fragment_book_detail.xml
│ │ ├── fragment_broadcast.xml
│ │ ├── fragment_clothes.xml
│ │ ├── fragment_dynamic.xml
│ │ ├── item_collapse.xml
│ │ ├── item_dropdown.xml
│ │ ├── item_grid_view.xml
│ │ ├── item_life.xml
│ │ ├── item_list_view.xml
│ │ ├── item_recycler_grid.xml
│ │ ├── item_recycler_linear.xml
│ │ ├── item_recycler_staggered.xml
│ │ ├── item_select.xml
│ │ ├── life_pay.xml
│ │ ├── toolbar_collapse.xml
│ │ └── toolbar_expand.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
│ └── test
│ └── java
│ └── com
│ └── example
│ └── complex
│ └── ExampleUnitTest.java
├── custom
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── custom
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── custom
│ │ │ ├── CustomPropertyActivity.kt
│ │ │ ├── DrawRoundActivity.kt
│ │ │ ├── FreshDetailActivity.kt
│ │ │ ├── FreshPurchaseActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainApplication.kt
│ │ │ ├── MeasureViewActivity.kt
│ │ │ ├── NotifyCounterActivity.kt
│ │ │ ├── NotifyCustomActivity.kt
│ │ │ ├── NotifyLargeActivity.kt
│ │ │ ├── NotifyServiceActivity.kt
│ │ │ ├── NotifySimpleActivity.kt
│ │ │ ├── NotifySpecialActivity.kt
│ │ │ ├── ProgressAnimationActivity.kt
│ │ │ ├── ProgressBarActivity.kt
│ │ │ ├── RunnableActivity.kt
│ │ │ ├── ServiceBindActivity.kt
│ │ │ ├── ServiceNormalActivity.kt
│ │ │ ├── TextProgressActivity.kt
│ │ │ ├── VibratorActivity.kt
│ │ │ ├── adapter
│ │ │ ├── FreshAdapter.kt
│ │ │ ├── ImagePagerAdapater.kt
│ │ │ └── PlanetAdapter.kt
│ │ │ ├── bean
│ │ │ ├── FreshInfo.kt
│ │ │ ├── GoodsInfo.kt
│ │ │ └── Planet.kt
│ │ │ ├── service
│ │ │ ├── BindService.kt
│ │ │ ├── GroupService.kt
│ │ │ ├── MusicService.kt
│ │ │ └── NormalService.kt
│ │ │ ├── util
│ │ │ ├── DateUtil.kt
│ │ │ ├── NotifyUtil.kt
│ │ │ └── System.kt
│ │ │ └── widget
│ │ │ ├── CustomPagerTab.kt
│ │ │ ├── NoScrollListView.kt
│ │ │ ├── RoundLayout.kt
│ │ │ ├── RoundTextView.kt
│ │ │ └── TextProgressBar.kt
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── arrow_down.png
│ │ ├── diqiu.jpg
│ │ ├── huoxing.jpg
│ │ ├── ic_app.png
│ │ ├── ic_back.png
│ │ ├── icon_cancel.png
│ │ ├── icon_confirm.png
│ │ ├── icon_financer.png
│ │ ├── icon_sunshine.png
│ │ ├── jinxing.jpg
│ │ ├── muxing.jpg
│ │ ├── notify_green.9.png
│ │ ├── shuixing.jpg
│ │ ├── tt.png
│ │ ├── tt_s.jpg
│ │ └── tuxing.jpg
│ │ ├── drawable-xhdpi
│ │ ├── dalongxia.jpg
│ │ ├── dazhaxie.jpg
│ │ ├── diwangxie.jpg
│ │ ├── guihuayu.jpg
│ │ ├── hongxun.jpg
│ │ ├── huawei.jpg
│ │ ├── huawei_s.jpg
│ │ ├── ic_launcher.png
│ │ ├── iphone.jpg
│ │ ├── iphone_s.jpg
│ │ ├── meizu.jpg
│ │ ├── meizu_s.jpg
│ │ ├── oppo.jpg
│ │ ├── oppo_s.jpg
│ │ ├── pipixia.jpg
│ │ ├── sanwenyu.jpg
│ │ ├── vivo.jpg
│ │ ├── vivo_s.jpg
│ │ ├── wuchangyu.jpg
│ │ ├── xiaolongxia.jpg
│ │ ├── xiaomi.jpg
│ │ └── xiaomi_s.jpg
│ │ ├── drawable
│ │ ├── editext_selector.xml
│ │ ├── progress_green.xml
│ │ ├── shape_edit_focus.xml
│ │ ├── shape_edit_normal.xml
│ │ └── text_color_selector.xml
│ │ ├── layout
│ │ ├── activity_custom_property.xml
│ │ ├── activity_draw_round.xml
│ │ ├── activity_fresh_detail.xml
│ │ ├── activity_fresh_purchase.xml
│ │ ├── activity_main.xml
│ │ ├── activity_measure_view.xml
│ │ ├── activity_notify_counter.xml
│ │ ├── activity_notify_custom.xml
│ │ ├── activity_notify_large.xml
│ │ ├── activity_notify_progress.xml
│ │ ├── activity_notify_service.xml
│ │ ├── activity_notify_simple.xml
│ │ ├── activity_notify_special.xml
│ │ ├── activity_progress_animation.xml
│ │ ├── activity_progress_bar.xml
│ │ ├── activity_runnable.xml
│ │ ├── activity_service_bind.xml
│ │ ├── activity_service_normal.xml
│ │ ├── activity_text_progress.xml
│ │ ├── activity_vibrator.xml
│ │ ├── item_dropdown.xml
│ │ ├── item_fresh.xml
│ │ ├── item_list_view.xml
│ │ ├── item_select.xml
│ │ ├── notify_expand.xml
│ │ ├── notify_group.xml
│ │ └── notify_music.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
│ └── com
│ └── example
│ └── custom
│ └── ExampleUnitTest.java
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── grammar
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── grammar
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── grammar
│ │ │ ├── ArrayActivity.kt
│ │ │ ├── ClassActivity.kt
│ │ │ ├── ConditionActivity.kt
│ │ │ ├── EqualActivity.kt
│ │ │ ├── FunctionActivity.kt
│ │ │ ├── InheritActivity.kt
│ │ │ ├── ListOfActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MapOfActivity.kt
│ │ │ ├── MemberActivity.kt
│ │ │ ├── NullActivity.kt
│ │ │ ├── ParamActivity.kt
│ │ │ ├── RepeatActivity.kt
│ │ │ ├── SecretActivity.kt
│ │ │ ├── SetOfActivity.kt
│ │ │ ├── SpecialActivity.kt
│ │ │ ├── StringActivity.kt
│ │ │ ├── SystemActivity.kt
│ │ │ ├── VariableActivity.kt
│ │ │ ├── animal
│ │ │ ├── Animal.kt
│ │ │ ├── AnimalDefault.kt
│ │ │ ├── AnimalMain.kt
│ │ │ ├── AnimalSeparate.kt
│ │ │ ├── WildAnimal.kt
│ │ │ ├── WildAnimalCompanion.kt
│ │ │ ├── WildAnimalConstant.kt
│ │ │ ├── WildAnimalFunction.kt
│ │ │ └── WildAnimalMember.kt
│ │ │ ├── bird
│ │ │ ├── Behavior.kt
│ │ │ ├── BehaviorFly.kt
│ │ │ ├── BehaviorRun.kt
│ │ │ ├── BehaviorSwim.kt
│ │ │ ├── Bird.kt
│ │ │ ├── Chick.kt
│ │ │ ├── Chicken.kt
│ │ │ ├── Cock.kt
│ │ │ ├── Duck.kt
│ │ │ ├── Goose.kt
│ │ │ ├── Hen.kt
│ │ │ ├── Ostrich.kt
│ │ │ └── WildFowl.kt
│ │ │ ├── forest
│ │ │ ├── Plant.kt
│ │ │ ├── River.kt
│ │ │ ├── SeasonName.kt
│ │ │ ├── SeasonSealed.kt
│ │ │ ├── SeasonType.kt
│ │ │ └── Tree.kt
│ │ │ ├── special
│ │ │ └── LogUtil.kt
│ │ │ └── util
│ │ │ ├── DateUtil.kt
│ │ │ ├── ExtendArray.kt
│ │ │ ├── ExtendDate.kt
│ │ │ └── GlobalFunction.kt
│ └── res
│ │ ├── layout
│ │ ├── activity_array.xml
│ │ ├── activity_class.xml
│ │ ├── activity_condition.xml
│ │ ├── activity_equal.xml
│ │ ├── activity_function.xml
│ │ ├── activity_inherit.xml
│ │ ├── activity_list_of.xml
│ │ ├── activity_main.xml
│ │ ├── activity_map_of.xml
│ │ ├── activity_member.xml
│ │ ├── activity_null.xml
│ │ ├── activity_param.xml
│ │ ├── activity_repeat.xml
│ │ ├── activity_secret.xml
│ │ ├── activity_set_of.xml
│ │ ├── activity_special.xml
│ │ ├── activity_string.xml
│ │ ├── activity_system.xml
│ │ └── activity_variable.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
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── grammar
│ └── ExampleUnitTest.java
├── hello
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── hello
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── hello
│ │ │ ├── EasyActivity.kt
│ │ │ ├── EasyJavaActivity.java
│ │ │ └── MainActivity.kt
│ └── res
│ │ ├── layout
│ │ ├── activity_easy.xml
│ │ └── activity_main.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
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── hello
│ └── ExampleUnitTest.java
├── kotlin.jks
├── network
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── network
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── network
│ │ │ ├── AsyncTaskActivity.kt
│ │ │ ├── AutoUpdateActivity.kt
│ │ │ ├── ContentObserverActivity.kt
│ │ │ ├── ContentProviderActivity.kt
│ │ │ ├── ContentResolverActivity.kt
│ │ │ ├── DownloadApkActivity.kt
│ │ │ ├── DownloadImageActivity.kt
│ │ │ ├── HttpImageActivity.kt
│ │ │ ├── HttpRequestActivity.kt
│ │ │ ├── JsonConvertActivity.kt
│ │ │ ├── JsonParseActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MessageActivity.kt
│ │ │ ├── ProgressCircleActivity.kt
│ │ │ ├── ProgressDialogActivity.kt
│ │ │ ├── SpannableActivity.kt
│ │ │ ├── adapter
│ │ │ ├── RecyclerExtras.kt
│ │ │ └── RecyclerGridAdapter.kt
│ │ │ ├── bean
│ │ │ ├── CallRecord.kt
│ │ │ ├── Contact.kt
│ │ │ ├── RecyclerInfo.kt
│ │ │ ├── SmsContent.kt
│ │ │ ├── UserData.kt
│ │ │ ├── UserInfo.kt
│ │ │ └── VersionCheck.kt
│ │ │ ├── database
│ │ │ └── UserDBHelper.kt
│ │ │ ├── provider
│ │ │ ├── UserInfoContent.kt
│ │ │ └── UserInfoProvider.kt
│ │ │ ├── util
│ │ │ ├── Alert.kt
│ │ │ ├── CommunicationUtil.kt
│ │ │ ├── DateUtil.kt
│ │ │ ├── PermissionUtil.kt
│ │ │ ├── Spannable.kt
│ │ │ ├── System.kt
│ │ │ └── ViewUtil.kt
│ │ │ └── widget
│ │ │ ├── SpacesItemDecoration.kt
│ │ │ └── TextProgressCircle.kt
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── arrow_down.png
│ │ ├── ic_back.png
│ │ ├── ic_search.png
│ │ ├── people.jpg
│ │ ├── pic_01.png
│ │ ├── pic_02.png
│ │ ├── pic_03.png
│ │ ├── pic_04.png
│ │ ├── pic_05.png
│ │ ├── pic_06.png
│ │ ├── pic_07.png
│ │ ├── pic_08.png
│ │ ├── pic_09.png
│ │ └── pic_10.png
│ │ ├── drawable-xhdpi
│ │ └── downloading.png
│ │ ├── drawable
│ │ ├── editext_selector.xml
│ │ ├── shape_edit_focus.xml
│ │ └── shape_edit_normal.xml
│ │ ├── layout
│ │ ├── activity_async_task.xml
│ │ ├── activity_auto_update.xml
│ │ ├── activity_content_observer.xml
│ │ ├── activity_content_provider.xml
│ │ ├── activity_content_resolver.xml
│ │ ├── activity_download_apk.xml
│ │ ├── activity_download_image.xml
│ │ ├── activity_http_image.xml
│ │ ├── activity_http_request.xml
│ │ ├── activity_json_convert.xml
│ │ ├── activity_json_parse.xml
│ │ ├── activity_main.xml
│ │ ├── activity_message.xml
│ │ ├── activity_progress_dialog.xml
│ │ ├── activity_spannable.xml
│ │ ├── activity_text_circle.xml
│ │ ├── item_dropdown.xml
│ │ ├── item_recycler_grid.xml
│ │ └── item_select.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
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── network_security_config.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── network
│ └── ExampleUnitTest.java
├── settings.gradle
├── simple
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── simple
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── simple
│ │ │ ├── ActFirstActivity.kt
│ │ │ ├── ActRequestActivity.kt
│ │ │ ├── ActResponseActivity.kt
│ │ │ ├── ActSecondActivity.kt
│ │ │ ├── AlertDialogActivity.kt
│ │ │ ├── ButtonClickActivity.kt
│ │ │ ├── CheckboxActivity.kt
│ │ │ ├── ConstraintLayoutActivity.kt
│ │ │ ├── EditTextActivity.kt
│ │ │ ├── ImageScaleActivity.kt
│ │ │ ├── LinearLayoutActivity.kt
│ │ │ ├── LoginForgetActivity.kt
│ │ │ ├── LoginPageActivity.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── ParcelableFirstActivity.kt
│ │ │ ├── ParcelableSecondActivity.kt
│ │ │ ├── RadioButtonActivity.kt
│ │ │ ├── RelativeLayoutActivity.kt
│ │ │ ├── TextMarqueeActivity.kt
│ │ │ ├── bean
│ │ │ └── MessageInfo.kt
│ │ │ └── util
│ │ │ ├── DateUtil.kt
│ │ │ └── ViewUtil.kt
│ └── res
│ │ ├── drawable-xhdpi
│ │ ├── apple1.png
│ │ └── apple2.png
│ │ ├── drawable
│ │ ├── editext_selector.xml
│ │ ├── shape_edit_focus.xml
│ │ └── shape_edit_normal.xml
│ │ ├── layout
│ │ ├── activity_act_first.xml
│ │ ├── activity_act_request.xml
│ │ ├── activity_act_response.xml
│ │ ├── activity_act_second.xml
│ │ ├── activity_alert_dialog.xml
│ │ ├── activity_button_click.xml
│ │ ├── activity_checkbox.xml
│ │ ├── activity_constraint_layout.xml
│ │ ├── activity_edit_text.xml
│ │ ├── activity_image_scale.xml
│ │ ├── activity_linear_layout.xml
│ │ ├── activity_login_forget.xml
│ │ ├── activity_login_page.xml
│ │ ├── activity_main.xml
│ │ ├── activity_parcelable_first.xml
│ │ ├── activity_parcelable_second.xml
│ │ ├── activity_radio_button.xml
│ │ ├── activity_relative_layout.xml
│ │ └── activity_text_marquee.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
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── simple
│ └── ExampleUnitTest.java
└── storage
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
├── androidTest
└── java
│ └── com
│ └── example
│ └── storage
│ └── ExampleInstrumentedTest.java
├── main
├── AndroidManifest.xml
├── java
│ └── com
│ │ └── example
│ │ └── storage
│ │ ├── AppReadActivity.kt
│ │ ├── AppWriteActivity.kt
│ │ ├── FilePathActivity.kt
│ │ ├── ImageReadActivity.kt
│ │ ├── ImageWriteActivity.kt
│ │ ├── LoginForgetActivity.kt
│ │ ├── LoginSQLiteActivity.kt
│ │ ├── LoginShareActivity.kt
│ │ ├── MainActivity.kt
│ │ ├── MainApplication.kt
│ │ ├── MenuOptionActivity.kt
│ │ ├── SQLiteReadActivity.kt
│ │ ├── SQLiteWriteActivity.kt
│ │ ├── ShareReadActivity.kt
│ │ ├── ShareWriteActivity.kt
│ │ ├── ShoppingCartActivity.kt
│ │ ├── ShoppingChannelActivity.kt
│ │ ├── ShoppingDetailActivity.kt
│ │ ├── TextReadActivity.kt
│ │ ├── TextWriteActivity.kt
│ │ ├── adapter
│ │ ├── RecyclerBaseAdapter.kt
│ │ ├── RecyclerCartAdapter.kt
│ │ ├── RecyclerExtras.kt
│ │ └── RecyclerGoodsAdapter.kt
│ │ ├── bean
│ │ ├── CartInfo.kt
│ │ ├── GoodsInfo.kt
│ │ └── UserInfo.kt
│ │ ├── database
│ │ ├── CartDBHelper.kt
│ │ ├── GoodsDBHelper.kt
│ │ └── UserDBHelper.kt
│ │ ├── util
│ │ ├── DateUtil.kt
│ │ ├── FileUtil.kt
│ │ ├── Preference.kt
│ │ ├── ReadWriteProperty.kt
│ │ ├── SharedUtil.kt
│ │ └── ViewUtil.kt
│ │ └── widget
│ │ └── SpacesItemDecoration.kt
└── res
│ ├── drawable-hdpi
│ ├── arrow_down.png
│ └── ic_back.png
│ ├── drawable-xhdpi
│ ├── cart.png
│ ├── huawei.jpg
│ ├── huawei_s.jpg
│ ├── iphone.jpg
│ ├── iphone_s.jpg
│ ├── meizu.jpg
│ ├── meizu_s.jpg
│ ├── menu.png
│ ├── oppo.jpg
│ ├── oppo_s.jpg
│ ├── vivo.jpg
│ ├── vivo_s.jpg
│ ├── xiaomi.jpg
│ └── xiaomi_s.jpg
│ ├── drawable
│ ├── editext_selector.xml
│ ├── shape_edit_focus.xml
│ ├── shape_edit_normal.xml
│ └── shape_oval_red.xml
│ ├── layout
│ ├── activity_app_read.xml
│ ├── activity_app_write.xml
│ ├── activity_file_path.xml
│ ├── activity_image_read.xml
│ ├── activity_image_write.xml
│ ├── activity_login_forget.xml
│ ├── activity_login_share.xml
│ ├── activity_login_sqlite.xml
│ ├── activity_main.xml
│ ├── activity_menu_option.xml
│ ├── activity_share_read.xml
│ ├── activity_share_write.xml
│ ├── activity_shopping_cart.xml
│ ├── activity_shopping_channel.xml
│ ├── activity_shopping_detail.xml
│ ├── activity_shopping_title.xml
│ ├── activity_sqlite_read.xml
│ ├── activity_sqlite_write.xml
│ ├── activity_text_read.xml
│ ├── activity_text_write.xml
│ ├── item_dropdown.xml
│ ├── item_recycler_cart.xml
│ ├── item_recycler_goods.xml
│ ├── item_select.xml
│ └── toolbar_custom.xml
│ ├── menu
│ ├── menu_cart.xml
│ ├── menu_goods.xml
│ └── menu_option.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-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
└── test
└── java
└── com
└── example
└── storage
└── ExampleUnitTest.java
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 《Kotlin从零到精通Android开发》附录源码
2 | 清华大学出版社出版 作者:欧阳燊
3 | 
4 | ————————————————————
--------------------------------------------------------------------------------
/complex/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/complex/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/complex/src/androidTest/java/com/example/complex/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.complex;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.complex", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/AppbarNestedActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 |
6 | import kotlinx.android.synthetic.main.activity_appbar_nested.*
7 |
8 | class AppbarNestedActivity : AppCompatActivity() {
9 |
10 | override fun onCreate(savedInstanceState: Bundle?) {
11 | super.onCreate(savedInstanceState)
12 | setContentView(R.layout.activity_appbar_nested)
13 | setSupportActionBar(tl_title)
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/AppbarRecyclerActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex
2 |
3 | import com.example.complex.adapter.RecyclerCollapseAdapter
4 |
5 | import android.os.Bundle
6 | import android.support.v7.app.AppCompatActivity
7 | import android.support.v7.widget.LinearLayoutManager
8 |
9 | import kotlinx.android.synthetic.main.activity_appbar_recycler.*
10 |
11 | class AppbarRecyclerActivity : AppCompatActivity() {
12 | private val yearArray = arrayOf("鼠年", "牛年", "虎年", "兔年", "龙年", "蛇年", "马年", "羊年", "猴年", "鸡年", "狗年", "猪年")
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_appbar_recycler)
17 | setSupportActionBar(tl_title)
18 | rv_main.layoutManager = LinearLayoutManager(this)
19 | rv_main.adapter = RecyclerCollapseAdapter(this, yearArray)
20 | }
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/FragmentDynamicActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex
2 |
3 | import com.example.complex.adapter.MobilePagerAdapter
4 | import com.example.complex.bean.GoodsInfo
5 |
6 | import android.os.Bundle
7 | import android.support.v4.app.FragmentActivity
8 | import android.util.TypedValue
9 |
10 | import kotlinx.android.synthetic.main.activity_fragment_dynamic.*
11 |
12 | /**
13 | * Created by ouyangshen on 2017/9/3.
14 | */
15 | class FragmentDynamicActivity : FragmentActivity() {
16 |
17 | override fun onCreate(savedInstanceState: Bundle?) {
18 | super.onCreate(savedInstanceState)
19 | setContentView(R.layout.activity_fragment_dynamic)
20 | pts_tab.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20f)
21 | //碎片适配器需要传入碎片管理器对象supportFragmentManager
22 | vp_content.adapter = MobilePagerAdapter(supportFragmentManager, GoodsInfo.defaultList)
23 | vp_content.currentItem = 0
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/adapter/BroadcastPagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.adapter
2 |
3 | import android.support.v4.app.Fragment
4 | import android.support.v4.app.FragmentManager
5 | import android.support.v4.app.FragmentStatePagerAdapter
6 |
7 | import com.example.complex.bean.GoodsInfo
8 | import com.example.complex.fragment.BroadcastFragment
9 |
10 | class BroadcastPagerAdapter(fm: FragmentManager, private val goodsList: MutableList) : FragmentStatePagerAdapter(fm) {
11 |
12 | override fun getCount(): Int = goodsList.size
13 |
14 | override fun getItem(position: Int): Fragment {
15 | return BroadcastFragment.newInstance(position,
16 | goodsList[position].pic, goodsList[position].desc)
17 | }
18 |
19 | override fun getPageTitle(position: Int): CharSequence = goodsList[position].name
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/adapter/ChannelPagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.adapter
2 |
3 | import android.support.v4.app.Fragment
4 | import android.support.v4.app.FragmentManager
5 | import android.support.v4.app.FragmentPagerAdapter
6 |
7 | import com.example.complex.fragment.AppliancesFragment
8 | import com.example.complex.fragment.ClothesFragment
9 |
10 | class ChannelPagerAdapter(fm: FragmentManager, private val titles: MutableList) : FragmentPagerAdapter(fm) {
11 |
12 | override fun getItem(position: Int): Fragment = when (position) {
13 | 0 -> ClothesFragment()
14 | 1 -> AppliancesFragment()
15 | else -> ClothesFragment()
16 | }
17 |
18 | override fun getCount(): Int = titles.size
19 |
20 | override fun getPageTitle(position: Int): CharSequence = titles[position]
21 |
22 | companion object {
23 | const val EVENT = "com.example.complex.adapter.ChannelPagerAdapter"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/adapter/GoodsPagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.adapter
2 |
3 | import com.example.complex.fragment.BookDetailFragment
4 | import com.example.complex.fragment.BookCoverFragment
5 |
6 | import android.support.v4.app.Fragment
7 | import android.support.v4.app.FragmentManager
8 | import android.support.v4.app.FragmentPagerAdapter
9 |
10 | class GoodsPagerAdapter(fm: FragmentManager, private val titles: MutableList) : FragmentPagerAdapter(fm) {
11 |
12 | //根据位置序号分别指定不同的Fragment碎片类
13 | override fun getItem(position: Int): Fragment = when (position) {
14 | 0 -> BookCoverFragment()
15 | 1 -> BookDetailFragment()
16 | else -> BookCoverFragment()
17 | }
18 |
19 | override fun getCount(): Int = titles.size
20 |
21 | override fun getPageTitle(position: Int): CharSequence = titles[position]
22 | }
23 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/adapter/MobilePagerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.adapter
2 |
3 | import com.example.complex.bean.GoodsInfo
4 | import com.example.complex.fragment.DynamicFragment
5 |
6 | import android.support.v4.app.Fragment
7 | import android.support.v4.app.FragmentManager
8 | import android.support.v4.app.FragmentStatePagerAdapter
9 |
10 | class MobilePagerAdapter(fm: FragmentManager, private val goodsList: MutableList) : FragmentStatePagerAdapter(fm) {
11 |
12 | //获取页面的数量
13 | override fun getCount(): Int = goodsList.size
14 |
15 | //获取每个页面的碎片对象
16 | override fun getItem(position: Int): Fragment {
17 | val item = goodsList[position]
18 | return DynamicFragment.newInstance(position, item.pic, item.desc, item.price)
19 | }
20 |
21 | //获取页面的标题
22 | override fun getPageTitle(position: Int): CharSequence = goodsList[position].name
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/adapter/RecyclerExtras.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.adapter
2 |
3 | import android.view.View
4 |
5 | class RecyclerExtras {
6 |
7 | interface OnItemClickListener {
8 | fun onItemClick(view: View, position: Int)
9 | }
10 |
11 | interface OnItemLongClickListener {
12 | fun onItemLongClick(view: View, position: Int)
13 | }
14 |
15 | interface OnItemDeleteClickListener {
16 | fun onItemDeleteClick(view: View, position: Int)
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/bean/LifeItem.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.bean
2 |
3 | import com.example.complex.R
4 |
5 | data class LifeItem(var pic_id: Int, var title: String) {
6 | companion object {
7 | val default: MutableList
8 | get() {
9 | val itemArray = mutableListOf()
10 | for (i in 0..39) {
11 | itemArray.add(LifeItem(R.drawable.icon_transfer, "转账"))
12 | }
13 | return itemArray
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/fragment/BookCoverFragment.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.fragment
2 |
3 | import android.os.Bundle
4 | import android.support.v4.app.Fragment
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 |
9 | import com.example.complex.R
10 |
11 | class BookCoverFragment : Fragment() {
12 |
13 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
14 | return inflater.inflate(R.layout.fragment_book_cover, container, false)
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/fragment/BookDetailFragment.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.fragment
2 |
3 | import android.os.Bundle
4 | import android.support.v4.app.Fragment
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 |
9 | import com.example.complex.R
10 |
11 | class BookDetailFragment : Fragment() {
12 |
13 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
14 | return inflater.inflate(R.layout.fragment_book_detail, container, false)
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/complex/src/main/java/com/example/complex/widget/SpacesItemDecoration.kt:
--------------------------------------------------------------------------------
1 | package com.example.complex.widget
2 |
3 | import android.graphics.Rect
4 | import android.support.v7.widget.RecyclerView
5 | import android.view.View
6 |
7 | class SpacesItemDecoration(private val space: Int) : RecyclerView.ItemDecoration() {
8 |
9 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
10 | outRect.left = space
11 | outRect.right = space
12 | outRect.bottom = space
13 | outRect.top = space
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/arrow_down.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/big_chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/big_chat.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/big_pay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/big_pay.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/big_qrcode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/big_qrcode.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/big_scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/big_scan.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/diqiu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/diqiu.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/divider_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/divider_red.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/divider_red2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/divider_red2.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/float_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/float_btn.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/huoxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/huoxing.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/ic_back.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/icon_contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/icon_contact.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/icon_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/icon_plus.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/icon_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/icon_search.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/icon_transfer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/icon_transfer.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/jinxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/jinxing.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/muxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/muxing.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/null_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/null_point.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_01.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_02.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_03.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_04.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_05.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_06.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_07.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_08.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_09.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_10.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_11.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_12.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_13.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_14.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_15.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/pic_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/pic_16.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/public_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/public_01.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/public_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/public_02.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/public_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/public_03.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/public_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/public_04.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/public_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/public_05.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/red_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/red_point.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/shuixing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/shuixing.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/small_charge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/small_charge.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/small_money.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/small_money.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/small_pay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/small_pay.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/small_scan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/small_scan.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/top_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/top_pic.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-hdpi/tuxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-hdpi/tuxing.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/book_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/book_cover.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/book_detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/book_detail.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian01.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian02.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian03.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian04.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian05.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian06.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian07.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian08.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian09.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian10.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian11.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian12.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian13.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian14.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/dian15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/dian15.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/guide_bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/guide_bg1.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/guide_bg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/guide_bg2.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/guide_bg3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/guide_bg3.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/guide_bg4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/guide_bg4.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/huawei.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/huawei.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/huawei_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/huawei_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/iphone.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/iphone.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/iphone_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/iphone_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/meizu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/meizu.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/meizu_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/meizu_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/oppo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/oppo.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/oppo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/oppo_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt01.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt02.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt03.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt04.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt05.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt06.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt07.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt08.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt09.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt10.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt11.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt12.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt13.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt14.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt15.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt16.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt17.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt18.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt19.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt20.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt21.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt22.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/skirt23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/skirt23.png
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/vivo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/vivo.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/vivo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/vivo_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/xiaomi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/xiaomi.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable-xhdpi/xiaomi_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/drawable-xhdpi/xiaomi_s.jpg
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/editext_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/shape_edit_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/shape_edit_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/shape_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/toolbar_image_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/complex/src/main/res/drawable/toolbar_text_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_broadcast_system.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_broadcast_temp.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_fragment_dynamic.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_recycler_grid.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_recycler_linear.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_recycler_staggered.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_swipe_recycler.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_toolbar.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
17 |
18 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/activity_view_pager.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/fragment_appliances.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/fragment_book_cover.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
23 |
24 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/fragment_book_detail.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
23 |
24 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/fragment_clothes.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/fragment_dynamic.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
11 |
12 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_collapse.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
16 |
17 |
25 |
26 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_dropdown.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_grid_view.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
20 |
21 |
28 |
29 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_life.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_recycler_grid.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
21 |
22 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_recycler_staggered.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
21 |
22 |
--------------------------------------------------------------------------------
/complex/src/main/res/layout/item_select.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/complex/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/complex/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/complex/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #00000000
8 | #000000
9 | #ffffff
10 | #cccccc
11 | #ff0000
12 | #0099ff
13 | #00ff99
14 | #F9CC12
15 | #aaaaff
16 | #1983d1
17 | #001983d1
18 | #1673b8
19 | #ffdddd
20 | #6666ff
21 |
22 |
--------------------------------------------------------------------------------
/complex/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 50dp
4 |
5 |
--------------------------------------------------------------------------------
/complex/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | complex
3 |
4 | 欢乐中国年
5 | Android Studio开发实战\n从零基础到App上线
6 |
7 |
--------------------------------------------------------------------------------
/complex/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
13 |
14 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/complex/src/test/java/com/example/complex/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.complex;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/custom/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/custom/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/custom/src/androidTest/java/com/example/custom/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.custom;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.custom", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/DrawRoundActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 |
6 | /**
7 | * Created by ouyangshen on 2017/9/17.
8 | */
9 | class DrawRoundActivity : AppCompatActivity() {
10 |
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 | setContentView(R.layout.activity_draw_round)
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom
2 |
3 | import android.app.Application
4 | import android.os.Build
5 | import com.example.custom.util.NotifyUtil
6 |
7 | /**
8 | * Created by ouyangshen on 2017/9/17.
9 | */
10 | class MainApplication : Application() {
11 | var groupMap = mutableMapOf()
12 |
13 | override fun onCreate() {
14 | super.onCreate()
15 | instance = this
16 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
17 | // Android 8.0开始必须给每个通知分配对应的渠道
18 | NotifyUtil.createNotifyChannel(this, getString(R.string.app_name))
19 | }
20 | }
21 |
22 | companion object {
23 | private var instance: MainApplication? = null
24 | fun instance() = instance!!
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/ProgressBarActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 |
6 | import kotlinx.android.synthetic.main.activity_notify_progress.*
7 |
8 | /**
9 | * Created by ouyangshen on 2017/9/17.
10 | */
11 | class ProgressBarActivity : AppCompatActivity() {
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_progress_bar)
16 | //设置最大进度
17 | pb_progress.max = 100
18 | //设置默认进度
19 | pb_progress.progress = 0
20 | //设置进度条图形
21 | pb_progress.progressDrawable = resources.getDrawable(R.drawable.progress_green)
22 | btn_progress.setOnClickListener {
23 | //根据输入的进度数值,展示进度条的当前进度
24 | pb_progress.progress = et_progress.text.toString().toInt()
25 | }
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/bean/FreshInfo.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom.bean
2 |
3 | import android.annotation.SuppressLint
4 | import android.os.Parcelable
5 | import kotlinx.android.parcel.Parcelize
6 |
7 | @SuppressLint("ParcelCreator")
8 | @Parcelize
9 | data class FreshInfo(var name: String="", var desc: String="", var imageId: Int=0,
10 | var price: Int=0, var peopleCount: Int=0, var isJoin: Boolean=false) : Parcelable {
11 | }
12 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/service/NormalService.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom.service
2 |
3 | import com.example.custom.ServiceNormalActivity
4 |
5 | import android.app.Service
6 | import android.content.Intent
7 | import android.os.IBinder
8 |
9 | /**
10 | * Created by ouyangshen on 2017/10/14.
11 | */
12 | class NormalService : Service() {
13 |
14 | override fun onCreate() {
15 | ServiceNormalActivity.showText("创建服务")
16 | super.onCreate()
17 | }
18 |
19 | override fun onStartCommand(intent: Intent, flags: Int, startid: Int): Int {
20 | val bundle = intent.extras
21 | val request_content = bundle.getString("request_content")
22 | ServiceNormalActivity.showText("启动服务,收到请求内容:${request_content}")
23 | return Service.START_STICKY
24 | }
25 |
26 | override fun onDestroy() {
27 | ServiceNormalActivity.showText("停止服务")
28 | super.onDestroy()
29 | }
30 |
31 | override fun onBind(intent: Intent): IBinder? = null
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/util/System.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom.util
2 |
3 | import android.app.NotificationManager
4 | import android.content.Context
5 | import android.os.Vibrator
6 |
7 | /**
8 | * Created by ouyangshen on 2017/10/8.
9 | */
10 | //获取震动器
11 | //fun Context.getVibrator() : Vibrator {
12 | // return getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
13 | //}
14 | //获取震动器
15 | //利用扩展函数实现扩展属性,在Activity代码中即可直接使用vibrator
16 | val Context.vibrator : Vibrator
17 | get() = getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
18 | //获取通知管理器
19 | //试试在Activity代码中调用“notifier.notify(R.string.app_name, notify)”
20 | val Context.notifier: NotificationManager
21 | get() = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/widget/NoScrollListView.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom.widget
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.widget.ListView
6 |
7 | //自定义视图务必要在类名后面增加“@JvmOverloads constructor”,因为布局文件中的自定义视图必须兼容Java
8 | class NoScrollListView @JvmOverloads constructor(context: Context, attrs: AttributeSet?=null, defStyle: Int=0) : ListView(context, attrs, defStyle) {
9 | //将高度设为最大值,即所有项加起来的总高度
10 | public override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
11 | //注意位运算符的写法,按位右移在Kotlin中使用运算符shr来表达
12 | val expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE shr 2, MeasureSpec.AT_MOST)
13 | super.onMeasure(widthMeasureSpec, expandSpec)
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/custom/src/main/java/com/example/custom/widget/RoundLayout.kt:
--------------------------------------------------------------------------------
1 | package com.example.custom.widget
2 |
3 | import android.content.Context
4 | import android.graphics.Canvas
5 | import android.graphics.Color
6 | import android.graphics.Paint
7 | import android.graphics.RectF
8 | import android.graphics.Paint.Style
9 | import android.util.AttributeSet
10 | import android.widget.LinearLayout
11 |
12 | //自定义视图务必要在类名后面增加“@JvmOverloads constructor”,因为布局文件中的自定义视图必须兼容Java
13 | class RoundLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet?=null, defStyle: Int=0) : LinearLayout(context, attrs, defStyle) {
14 |
15 | override fun dispatchDraw(canvas: Canvas) {
16 | super.dispatchDraw(canvas)
17 | val paint = Paint()
18 | paint.color = Color.BLUE
19 | paint.strokeWidth = 2f
20 | paint.style = Style.STROKE
21 | paint.isAntiAlias = true
22 | val rectF = RectF(1f, 1f, (this.width - 1).toFloat(), (this.height - 1).toFloat())
23 | canvas.drawRoundRect(rectF, 10f, 10f, paint)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/arrow_down.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/diqiu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/diqiu.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/huoxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/huoxing.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/ic_app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/ic_app.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/ic_back.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/icon_cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/icon_cancel.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/icon_confirm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/icon_confirm.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/icon_financer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/icon_financer.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/icon_sunshine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/icon_sunshine.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/jinxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/jinxing.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/muxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/muxing.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/notify_green.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/notify_green.9.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/shuixing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/shuixing.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/tt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/tt.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/tt_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/tt_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-hdpi/tuxing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-hdpi/tuxing.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/dalongxia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/dalongxia.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/dazhaxie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/dazhaxie.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/diwangxie.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/diwangxie.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/guihuayu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/guihuayu.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/hongxun.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/hongxun.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/huawei.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/huawei.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/huawei_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/huawei_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/iphone.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/iphone.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/iphone_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/iphone_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/meizu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/meizu.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/meizu_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/meizu_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/oppo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/oppo.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/oppo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/oppo_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/pipixia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/pipixia.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/sanwenyu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/sanwenyu.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/vivo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/vivo.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/vivo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/vivo_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/wuchangyu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/wuchangyu.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/xiaolongxia.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/xiaolongxia.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/xiaomi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/xiaomi.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable-xhdpi/xiaomi_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/drawable-xhdpi/xiaomi_s.jpg
--------------------------------------------------------------------------------
/custom/src/main/res/drawable/editext_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/custom/src/main/res/drawable/progress_green.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 |
6 |
7 | -
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/custom/src/main/res/drawable/shape_edit_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/custom/src/main/res/drawable/shape_edit_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/custom/src/main/res/drawable/text_color_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/activity_custom_property.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/activity_notify_service.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
25 |
26 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/activity_progress_animation.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/activity_runnable.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/item_dropdown.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/custom/src/main/res/layout/item_select.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/custom/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/custom/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/custom/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/custom/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #000000
8 | #ffffff
9 | #dddddd
10 | #ff0000
11 | #ffffdd
12 | #00000000
13 | #0099ff
14 | #00ff99
15 | #aaaaff
16 |
17 |
--------------------------------------------------------------------------------
/custom/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | custom
3 |
4 | com.example.custom.service.pause
5 |
6 |
--------------------------------------------------------------------------------
/custom/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/custom/src/test/java/com/example/custom/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.custom;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Dec 20 17:12:38 CST 2017
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 |
--------------------------------------------------------------------------------
/grammar/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/grammar/src/androidTest/java/com/example/grammar/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.grammar;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.grammar", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/Animal.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | import android.util.Log
4 |
5 | /**
6 | * Created by ouyangshen on 2017/8/8.
7 | */
8 | class Animal {
9 | //类的初始化函数
10 | init {
11 | //Kotlin使用println替换Java的System.out.println
12 | println("Animal:这是个动物的类")
13 | //调用Android的日志类Log
14 | Log.d("Animal", "这是个动物的类")
15 | }
16 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/AnimalDefault.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | import android.content.Context
4 | import org.jetbrains.anko.toast
5 |
6 | /**
7 | * Created by ouyangshen on 2017/8/8.
8 | */
9 | //类的主构造函数使用了默认参数
10 | //class AnimalDefault (context: Context, name:String, sex:Int = 0) {
11 | //加上@JvmOverloads的目的,是让Java代码也能识别默认参数
12 | //因为添加了注解标记,所以必须显示关键字constructor
13 | class AnimalDefault @JvmOverloads constructor(context: Context, name:String, sex:Int = 0) {
14 | init {
15 | var sexName:String = if(sex==0) "公" else "母"
16 | context.toast("这只${name}是${sexName}的")
17 | }
18 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/AnimalMain.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | import android.content.Context
4 | import org.jetbrains.anko.toast
5 |
6 | /**
7 | * Created by ouyangshen on 2017/8/8.
8 | */
9 | //如果主构造函数没有带@符号的注解说明,则类名后面的constructor可以省略
10 | //class AnimalMain (context:Context, name:String) {
11 | class AnimalMain constructor(context:Context, name:String) {
12 | init {
13 | context.toast("这是只$name")
14 | }
15 |
16 | constructor(context:Context, name:String, sex:Int) : this(context, name) {
17 | var sexName:String = if(sex==0) "公" else "母"
18 | context.toast("这只${name}是${sexName}的")
19 | }
20 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/AnimalSeparate.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | import android.content.Context
4 | import org.jetbrains.anko.toast
5 |
6 | /**
7 | * Created by ouyangshen on 2017/8/8.
8 | */
9 | class AnimalSeparate {
10 | constructor(context:Context, name:String) {
11 | context.toast("这是只$name")
12 | }
13 |
14 | constructor(context: Context, name:String, sex:Int) {
15 | var sexName:String = if(sex==0) "公" else "母"
16 | context.toast("这只${name}是${sexName}的")
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/WildAnimal.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/8.
5 | */
6 | class WildAnimal (var name:String, val sex:Int = 0) {
7 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/WildAnimalCompanion.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/8.
5 | */
6 | class WildAnimalCompanion (var name:String, val sex:Int = 0) {
7 | var sexName:String
8 | init {
9 | sexName = if(sex==0) "公" else "母"
10 | }
11 |
12 | fun getDesc(tag:String):String {
13 | return "欢迎来到$tag:这只${name}是${sexName}的。"
14 | }
15 |
16 | //在类加载时就运行伴生对象的代码块,其作用相当于Java里面的static { ... }代码块
17 | //关键字companion表示伴随,object表示对象,WildAnimal表示伴生对象的名称
18 | companion object WildAnimal{
19 | fun judgeSex(sexName:String):Int {
20 | var sex:Int = when (sexName) {
21 | "公","雄" -> 0
22 | "母","雌" -> 1
23 | else -> -1
24 | }
25 | return sex
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/WildAnimalConstant.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/8.
5 | */
6 | class WildAnimalConstant(var name:String, val sex:Int = MALE) {
7 | var sexName:String
8 | init {
9 | sexName = if(sex==MALE) "公" else "母"
10 | }
11 |
12 | fun getDesc(tag:String):String {
13 | return "欢迎来到$tag:这只${name}是${sexName}的。"
14 | }
15 |
16 | companion object WildAnimal{
17 | //静态常量的值是不可变的,所以要使用关键字val修饰
18 | val MALE = 0
19 | val FEMALE = 1
20 | val UNKNOWN = -1
21 | fun judgeSex(sexName:String):Int {
22 | var sex:Int = when (sexName) {
23 | "公","雄" -> MALE
24 | "母","雌" -> FEMALE
25 | else -> UNKNOWN
26 | }
27 | return sex
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/WildAnimalFunction.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/8.
5 | */
6 | class WildAnimalFunction (var name:String, val sex:Int = 0) {
7 | var sexName:String
8 | init {
9 | sexName = if(sex==0) "公" else "母"
10 | }
11 |
12 | fun getDesc(tag:String):String {
13 | return "欢迎来到$tag:这只${name}是${sexName}的。"
14 | }
15 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/animal/WildAnimalMember.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.animal
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/8.
5 | */
6 | class WildAnimalMember (var name:String, val sex:Int = 0) {
7 | //非空的成员属性必须在声明时赋值或者在构造函数中赋值
8 | //否则编译器会报错“Property must be initialized or be abstract”
9 | var sexName:String
10 | init {
11 | sexName = if(sex==0) "公" else "母"
12 | }
13 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Behavior.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/9.
5 | */
6 | //Kotlin与Java一样不允许多重继承,即不能同时继承两个类(及以上类),
7 | //否则编译器报错“Only one class may appear in a supertype list”,
8 | //所以仍然需要接口interface来间接实现多重继承的功能。
9 | //接口不能带构造函数(那样就变成一个类了),否则编译器报错“An interface may not have a constructor”
10 | //interface Behavior(val action:String) {
11 | interface Behavior {
12 | //接口内部的方法默认就是抽象的,所以不加abstract也可以,当然open也可以不加
13 | open abstract fun fly():String
14 | //比如下面这个swim方法就没加关键字abstract,也无需在此处实现方法
15 | fun swim():String
16 | //Kotlin的接口与Java的区别在于,Kotlin接口内部允许实现方法,
17 | //此时该方法不是抽象方法,就不能加上abstract,
18 | //不过该方法依然是open类型,接口内部的所有方法都默认是open类型
19 | fun run():String {
20 | return "大多数鸟儿跑得并不像样,只有鸵鸟、鸸鹋等少数鸟类才擅长奔跑。"
21 | }
22 | //Kotlin的接口允许声明抽象属性,实现该接口的类必须重载该属性,
23 | //与接口内部方法一样,抽象属性前面的open和abstract也可省略掉
24 | //open abstract var skilledSports:String
25 | var skilledSports:String
26 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/BehaviorFly.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/24.
5 | */
6 | class BehaviorFly : Behavior {
7 | override fun fly():String {
8 | return "翱翔天空"
9 | }
10 |
11 | override fun swim():String {
12 | return "落水凤凰不如鸡"
13 | }
14 |
15 | override fun run():String {
16 | return "能飞干嘛还要走"
17 | }
18 |
19 | override var skilledSports:String = "飞翔"
20 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/BehaviorRun.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/24.
5 | */
6 | class BehaviorRun : Behavior {
7 | override fun fly():String {
8 | return "飞不起来"
9 | }
10 |
11 | override fun swim():String {
12 | return "望洋兴叹"
13 | }
14 |
15 | override fun run():String {
16 | return super.run()
17 | }
18 |
19 | override var skilledSports:String = "奔跑"
20 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/BehaviorSwim.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/24.
5 | */
6 | class BehaviorSwim : Behavior {
7 | override fun fly():String {
8 | return "看情况,大雁能展翅高飞,企鹅却欲飞还休"
9 | }
10 |
11 | override fun swim():String {
12 | return "怡然戏水"
13 | }
14 |
15 | override fun run():String {
16 | return "赶鸭子上树"
17 | }
18 |
19 | override var skilledSports:String = "游泳"
20 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Chick.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/24.
5 | */
6 | class Chick (name:String, sex:Int) : Bird(name, sex), Behavior {
7 | override fun fly():String {
8 | return ""
9 | }
10 |
11 | override fun swim():String {
12 | return ""
13 | }
14 |
15 | override fun run():String {
16 | return super.run()
17 | }
18 |
19 | override var skilledSports:String = "游泳"
20 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Chicken.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/9.
5 | */
6 | //子类的构造函数,原来的输入参数不用加var和val,新增的输入参数必须加var或者val。
7 | //因为抽象类不能直接使用,所以构造函数不必给默认参数赋值。
8 | abstract class Chicken(name:String, sex:Int, var voice:String) : Bird(name, sex) {
9 | val numberArray:Array = arrayOf("一","二","三","四","五","六","七","八","九","十");
10 | //抽象方法必须在子类进行重写,所以可以省略关键字open,因为abstract方法默认就是open类型
11 | //open abstract fun callOut(times:Int):String
12 | abstract fun callOut(times:Int):String
13 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Cock.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | import kotlin.text.Typography.less
4 |
5 | /**
6 | * Created by ouyangshen on 2017/8/9.
7 | */
8 | class Cock(name:String="鸡", sex:Int = Bird.MALE, voice:String="喔喔喔") : Chicken(name, sex, voice) {
9 | override fun callOut(times: Int): String {
10 | var count = when {
11 | //when语句判断大于和小于时,要把完整的判断条件写到每个分支中
12 | times<=0 -> 0
13 | times>=10 -> 9
14 | else -> times
15 | }
16 | return "$sexName$name${voice}叫了${numberArray[count]}声,原来它在报晓呀。"
17 | }
18 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Duck.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/9.
5 | */
6 | //注意父类Bird已经在构造函数声明了属性,故而子类Duck无需重复声明属性
7 | //也就是说,子类的构造函数,在输入参数前面不要再加val和var
8 | class Duck(name:String="鸭子", sex:Int = Bird.MALE) : Bird(name, sex) {
9 | }
10 |
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Goose.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/9.
5 | */
6 | class Goose(name:String="鹅", sex:Int = Bird.MALE) : Bird(name, sex), Behavior {
7 | override fun fly():String {
8 | return "鹅能飞一点点,但飞不高,也飞不远。"
9 | }
10 |
11 | override fun swim():String {
12 | return "鹅,鹅,鹅,曲项向天歌。白毛浮绿水,红掌拨清波。"
13 | }
14 |
15 | //因为接口已经实现了run方法,所以此处可以不用实现该方法,当然你要实现它也行。
16 | override fun run():String {
17 | //super用来调用父类的属性或方法,由于Kotlin的接口允许实现方法,因此super所指的对象也可以是interface
18 | return super.run()
19 | }
20 |
21 | //重载了来自接口的抽象属性
22 | override var skilledSports:String = "游泳"
23 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Hen.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | import com.example.grammar.animal.WildAnimal
4 |
5 | /**
6 | * Created by ouyangshen on 2017/8/9.
7 | */
8 | class Hen(name:String="鸡", sex:Int = Bird.FEMALE, voice:String="咯咯咯") : Chicken(name, sex, voice) {
9 | override fun callOut(times: Int): String {
10 | var count = when {
11 | times<=0 -> 0
12 | times>=10 -> 9
13 | else -> times
14 | }
15 | return "$sexName$name${voice}叫了${numberArray[count]}声,原来它下蛋了呀。"
16 | }
17 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/Ostrich.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/9.
5 | */
6 | class Ostrich(name:String="鸵鸟", sex:Int = Bird.MALE) : Bird(name, sex) {
7 | //继承protected的方法,标准写法是“override protected”
8 | //override protected fun getSexName(sex:Int):String {
9 | //不过protected的方法继承过来默认就是protected,所以也可直接省略protected
10 | //override fun getSexName(sex:Int):String {
11 | //protected的方法继承之后允许将可见性升级为public,但不能降级为private
12 | override public fun getSexName(sex:Int):String {
13 | return if(sex==MALE) "雄" else "雌"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/bird/WildFowl.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.bird
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/24.
5 | */
6 | //只有接口才能够使用关键字by进行代理操作,
7 | //如果by的对象是个类,则编译器会报错“Only interfaces can be delegated to”
8 | class WildFowl(name:String, sex:Int=MALE, behavior:Behavior) : Bird(name, sex), Behavior by behavior {
9 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/Plant.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.forest
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/18.
5 | */
6 | //数据类必须有主构造函数,且至少有一个输入参数,
7 | //并且要声明与输入参数同名的属性,即输入参数前面添加关键字val或者var,
8 | //数据类不能是基类也不能是子类,不能是抽象类,也不能是内部类,更不能是密封类。
9 | data class Plant(var name:String, var stem:String, var leaf:String, var flower:String, var fruit:String, var seed:String) {
10 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/River.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.forest
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/20.
5 | */
6 | //在类名后面添加“”,表示这是一个模板类
7 | class River (var name:String, var length:T) {
8 | fun getInfo():String {
9 | var unit:String = when (length) {
10 | is String -> "米"
11 | //Int、Long、Float、Double都是数字类型Number
12 | is Number -> "m"
13 | else -> ""
14 | }
15 | return "${name}的长度是$length$unit。"
16 | }
17 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/SeasonName.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.forest
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/18.
5 | */
6 | enum class SeasonName (val seasonName:String) {
7 | SPRING("春天"),
8 | SUMMER("夏天"),
9 | AUTUMN("秋天"),
10 | WINTER("冬天")
11 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/SeasonSealed.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/java/com/example/grammar/forest/SeasonSealed.kt
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/SeasonType.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.forest
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/18.
5 | */
6 | enum class SeasonType {
7 | SPRING, SUMMER, AUTUMN, WINTER
8 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/forest/Tree.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.forest
2 |
3 | /**
4 | * Created by ouyangshen on 2017/8/18.
5 | */
6 | class Tree(var treeName:String) {
7 |
8 | //在类内部再定义一个类,这个新类称作嵌套类
9 | class Flower (var flowerName:String) {
10 | fun getName():String {
11 | return "这是一朵$flowerName"
12 | //普通的嵌套类不能访问外部类的成员如treeName
13 | //否则编译器报错“Unresolved reference: ***”
14 | //return "这是${treeName}上的一朵$flowerName"
15 | }
16 | }
17 |
18 | //嵌套类加上了inner前缀,就成为了内部类
19 | inner class Fruit (var fruitName:String) {
20 | fun getName():String {
21 | //只有声明为内部类(添加了关键字inner),才能访问外部类的成员
22 | return "这是${treeName}长出来的$fruitName"
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/special/LogUtil.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.special
2 |
3 | /**
4 | * Created by ouyangshen on 2017/7/31.
5 | */
6 | class LogUtil {
7 |
8 | fun getString(tag:String, vararg otherInfo: T?):String {
9 | var str:String = "$tag:"
10 | for (item in otherInfo) {
11 | str = "$str${item.toString()},"
12 | }
13 | return str
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/grammar/src/main/java/com/example/grammar/util/ExtendArray.kt:
--------------------------------------------------------------------------------
1 | package com.example.grammar.util
2 |
3 | /**
4 | * Created by ouyangshen on 2017/9/22.
5 | */
6 |
7 | //fun Array.swap(pos1: Int, pos2: Int) {
8 | // val tmp = this[pos1] //this表示数组自身
9 | // this[pos1] = this[pos2]
10 | // this[pos2] = tmp
11 | //}
12 |
13 | //扩展函数结合泛型函数,能够更好地扩展函数功能
14 | fun Array.swap(pos1: Int, pos2: Int) {
15 | val tmp = this[pos1] //this表示数组对象自身
16 | this[pos1] = this[pos2]
17 | this[pos2] = tmp
18 | }
19 |
20 | //给高阶函数进行扩展,形成数组的扩展函数
21 | fun Array.maxCustomize(greater: (T, T) -> Boolean): T? {
22 | var max: T? = null
23 | for (item in this)
24 | if (max == null || greater(item, max))
25 | max = item
26 | return max
27 | }
28 |
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/grammar/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/grammar/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/grammar/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/grammar/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | grammar
3 |
4 |
--------------------------------------------------------------------------------
/grammar/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/grammar/src/test/java/com/example/grammar/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.grammar;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/hello/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/hello/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\adt-bundle-windows-x86_64-20140702\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/hello/src/androidTest/java/com/example/hello/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.hello;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.hello", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/hello/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/hello/src/main/java/com/example/hello/EasyActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.hello
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 | import android.view.View
6 | import android.widget.TextView
7 |
8 | import kotlinx.android.synthetic.main.activity_easy.*
9 | import org.jetbrains.anko.longToast
10 | import org.jetbrains.anko.toast
11 |
12 | class EasyActivity : AppCompatActivity() {
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_easy)
17 |
18 | //tv_hello.setText("你好呀")
19 | tv_hello.text = "你好呀"
20 |
21 | btn_click.setOnClickListener { btn_click.text="您点了一下下" }
22 | btn_click_long.setOnLongClickListener { btn_click_long.text="您长按了一小会"; true }
23 |
24 | btn_toast.setOnClickListener { toast("小提示:您点了一下下") }
25 | btn_toast_long.setOnLongClickListener { longToast("长提示:您长按了一小会"); true }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/hello/src/main/java/com/example/hello/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.hello
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | class MainActivity : AppCompatActivity() {
7 |
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_main)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/hello/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/hello/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/hello/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/hello/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/hello/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | hello
3 |
4 |
--------------------------------------------------------------------------------
/hello/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/hello/src/test/java/com/example/hello/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.hello;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/kotlin.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/kotlin.jks
--------------------------------------------------------------------------------
/network/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/network/src/androidTest/java/com/example/network/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.network;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.network", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/adapter/RecyclerExtras.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.adapter
2 |
3 | import android.view.View
4 |
5 | class RecyclerExtras {
6 |
7 | interface OnItemClickListener {
8 | fun onItemClick(view: View, position: Int)
9 | }
10 |
11 | interface OnItemLongClickListener {
12 | fun onItemLongClick(view: View, position: Int)
13 | }
14 |
15 | interface OnItemDeleteClickListener {
16 | fun onItemDeleteClick(view: View, position: Int)
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/CallRecord.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | data class CallRecord(var name: String="", var phone: String="", var type: Int=0,
4 | var date: String="", var duration: Long=0L, var _new: Int=0)
5 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/Contact.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | data class Contact(var contactId: String="", var name: String="", var phone: String="", var email: String="")
4 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/SmsContent.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | data class SmsContent(var address: String="", var person: String="",
4 | var body: String="", var date: String="", var type: Int=0)
5 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/UserData.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | data class UserData(var rowid: Long=0L, var xuhao: Int=0, var name: String="", var age: Int=0,
4 | var height: Long=0L, var weight: Float=0F, var married: Boolean=false,
5 | var update_time: String="", var phone: String="", var password: String="")
6 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/UserInfo.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | /**
4 | * Created by ouyangshen on 2017/10/17.
5 | */
6 | data class UserInfo(var name: String="", var age: Int=0, var height: Long=0L, var weight: Float=0F, var married: Boolean=false)
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/bean/VersionCheck.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.bean
2 |
3 | data class VersionCheck(var app_name: String="", var package_name: String="",
4 | var version_code: Int=0, var version_name: String="",
5 | var need_update: Boolean=false, var download_url: String="",
6 | var local_path: String="")
7 |
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/util/Alert.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.util
2 |
3 | import android.content.Context
4 | import org.jetbrains.anko.AlertDialogBuilder
5 |
6 | /**
7 | * Created by ouyangshen on 2017/10/6.
8 | */
9 | //Anko自带的alert只支持String类型的文本,不支持富文本的CharSequence类型,
10 | //故此处重写alert方法,使之支持可变字符串SpannableString
11 | fun Context.alert(
12 | message: CharSequence,
13 | title: String? = null,
14 | init: (AlertDialogBuilder.() -> Unit)? = null
15 | ) = AlertDialogBuilder(this).apply {
16 | if (title != null) title(title)
17 | message(message)
18 | if (init != null) init()
19 | }
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/util/Spannable.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.util
2 |
3 | import android.graphics.Color
4 | import android.text.SpannableString
5 | import android.text.Spanned
6 | import android.text.style.CharacterStyle
7 |
8 | /**
9 | * Created by ouyangshen on 2017/10/7.
10 | */
11 | //字符串中的关键语句用指定样式高亮显示
12 | fun String.highlight(key: String, style: CharacterStyle): SpannableString {
13 | val spanText = SpannableString(this)
14 | val beginPos = this.indexOf(key)
15 | val endPos = beginPos + key.length
16 | spanText.setSpan(style, beginPos, endPos, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
17 | return spanText
18 | }
--------------------------------------------------------------------------------
/network/src/main/java/com/example/network/widget/SpacesItemDecoration.kt:
--------------------------------------------------------------------------------
1 | package com.example.network.widget
2 |
3 | import android.graphics.Rect
4 | import android.support.v7.widget.RecyclerView
5 | import android.view.View
6 |
7 | class SpacesItemDecoration(private val space: Int) : RecyclerView.ItemDecoration() {
8 |
9 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
10 | outRect.left = space
11 | outRect.right = space
12 | outRect.bottom = space
13 | outRect.top = space
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/arrow_down.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/ic_back.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/ic_search.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/people.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/people.jpg
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_01.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_02.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_03.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_04.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_05.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_06.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_07.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_08.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_09.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-hdpi/pic_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-hdpi/pic_10.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable-xhdpi/downloading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/drawable-xhdpi/downloading.png
--------------------------------------------------------------------------------
/network/src/main/res/drawable/editext_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/network/src/main/res/drawable/shape_edit_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/network/src/main/res/drawable/shape_edit_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/activity_content_observer.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
22 |
23 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/activity_http_image.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/activity_http_request.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/item_dropdown.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/item_recycler_grid.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
21 |
22 |
--------------------------------------------------------------------------------
/network/src/main/res/layout/item_select.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/network/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/network/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/network/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #ffffffff
8 | #ff000000
9 | #eeeeee
10 | #888888
11 | #2DCD70
12 | #ffffd700
13 | #00000000
14 | #99000000
15 | #aaaaff
16 |
17 |
--------------------------------------------------------------------------------
/network/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | network
3 |
4 |
--------------------------------------------------------------------------------
/network/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/network/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/network/src/test/java/com/example/network/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.network;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':hello', ':grammar', ':simple', ':complex', ':storage', ':custom', ':network'
2 |
--------------------------------------------------------------------------------
/simple/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/simple/src/androidTest/java/com/example/simple/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.simple;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.simple", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/ActSecondActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 | import android.widget.TextView
6 |
7 | import kotlinx.android.synthetic.main.activity_act_second.*
8 |
9 | /**
10 | * Created by ouyangshen on 2017/8/27.
11 | */
12 | class ActSecondActivity : AppCompatActivity() {
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_act_second)
17 | //获得请求参数的包裹
18 | val bundle = intent.extras
19 | val request_time = bundle.getString("request_time")
20 | val request_content = bundle.getString("request_content")
21 | tv_response.text = "收到请求消息:\n请求时间为${request_time}\n请求内容为${request_content}"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/AlertDialogActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | import kotlinx.android.synthetic.main.activity_alert_dialog.*
7 | import org.jetbrains.anko.alert
8 |
9 | /**
10 | * Created by ouyangshen on 2017/8/27.
11 | */
12 | class AlertDialogActivity : AppCompatActivity() {
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_alert_dialog)
17 | btn_alert.setOnClickListener {
18 | alert("你真的要卸载我吗?", "尊敬的用户") {
19 | positiveButton("残忍卸载") { tv_alert.text = "虽然依依不舍,但是只能离开了" }
20 | negativeButton("我再想想") { tv_alert.text = "让我再陪你三百六十五个日夜" }
21 | }.show()
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/CheckboxActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | import kotlinx.android.synthetic.main.activity_checkbox.*
7 |
8 | /**
9 | * Created by ouyangshen on 2017/8/27.
10 | */
11 | class CheckboxActivity : AppCompatActivity() {
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_checkbox)
16 | ck_select.isChecked = false
17 | ck_select.setOnCheckedChangeListener { buttonView, isChecked ->
18 | tv_select.text = "您${ if (isChecked) "勾选" else "取消勾选"}了复选框"
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/ParcelableFirstActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | import com.example.simple.bean.MessageInfo
7 | import com.example.simple.util.DateUtil
8 |
9 | import kotlinx.android.synthetic.main.activity_parcelable_first.*
10 | import org.jetbrains.anko.startActivity
11 |
12 | /**
13 | * Created by ouyangshen on 2017/8/27.
14 | */
15 | class ParcelableFirstActivity : AppCompatActivity() {
16 |
17 | override fun onCreate(savedInstanceState: Bundle?) {
18 | super.onCreate(savedInstanceState)
19 | setContentView(R.layout.activity_parcelable_first)
20 | btn_act_request.setOnClickListener {
21 | val request = MessageInfo(et_request.text.toString(), DateUtil.nowTime)
22 | startActivity("message" to request)
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/ParcelableSecondActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | import com.example.simple.bean.MessageInfo
7 |
8 | import kotlinx.android.synthetic.main.activity_parcelable_second.*
9 |
10 | /**
11 | * Created by ouyangshen on 2017/8/27.
12 | */
13 | class ParcelableSecondActivity : AppCompatActivity() {
14 |
15 | override fun onCreate(savedInstanceState: Bundle?) {
16 | super.onCreate(savedInstanceState)
17 | setContentView(R.layout.activity_parcelable_second)
18 | //获得Parcelable格式的请求参数
19 | val request = intent.extras.getParcelable("message")
20 | tv_response.text = "收到打包好的请求消息:\n请求时间为${request.send_time}\n请求内容为${request.content}"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/RadioButtonActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 |
6 | import kotlinx.android.synthetic.main.activity_radio_button.*
7 |
8 | /**
9 | * Created by ouyangshen on 2017/8/27.
10 | */
11 | class RadioButtonActivity : AppCompatActivity() {
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_radio_button)
16 | rg_sex.setOnCheckedChangeListener { group, checkedId ->
17 | tv_sex.text = when (checkedId) {
18 | R.id.rb_male -> "哇哦,你是个帅气的男孩"
19 | R.id.rb_female -> "哇哦,你是个漂亮的女孩"
20 | else -> ""
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/simple/src/main/java/com/example/simple/bean/MessageInfo.kt:
--------------------------------------------------------------------------------
1 | package com.example.simple.bean
2 |
3 | import android.os.Parcelable
4 | import kotlinx.android.parcel.Parcelize
5 |
6 | /**
7 | * Created by ouyangshen on 2017/9/7.
8 | */
9 | //@Parcelize注解表示自动实现Parcelable接口的相关方法
10 | @Parcelize
11 | data class MessageInfo(val content: String, val send_time: String) : Parcelable {
12 | }
13 |
--------------------------------------------------------------------------------
/simple/src/main/res/drawable-xhdpi/apple1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/drawable-xhdpi/apple1.png
--------------------------------------------------------------------------------
/simple/src/main/res/drawable-xhdpi/apple2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/drawable-xhdpi/apple2.png
--------------------------------------------------------------------------------
/simple/src/main/res/drawable/editext_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/simple/src/main/res/drawable/shape_edit_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/simple/src/main/res/drawable/shape_edit_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_act_second.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_alert_dialog.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
15 |
16 |
24 |
25 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_checkbox.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_parcelable_first.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
16 |
17 |
26 |
27 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_parcelable_second.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/simple/src/main/res/layout/activity_text_marquee.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
12 |
13 |
25 |
26 |
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/simple/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/simple/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/simple/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #000000
8 | #ffffff
9 | #cccccc
10 | #00ffff
11 |
12 |
--------------------------------------------------------------------------------
/simple/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | simple
3 |
4 |
--------------------------------------------------------------------------------
/simple/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/simple/src/test/java/com/example/simple/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.simple;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/storage/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/storage/src/androidTest/java/com/example/storage/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.storage;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.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 | * Instrumentation 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() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.example.storage", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/AppReadActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage
2 |
3 | import android.os.Bundle
4 | import android.support.v7.app.AppCompatActivity
5 |
6 | import kotlinx.android.synthetic.main.activity_app_read.*
7 |
8 | /**
9 | * Created by ouyangshen on 2017/9/10.
10 | */
11 | class AppReadActivity : AppCompatActivity() {
12 |
13 | override fun onCreate(savedInstanceState: Bundle?) {
14 | super.onCreate(savedInstanceState)
15 | setContentView(R.layout.activity_app_read)
16 | readAppMemory()
17 | }
18 |
19 | private fun readAppMemory() {
20 | var desc = "全局内存中保存的信息如下:"
21 | val mapParam = MainApplication.instance().mInfoMap
22 | for (item_map in mapParam) {
23 | desc = "$desc\n ${item_map.key}的取值为${item_map.value}"
24 | }
25 | if (mapParam.isEmpty()) {
26 | desc = "全局内存中保存的信息为空"
27 | }
28 | tv_app.text = desc
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/FilePathActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.os.Bundle
5 | import android.os.Environment
6 |
7 | import kotlinx.android.synthetic.main.activity_file_path.*
8 |
9 | class FilePathActivity : AppCompatActivity() {
10 |
11 | override fun onCreate(savedInstanceState: Bundle?) {
12 | super.onCreate(savedInstanceState)
13 | setContentView(R.layout.activity_file_path)
14 | //获取系统的公共存储路径
15 | val publicPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();
16 | //获取当前App的私有存储路径
17 | val privatePath = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).toString();
18 | tv_file_path.text = "系统的公共存储路径位于${publicPath}" +
19 | "\n\n当前App的私有存储路径位于${privatePath}" +
20 | "\n\nAndroid7.0之后默认禁止访问公共存储目录"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/adapter/RecyclerExtras.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.adapter
2 |
3 | import android.view.View
4 |
5 | class RecyclerExtras {
6 |
7 | interface OnItemClickListener {
8 | fun onItemClick(view: View, position: Int)
9 | }
10 |
11 | interface OnItemLongClickListener {
12 | fun onItemLongClick(view: View, position: Int)
13 | }
14 |
15 | interface OnItemDeleteClickListener {
16 | fun onItemDeleteClick(view: View, position: Int)
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/bean/CartInfo.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.bean
2 |
3 | data class CartInfo(var rowid: Long=0, var xuhao: Int=0, var goods_id: Long=0,
4 | var count: Int=0, var update_time: String="", var goods: GoodsInfo=GoodsInfo()) {
5 | }
6 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/bean/UserInfo.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.bean
2 |
3 | data class UserInfo(var rowid: Long=0, var xuhao: Int=0, var name: String="", var age: Int=0,
4 | var height: Long=0, var weight: Float=0f, var married: Boolean=false,
5 | var update_time: String="", var phone: String="", var password: String="") {
6 | }
7 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/util/FileUtil.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.util
2 |
3 | import android.graphics.Bitmap
4 | import java.io.*
5 |
6 | object FileUtil {
7 |
8 | fun saveImage(path: String, bitmap: Bitmap) {
9 | try {
10 | val file = File(path)
11 | //outputStream获取文件的输出流对象
12 | //writer获取文件的Writer对象
13 | //printWriter获取文件的PrintWriter对象
14 | val fos: OutputStream = file.outputStream()
15 | //压缩格式为JPEG图像,压缩质量为80%
16 | bitmap.compress(Bitmap.CompressFormat.JPEG, 80, fos)
17 | fos.flush()
18 | fos.close()
19 | } catch (e: Exception) {
20 | e.printStackTrace()
21 | }
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/util/ReadWriteProperty.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.util
2 |
3 | import kotlin.reflect.KProperty
4 |
5 | /**
6 | * Created by ouyangshen on 2017/9/24.
7 | */
8 | interface ReadWriteProperty {
9 |
10 | operator fun getValue(thisRef: R, property: KProperty<*>): T
11 |
12 | operator fun setValue(thisRef: R, property: KProperty<*>, value: T)
13 | }
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/util/SharedUtil.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.util
2 |
3 | import android.content.Context
4 | import android.content.SharedPreferences
5 |
6 | class SharedUtil {
7 |
8 | fun writeShared(key: String, value: String) {
9 | val editor = mShared!!.edit()
10 | editor.putString(key, value)
11 | editor.commit()
12 | }
13 |
14 | fun readShared(key: String, defaultValue: String): String? {
15 | return mShared!!.getString(key, defaultValue)
16 | }
17 |
18 | companion object {
19 |
20 | private var mUtil: SharedUtil? = null
21 | private var mShared: SharedPreferences? = null
22 |
23 | fun getIntance(ctx: Context): SharedUtil {
24 | if (mUtil == null) {
25 | mUtil = SharedUtil()
26 | }
27 | mShared = ctx.getSharedPreferences("share", Context.MODE_PRIVATE)
28 | return mUtil!!
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/storage/src/main/java/com/example/storage/widget/SpacesItemDecoration.kt:
--------------------------------------------------------------------------------
1 | package com.example.storage.widget
2 |
3 | import android.graphics.Rect
4 | import android.support.v7.widget.RecyclerView
5 | import android.view.View
6 |
7 | class SpacesItemDecoration(private val space: Int) : RecyclerView.ItemDecoration() {
8 |
9 | override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
10 | outRect.left = space
11 | outRect.right = space
12 | outRect.bottom = space
13 | outRect.top = space
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-hdpi/arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-hdpi/arrow_down.png
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-hdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-hdpi/ic_back.png
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/cart.png
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/huawei.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/huawei.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/huawei_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/huawei_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/iphone.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/iphone.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/iphone_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/iphone_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/meizu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/meizu.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/meizu_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/meizu_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/menu.png
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/oppo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/oppo.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/oppo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/oppo_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/vivo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/vivo.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/vivo_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/vivo_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/xiaomi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/xiaomi.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable-xhdpi/xiaomi_s.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/drawable-xhdpi/xiaomi_s.jpg
--------------------------------------------------------------------------------
/storage/src/main/res/drawable/editext_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/storage/src/main/res/drawable/shape_edit_focus.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/storage/src/main/res/drawable/shape_edit_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/storage/src/main/res/drawable/shape_oval_red.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/activity_app_read.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/activity_file_path.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/activity_share_read.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/activity_shopping_channel.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/activity_sqlite_read.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/item_dropdown.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/storage/src/main/res/layout/item_select.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/storage/src/main/res/menu/menu_cart.xml:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/storage/src/main/res/menu/menu_goods.xml:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/storage/src/main/res/menu/menu_option.xml:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/storage/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aqi00/kotlin/753407fc916a71f8b9547659b5e10c16951f523a/storage/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/storage/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/storage/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #000000
8 | #ffffff
9 | #cccccc
10 | #ff0000
11 | #ffffdd
12 | #aaaaff
13 |
14 |
--------------------------------------------------------------------------------
/storage/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/storage/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | storage
3 |
4 |
--------------------------------------------------------------------------------
/storage/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
13 |
14 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/storage/src/test/java/com/example/storage/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.storage;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------