From e7042f71e2294a94fad9d765ed33880aff0a811c Mon Sep 17 00:00:00 2001 From: lizhaotailang Date: Wed, 29 Mar 2017 23:54:53 +0800 Subject: [PATCH] Initial commit --- .idea/copyright/MyApacheLicense.xml | 6 + .idea/copyright/profiles_settings.xml | 6 +- .idea/misc.xml | 12 +- README.md | 121 +++++++++++++++++- mobile/src/main/assets/license.html | 16 +++ .../io/github/marktony/espresso/app/App.java | 20 ++- .../espresso/appwidget/AppWidgetProvider.java | 16 +++ .../espresso/appwidget/AppWidgetService.java | 16 +++ .../espresso/appwidget/WidgetListFactory.java | 16 +++ .../espresso/component/FastScrollPopup.java | 16 +++ .../component/FastScrollRecyclerView.java | 16 +++ .../espresso/component/FastScroller.java | 16 +++ .../marktony/espresso/component/Timeline.java | 16 +++ .../espresso/customtabs/CustomTabsHelper.java | 16 +++ .../marktony/espresso/data/Company.java | 16 +++ .../espresso/data/CompanyRecognition.java | 16 +++ .../marktony/espresso/data/Package.java | 16 +++ .../espresso/data/PackageAndCompanyPairs.java | 16 +++ .../marktony/espresso/data/PackageStatus.java | 16 +++ .../espresso/data/PackageWithCompany.java | 16 +++ .../data/source/CompaniesDataSource.java | 16 +++ .../data/source/CompaniesRepository.java | 16 +++ .../data/source/PackagesDataSource.java | 16 +++ .../data/source/PackagesRepository.java | 16 +++ .../local/CompaniesLocalDataSource.java | 16 +++ .../source/local/PackagesLocalDataSource.java | 16 +++ .../remote/PackagesRemoteDataSource.java | 16 +++ .../OnFastScrollStateChangeListener.java | 16 +++ .../OnRecyclerViewItemClickListener.java | 16 +++ .../marktony/espresso/mvp/BasePresenter.java | 16 +++ .../marktony/espresso/mvp/BaseView.java | 16 +++ .../mvp/addpackage/AddPackageActivity.java | 18 ++- .../mvp/addpackage/AddPackageContract.java | 16 +++ .../mvp/addpackage/AddPackageFragment.java | 16 +++ .../mvp/addpackage/AddPackagePresenter.java | 16 +++ .../mvp/companies/CompaniesAdapter.java | 16 +++ .../mvp/companies/CompaniesContract.java | 16 +++ .../mvp/companies/CompaniesFragment.java | 20 ++- .../mvp/companies/CompaniesPresenter.java | 16 +++ .../companydetails/CompanyDetailActivity.java | 16 +++ .../companydetails/CompanyDetailContract.java | 16 +++ .../companydetails/CompanyDetailFragment.java | 16 +++ .../CompanyDetailPresenter.java | 16 +++ .../PackageDetailsActivity.java | 16 +++ .../packagedetails/PackageDetailsAdapter.java | 18 ++- .../PackageDetailsContract.java | 16 +++ .../PackageDetailsFragment.java | 16 +++ .../PackageDetailsPresenter.java | 16 +++ .../espresso/mvp/packages/MainActivity.java | 77 +++++++++-- .../mvp/packages/PackageFilterType.java | 16 +++ .../mvp/packages/PackagesAdapter.java | 16 +++ .../mvp/packages/PackagesContract.java | 16 +++ .../mvp/packages/PackagesFragment.java | 31 +++-- .../mvp/packages/PackagesPresenter.java | 16 +++ .../espresso/mvp/search/SearchActivity.java | 16 +++ .../espresso/mvp/search/SearchContract.java | 16 +++ .../espresso/mvp/search/SearchFragment.java | 16 +++ .../espresso/mvp/search/SearchPresenter.java | 16 +++ .../mvp/search/SearchResultsAdapter.java | 16 +++ .../marktony/espresso/realm/RealmHelper.java | 16 +++ .../marktony/espresso/retrofit/Api.java | 16 +++ .../espresso/retrofit/RetrofitClient.java | 16 +++ .../espresso/retrofit/RetrofitService.java | 16 +++ .../espresso/service/ReminderService.java | 16 +++ .../marktony/espresso/ui/AboutFragment.java | 16 +++ .../espresso/ui/LicensesFragment.java | 16 +++ .../marktony/espresso/ui/PrefsActivity.java | 16 +++ .../espresso/ui/SettingsFragment.java | 28 +++- .../ui/onboarding/OnboardingActivity.java | 16 +++ .../ui/onboarding/OnboardingFragment.java | 16 +++ .../ui/onboarding/OnboardingPagerAdapter.java | 16 +++ .../marktony/espresso/util/DensityUtil.java | 16 +++ .../marktony/espresso/util/NetworkUtil.java | 16 +++ .../marktony/espresso/util/PushUtil.java | 16 +++ .../marktony/espresso/util/SettingsUtil.java | 16 +++ .../espresso/util/TimeFormatUtil.java | 16 +++ .../espresso/zxing/CaptureActivity.java | 16 +++ .../zxing/camera/AutoFocusManager.java | 4 +- .../camera/CameraConfigurationManager.java | 4 +- .../espresso/zxing/camera/CameraManager.java | 4 +- .../zxing/camera/PreviewCallback.java | 4 +- .../camera/open/OpenCameraInterface.java | 4 +- .../zxing/decode/DecodeFormatManager.java | 4 +- .../espresso/zxing/decode/DecodeHandler.java | 4 +- .../espresso/zxing/decode/DecodeThread.java | 4 +- .../espresso/zxing/utils/BeepManager.java | 4 +- .../zxing/utils/CaptureActivityHandler.java | 4 +- .../espresso/zxing/utils/InactivityTimer.java | 4 +- mobile/src/main/res/anim/fade_in.xml | 2 +- mobile/src/main/res/anim/fade_out.xml | 2 +- .../src/main/res/animator/lift_on_touch.xml | 16 +++ .../src/main/res/drawable/click_selector.xml | 23 ---- .../drawable/ic_account_circle_black_24dp.xml | 16 +++ .../main/res/drawable/ic_add_white_24dp.xml | 16 +++ .../res/drawable/ic_assignment_black_24dp.xml | 16 +++ .../ic_assignment_turned_in_black_24dp.xml | 16 +++ .../ic_assignment_turned_in_teal_24dp.xml | 16 +++ .../res/drawable/ic_beenhere_black_24dp.xml | 16 +++ .../drawable/ic_brightness_6_black_24dp.xml | 16 +++ .../ic_center_focus_strong_white_24dp.xml | 16 +++ .../drawable/ic_chevron_left_white_24dp.xml | 16 +++ .../drawable/ic_chevron_right_white_24dp.xml | 16 +++ .../res/drawable/ic_delete_white_24dp.xml | 16 +++ .../res/drawable/ic_dialpad_black_24dp.xml | 16 +++ .../main/res/drawable/ic_done_white_24dp.xml | 16 +++ .../res/drawable/ic_explore_black_24dp.xml | 16 +++ .../drawable/ic_favorite_border_cyan_48dp.xml | 16 +++ .../main/res/drawable/ic_home_black_24dp.xml | 16 +++ .../main/res/drawable/ic_info_black_24dp.xml | 16 +++ .../main/res/drawable/ic_link_black_24dp.xml | 16 +++ .../main/res/drawable/ic_list_black_24dp.xml | 16 +++ .../drawable/ic_local_shipping_black_24dp.xml | 16 +++ .../drawable/ic_local_shipping_teal_24dp.xml | 16 +++ .../drawable/ic_location_city_black_24dp.xml | 16 +++ .../res/drawable/ic_mode_edit_white_24dp.xml | 16 +++ .../drawable/ic_notifications_black_24dp.xml | 16 +++ .../main/res/drawable/ic_phone_black_24dp.xml | 16 +++ .../res/drawable/ic_search_white_24dp.xml | 16 +++ .../res/drawable/ic_settings_black_24dp.xml | 16 +++ .../main/res/drawable/ic_share_white_24dp.xml | 16 +++ .../main/res/drawable/ic_watch_black_24dp.xml | 16 +++ .../src/main/res/drawable/nav_item_color.xml | 21 +++ .../onboarding_indicator_selected.xml | 16 +++ .../onboarding_indicator_unselected.xml | 16 +++ mobile/src/main/res/drawable/ripple_mask.xml | 16 +++ mobile/src/main/res/drawable/selector.xml | 16 +++ mobile/src/main/res/drawable/side_nav_bar.xml | 16 +++ mobile/src/main/res/drawable/solid_circle.xml | 16 +++ mobile/src/main/res/layout/activity_main.xml | 22 +++- .../main/res/layout/activity_onboarding.xml | 16 +++ mobile/src/main/res/layout/activity_prefs.xml | 16 +++ mobile/src/main/res/layout/activity_scan.xml | 16 +++ mobile/src/main/res/layout/app_bar_main.xml | 16 +++ mobile/src/main/res/layout/container.xml | 19 ++- mobile/src/main/res/layout/content_main.xml | 19 ++- .../res/layout/dialog_edit_package_name.xml | 16 +++ .../main/res/layout/fragment_add_package.xml | 16 +++ .../res/layout/fragment_companies_list.xml | 16 +++ .../res/layout/fragment_company_details.xml | 19 +++ .../src/main/res/layout/fragment_licenses.xml | 16 +++ mobile/src/main/res/layout/fragment_list.xml | 16 +++ .../main/res/layout/fragment_onboarding.xml | 16 +++ .../res/layout/fragment_package_details.xml | 16 +++ .../src/main/res/layout/fragment_packages.xml | 20 ++- .../src/main/res/layout/fragment_search.xml | 16 +++ mobile/src/main/res/layout/item_company.xml | 18 +++ .../res/layout/item_company_with_header.xml | 16 +++ ...ils_header.xml => item_details_header.xml} | 22 ++++ mobile/src/main/res/layout/item_package.xml | 19 +++ .../res/layout/item_package_for_widget.xml | 16 +++ .../main/res/layout/item_package_status.xml | 20 +++ .../layout/item_search_result_category.xml | 16 +++ .../res/layout/item_search_result_empty.xml | 16 +++ .../main/res/layout/launcher_list_widget.xml | 16 +++ .../src/main/res/layout/nav_header_main.xml | 16 +++ .../main/res/menu/activity_main_drawer.xml | 16 +++ .../src/main/res/menu/bottom_navigation.xml | 16 +++ mobile/src/main/res/menu/companies_list.xml | 16 +++ mobile/src/main/res/menu/package_details.xml | 16 +++ mobile/src/main/res/menu/packages_list.xml | 16 +++ mobile/src/main/res/values-night/colors.xml | 49 +++++++ mobile/src/main/res/values-w820dp/dimens.xml | 16 +++ mobile/src/main/res/values-zh-rCN/strings.xml | 16 +++ mobile/src/main/res/values/attr.xml | 16 +++ mobile/src/main/res/values/colors.xml | 18 +++ mobile/src/main/res/values/dimens.xml | 16 +++ mobile/src/main/res/values/strings.xml | 17 +++ mobile/src/main/res/values/styles.xml | 20 +++ mobile/src/main/res/values/zxing_ids.xml | 28 ++-- mobile/src/main/res/xml/about_prefs.xml | 16 +++ mobile/src/main/res/xml/settings_prefs.xml | 16 +++ mobile/src/main/res/xml/shortcuts.xml | 16 +++ mobile/src/main/res/xml/widget_provider.xml | 16 +++ .../marktony/espresso/MainActivity.java | 16 +++ wear/src/main/res/layout/activity_main.xml | 16 +++ .../main/res/layout/rect_activity_main.xml | 16 +++ .../main/res/layout/round_activity_main.xml | 16 +++ wear/src/main/res/values/strings.xml | 16 +++ 178 files changed, 2854 insertions(+), 113 deletions(-) create mode 100644 .idea/copyright/MyApacheLicense.xml delete mode 100644 mobile/src/main/res/drawable/click_selector.xml create mode 100644 mobile/src/main/res/drawable/nav_item_color.xml rename mobile/src/main/res/layout/{package_details_header.xml => item_details_header.xml} (75%) create mode 100644 mobile/src/main/res/values-night/colors.xml diff --git a/.idea/copyright/MyApacheLicense.xml b/.idea/copyright/MyApacheLicense.xml new file mode 100644 index 0000000..2dc0ac0 --- /dev/null +++ b/.idea/copyright/MyApacheLicense.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index e7bedf3..ba2f95e 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,3 +1,7 @@ - + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7d275fa..08a11bd 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -55,17 +55,7 @@ - - - - - - - - - - - + diff --git a/README.md b/README.md index 63a5514..ad1ab4e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,126 @@ # Espresso Android App ![icon](https://github.com/TonnyL/Espresso/blob/master/mobile/src/main/res/mipmap-xxxhdpi/ic_launcher.png) +[中文版](#中文版) + Espresso is an express delivery tracking app designed with Material Design style, built on MVP(Model-View-Presenter) architecture with RxJava2, Retrofit2, Realm database and ZXing. The source code in this repository reflects the app which supports mobile devices running Android 5.0+. ### Features -With this app, you can: -+ Support over 600 express companies. -+ Add packages by inputting the package number or just scanning the express sheet. -+ Recognize the company of a package automatically. -+ View the package's details such as the latest location. ++ Over than 640 express companies all over the world are supported. ++ Support add packages by inputting the package number manually or just scanning the express sheet. ++ Support recognize the company of a package automatically. ++ Support view the package's details such as the latest location. ++ Support search information about the express companies. ++ Launcher widgets are provided. ++ Day mode and night mode are supported. ++ Support push notification when the package is refreshed. ++ Support send feedback on using experience from your devices. + +### Screenshots +![screenshot0](https://github.com/TonnyL/Espresso/blob/master/art/screenshot0.png) + +![screenshot1](https://github.com/TonnyL/Espresso/blob/master/art/screenshot1.png) + +### How to Work with the Source +I hope the source code for this app is useful for you as a reference or starting point for creating your own app. Here is some instructions to help you better build and run the code in Android Studio. + +Clone the Repository: + +``` +git clone https://github.com/TonnyL/Espresso.git +``` + +Check out the master branch: + +``` +git checkout master +``` + +Notice: If you want to review a different branch, replace the `master` with the name you want to checkout if it does exist. Finally open the `Espresso/` directory in Android Studio. + +Suggestion: It is better for you to update your Android Studio to version 2.3 when you open this project. + +### To-dos +This project is still in progress. Here are the some features that I will finish in the future. + +- [x] Refreshing package details by accessing the network. +- [x] Launcher app widgets. +- [x] App Shortcuts on devices that running Android 7.1+. +- [x] Material design app onboarding pages. +- [x] Chrome Custom Tabs. +- [x] Alphabet indexing for companies list. +- [x] Search packages and companies. +- [x] Day and night mode. +- [x] Service to build notifications. +- [x] Settings and about page. +- [ ] Supporting Android Wear. +- [ ] UI test and unit test. + +### Help Me Improve This App ++ As you can see at the screenshots, some images in Espresso app are not suitable. So if you are a designer and familiar with **Material Design** and want to help me make the app look better, please email me. ++ If you want to improve the translation of Espresso, do not hesitate to email me. Let us make Espresso more and more popular all over the world. + +### Libraries Used in This App +Name | Introduction | Version +----- | ------ | --- +[Android Support Libraries](https://developer.android.com/topic/libraries/support-library/alphabet.html) | The Android Support Library offers a number of features that are not built into the framework. These libraries offer backward-compatible versions of new features, provide useful UI elements that are not included in the framework, and provide a range of utilities that apps can draw on. | 25.2.0 +[CircleImageView](https://github.com/hdodenhof/CircleImageView) | A circular ImageView for Android | 2.1.0 +[Gson](https://github.com/google/gson) | A Java serialization/deserialization library that can convert Java Objects into JSON and back. | 2.7 +[MaterialDateTimePicker](https://github.com/wdullaer/MaterialDateTimePicker) | Pick a date or time on Android in style. | 3.1.3 +[Realm](https://github.com/realm/realm-java) | Realm is a mobile database: a replacement for SQLite & ORMs. | 3.0.0 +[Retrofit](https://github.com/square/retrofit) | Type-safe HTTP client for Android and Java by Square, Inc. | 2.2.0 +[RxAndroid](https://github.com/ReactiveX/RxAndroid) | RxJava bindings for Android. | 2.0.1 +[RxJava](https://github.com/ReactiveX/RxJava) | RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. | 2.0.1 +[ZXing](https://github.com/zxing/zxing) | ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. | 3.3.0 + +### Thanks to ++ [Express 100](https://www.kuaidi100.com/) ++ [googlesamples](https://github.com/googlesamples) - [android-architecture](https://github.com/googlesamples/android-architecture):A collection of samples to discuss and showcase different architectural tools and patterns for Android apps. ++ [google](https://github.com/google) - [iosched](https://github.com/google/iosched):The Google I/O 2016 Android App. ++ [fython](https://github.com/fython) - [PackageTracker](https://github.com/fython/PackageTracker):The New ExpressHelper for Android. ++ [hefuyicoder](https://github.com/hefuyicoder) - [ListenerMusicPlayer](https://github.com/hefuyicoder/ListenerMusicPlayer):A Grace Material Design Music Player. ++ [BreadKid](https://github.com/BreadKid) - [SearchItem](https://github.com/BreadKid/SearchItem):小搜搜——商品条形码/二维码搜索APP. ++ [YoulunZhai](https://plus.google.com/+YoulunZhai) - The posters. ++ Other people who help me solve the problems when I met some difficult bugs. + +### License +``` +Copyright 2017 lizhaotailang + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## 中文版 + +# Espresso Android App +![icon](https://github.com/TonnyL/Espresso/blob/master/mobile/src/main/res/mipmap-xxxhdpi/ic_launcher.png) + +Espresso是一款基于MVP(Model-View-Presenter)架构, Material Design设计风格, 采用RxJava2, Retrofit2, Realm数据库和ZXing开发的快递追踪应用。 + +本仓库中的源代码仅支持运行Android 5.0及以上的移动设备。 + +### 特点 + ++ 支持全球640余家快递公司。 ++ 可以通过手动或扫描快递单的形式添加包裹。 ++ 自动识别包裹所属的快递公司。 ++ View the package's details such as the latest location.可以查看 + Search information about the express companies. -+ Launcher widgets. ++ 桌面小部件。 ++ 日间及夜间模式。 + Get important notification when the package is on delivery. + Send feedback on using experience from your devices. @@ -51,7 +158,7 @@ This project is still in progress. Here are the some features that I will finish - [x] Chrome Custom Tabs. - [x] Alphabet indexing for companies list. - [x] Search packages and companies. -- [ ] Day and night mode. +- [x] Day and night mode. - [x] Service to build notifications. - [x] Settings and about page. - [ ] Supporting Android Wear. diff --git a/mobile/src/main/assets/license.html b/mobile/src/main/assets/license.html index 0f64a85..6da0cef 100644 --- a/mobile/src/main/assets/license.html +++ b/mobile/src/main/assets/license.html @@ -1,5 +1,21 @@ + + diff --git a/mobile/src/main/java/io/github/marktony/espresso/app/App.java b/mobile/src/main/java/io/github/marktony/espresso/app/App.java index f3168bf..c675378 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/app/App.java +++ b/mobile/src/main/java/io/github/marktony/espresso/app/App.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.app; import android.app.Application; @@ -18,11 +34,11 @@ public void onCreate() { super.onCreate(); Realm.init(this); - /*if (PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean(SettingsUtil.KEY_NIGHT_MODE, false)) { + if (PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getBoolean(SettingsUtil.KEY_NIGHT_MODE, false)) { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); } else { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - }*/ + } } } diff --git a/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetProvider.java b/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetProvider.java index d7da389..0a2232b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetProvider.java +++ b/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetProvider.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.appwidget; import android.app.PendingIntent; diff --git a/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetService.java b/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetService.java index ffe4c48..5d65dd3 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetService.java +++ b/mobile/src/main/java/io/github/marktony/espresso/appwidget/AppWidgetService.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.appwidget; import android.content.Intent; diff --git a/mobile/src/main/java/io/github/marktony/espresso/appwidget/WidgetListFactory.java b/mobile/src/main/java/io/github/marktony/espresso/appwidget/WidgetListFactory.java index b7384aa..849d17b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/appwidget/WidgetListFactory.java +++ b/mobile/src/main/java/io/github/marktony/espresso/appwidget/WidgetListFactory.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.appwidget; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollPopup.java b/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollPopup.java index 7edb068..09f1d15 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollPopup.java +++ b/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollPopup.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.component; import android.animation.ObjectAnimator; diff --git a/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollRecyclerView.java b/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollRecyclerView.java index ed96120..2447320 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollRecyclerView.java +++ b/mobile/src/main/java/io/github/marktony/espresso/component/FastScrollRecyclerView.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.component; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/component/FastScroller.java b/mobile/src/main/java/io/github/marktony/espresso/component/FastScroller.java index e7a1afe..24a62c6 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/component/FastScroller.java +++ b/mobile/src/main/java/io/github/marktony/espresso/component/FastScroller.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.component; import android.animation.Animator; diff --git a/mobile/src/main/java/io/github/marktony/espresso/component/Timeline.java b/mobile/src/main/java/io/github/marktony/espresso/component/Timeline.java index dda6ae5..8d57aaf 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/component/Timeline.java +++ b/mobile/src/main/java/io/github/marktony/espresso/component/Timeline.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.component; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/customtabs/CustomTabsHelper.java b/mobile/src/main/java/io/github/marktony/espresso/customtabs/CustomTabsHelper.java index de697bd..b765256 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/customtabs/CustomTabsHelper.java +++ b/mobile/src/main/java/io/github/marktony/espresso/customtabs/CustomTabsHelper.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.customtabs; import android.content.ActivityNotFoundException; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/Company.java b/mobile/src/main/java/io/github/marktony/espresso/data/Company.java index f754075..2615477 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/Company.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/Company.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; import com.google.gson.Gson; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/CompanyRecognition.java b/mobile/src/main/java/io/github/marktony/espresso/data/CompanyRecognition.java index 5565d41..1b88ee0 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/CompanyRecognition.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/CompanyRecognition.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; import com.google.gson.annotations.Expose; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/Package.java b/mobile/src/main/java/io/github/marktony/espresso/data/Package.java index c45686d..e85b0e8 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/Package.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/Package.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; import com.google.gson.Gson; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/PackageAndCompanyPairs.java b/mobile/src/main/java/io/github/marktony/espresso/data/PackageAndCompanyPairs.java index ee3b77a..dba3338 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/PackageAndCompanyPairs.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/PackageAndCompanyPairs.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; import java.util.List; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/PackageStatus.java b/mobile/src/main/java/io/github/marktony/espresso/data/PackageStatus.java index daad7d3..d0a0853 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/PackageStatus.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/PackageStatus.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; import com.google.gson.annotations.Expose; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/PackageWithCompany.java b/mobile/src/main/java/io/github/marktony/espresso/data/PackageWithCompany.java index 67693e4..722afed 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/PackageWithCompany.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/PackageWithCompany.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data; /** diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesDataSource.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesDataSource.java index 2fb9063..c02a8d4 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesDataSource.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesDataSource.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesRepository.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesRepository.java index 11a5809..97c7ccb 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesRepository.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/CompaniesRepository.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesDataSource.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesDataSource.java index 2eb13e5..2ffb3c8 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesDataSource.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesDataSource.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesRepository.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesRepository.java index 105fb83..e736f86 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesRepository.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/PackagesRepository.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/local/CompaniesLocalDataSource.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/local/CompaniesLocalDataSource.java index 69d897e..b6d2b31 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/local/CompaniesLocalDataSource.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/local/CompaniesLocalDataSource.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source.local; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/local/PackagesLocalDataSource.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/local/PackagesLocalDataSource.java index c04bb30..e646803 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/local/PackagesLocalDataSource.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/local/PackagesLocalDataSource.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source.local; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/data/source/remote/PackagesRemoteDataSource.java b/mobile/src/main/java/io/github/marktony/espresso/data/source/remote/PackagesRemoteDataSource.java index f2be059..82a2e72 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/data/source/remote/PackagesRemoteDataSource.java +++ b/mobile/src/main/java/io/github/marktony/espresso/data/source/remote/PackagesRemoteDataSource.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.data.source.remote; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnFastScrollStateChangeListener.java b/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnFastScrollStateChangeListener.java index c259e46..c427023 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnFastScrollStateChangeListener.java +++ b/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnFastScrollStateChangeListener.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.interfaze; /** diff --git a/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnRecyclerViewItemClickListener.java b/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnRecyclerViewItemClickListener.java index b934e7b..d56a23c 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnRecyclerViewItemClickListener.java +++ b/mobile/src/main/java/io/github/marktony/espresso/interfaze/OnRecyclerViewItemClickListener.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.interfaze; import android.view.View; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/BasePresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/BasePresenter.java index 54d6230..240a85d 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/BasePresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/BasePresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp; /** diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/BaseView.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/BaseView.java index a7b9a69..f260807 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/BaseView.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/BaseView.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp; import android.view.View; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageActivity.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageActivity.java index 032b745..cdd58bd 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.addpackage; import android.os.Bundle; @@ -23,8 +39,6 @@ public class AddPackageActivity extends AppCompatActivity { private AddPackageFragment fragment; - public static final int REQUEST_ADD_PACKAGE = 1; - @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageContract.java index c470baf..712b0a7 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.addpackage; import io.github.marktony.espresso.mvp.BasePresenter; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageFragment.java index 464e452..3abacf1 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackageFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.addpackage; import android.Manifest; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackagePresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackagePresenter.java index 4dc11b0..7dd7599 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackagePresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/addpackage/AddPackagePresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.addpackage; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesAdapter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesAdapter.java index a956afd..98b680a 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesAdapter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companies; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesContract.java index 73cd4f7..0829127 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companies; import java.util.ArrayList; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesFragment.java index 9f1b09a..a70463c 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companies; import android.app.ActivityOptions; @@ -22,6 +38,7 @@ import io.github.marktony.espresso.data.Company; import io.github.marktony.espresso.interfaze.OnRecyclerViewItemClickListener; import io.github.marktony.espresso.mvp.companydetails.CompanyDetailActivity; +import io.github.marktony.espresso.mvp.search.SearchActivity; /** * Created by lizhaotailang on 2017/2/10. @@ -81,7 +98,8 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.action_search) { - presenter.subscribe(); + startActivity(new Intent(getContext(), SearchActivity.class), + ActivityOptions.makeSceneTransitionAnimation(getActivity()).toBundle()); } return true; } diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesPresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesPresenter.java index 6cbffd0..a4ced02 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesPresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companies/CompaniesPresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companies; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailActivity.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailActivity.java index cdb5b17..aea8c47 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companydetails; import android.os.Bundle; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailContract.java index 65d80ef..aa9e8c0 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companydetails; import java.util.List; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailFragment.java index 6856d4d..a37543b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companydetails; import android.content.ActivityNotFoundException; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailPresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailPresenter.java index 4efd3ca..86086d8 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailPresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/companydetails/CompanyDetailPresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.companydetails; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsActivity.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsActivity.java index d37530b..844866c 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packagedetails; import android.os.Bundle; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsAdapter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsAdapter.java index 5808bbe..7561eff 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsAdapter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packagedetails; import android.app.ActivityOptions; @@ -66,7 +82,7 @@ public PackageDetailsAdapter(@NonNull Context context, @NonNull Package p) { @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == TYPE_HEADER) { - return new HeaderViewHolder(inflater.inflate(R.layout.package_details_header, parent, false)); + return new HeaderViewHolder(inflater.inflate(R.layout.item_details_header, parent, false)); } return new PackageStatusViewHolder(inflater.inflate(R.layout.item_package_status, parent, false)); } diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsContract.java index b355b3d..8e5d3a9 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packagedetails; import android.support.annotation.DrawableRes; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsFragment.java index b8b4463..cea7254 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packagedetails; import android.content.ActivityNotFoundException; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsPresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsPresenter.java index 66643e6..07ff5f3 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsPresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packagedetails/PackageDetailsPresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packagedetails; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/MainActivity.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/MainActivity.java index fab8073..20b3be1 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/MainActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/MainActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; import android.app.ActivityOptions; @@ -18,7 +34,9 @@ import android.support.v7.widget.Toolbar; import android.transition.Explode; import android.transition.Slide; +import android.view.Menu; import android.view.MenuItem; +import android.view.View; import android.view.animation.AccelerateDecelerateInterpolator; import io.github.marktony.espresso.R; @@ -50,8 +68,11 @@ public class MainActivity extends AppCompatActivity private CompaniesFragment companiesFragment; private PackagesPresenter packagesPresenter; + private static final String KEY_NAV_ITEM = "CURRENT_NAV_ITEM"; private static final String CURRENT_FILTERING_KEY = "CURRENT_FILTERING_KEY"; + private int selectedNavItem = 0; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -79,6 +100,7 @@ protected void onCreate(Bundle savedInstanceState) { if (savedInstanceState != null) { packagesFragment = (PackagesFragment) getSupportFragmentManager().getFragment(savedInstanceState, "PackagesFragment"); companiesFragment = (CompaniesFragment) getSupportFragmentManager().getFragment(savedInstanceState, "CompaniesFragment"); + selectedNavItem = savedInstanceState.getInt(KEY_NAV_ITEM); } else { packagesFragment = (PackagesFragment) getSupportFragmentManager().findFragmentById(R.id.content_main); if (packagesFragment == null) { @@ -126,7 +148,11 @@ protected void onCreate(Bundle savedInstanceState) { } // Show the default fragment. - showPackagesFragment(); + if (selectedNavItem == 0) { + showPackagesFragment(); + } else if (selectedNavItem == 1) { + showCompaniesFragment(); + } PushUtil.startReminderService(this); @@ -171,17 +197,37 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) { } else if (id == R.id.nav_switch_theme) { - /*SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) - == Configuration.UI_MODE_NIGHT_YES) { - sp.edit().putBoolean(SettingsUtil.KEY_NIGHT_MODE, false).apply(); - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - } else { - sp.edit().putBoolean(SettingsUtil.KEY_NIGHT_MODE, true).apply(); - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - } - getWindow().setWindowAnimations(R.style.WindowAnimationFadeInOut); - recreate();*/ + drawer.addDrawerListener(new DrawerLayout.DrawerListener() { + @Override + public void onDrawerSlide(View drawerView, float slideOffset) { + + } + + @Override + public void onDrawerOpened(View drawerView) { + + } + + @Override + public void onDrawerClosed(View drawerView) { + SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); + if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) + == Configuration.UI_MODE_NIGHT_YES) { + sp.edit().putBoolean(SettingsUtil.KEY_NIGHT_MODE, false).apply(); + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + } else { + sp.edit().putBoolean(SettingsUtil.KEY_NIGHT_MODE, true).apply(); + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + } + getWindow().setWindowAnimations(R.style.WindowAnimationFadeInOut); + recreate(); + } + + @Override + public void onDrawerStateChanged(int newState) { + + } + }); } else if (id == R.id.nav_settings) { @@ -210,7 +256,12 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) { protected void onSaveInstanceState(Bundle outState) { outState.putSerializable(CURRENT_FILTERING_KEY, packagesPresenter.getFiltering()); super.onSaveInstanceState(outState); - + Menu menu = navigationView.getMenu(); + if (menu.findItem(R.id.nav_home).isChecked()) { + outState.putInt(KEY_NAV_ITEM, 0); + } else if (menu.findItem(R.id.nav_companies).isChecked()) { + outState.putInt(KEY_NAV_ITEM, 1); + } // Store the fragments' states. if (packagesFragment.isAdded()) { getSupportFragmentManager().putFragment(outState, "PackagesFragment", packagesFragment); diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackageFilterType.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackageFilterType.java index b662981..35040de 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackageFilterType.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackageFilterType.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; /** diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesAdapter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesAdapter.java index 61df17b..8b2a5a5 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesAdapter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesContract.java index ad68fc5..4b9daa8 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesFragment.java index 4b3275d..dd0b5ed 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; import android.app.ActivityOptions; @@ -45,7 +61,6 @@ public class PackagesFragment extends Fragment implements PackagesContract.View { - // View references private BottomNavigationView bottomNavigationView; private FloatingActionButton fab; @@ -53,8 +68,6 @@ public class PackagesFragment extends Fragment private LinearLayout emptyView; private SwipeRefreshLayout refreshLayout; - private View contentView; - private PackagesAdapter adapter; private PackagesContract.Presenter presenter; @@ -76,16 +89,15 @@ public void onCreate(@Nullable Bundle savedInstanceState) { @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - contentView = inflater.inflate(R.layout.fragment_packages, container, false); + View contentView = inflater.inflate(R.layout.fragment_packages, container, false); initViews(contentView); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - startActivityForResult(new Intent(getContext(), AddPackageActivity.class), - AddPackageActivity.REQUEST_ADD_PACKAGE, - ActivityOptions.makeSceneTransitionAnimation(getActivity()).toBundle()); + startActivity(new Intent(getContext(), AddPackageActivity.class), + ActivityOptions.makeSceneTransitionAnimation(getActivity()).toBundle()); } }); @@ -123,7 +135,7 @@ public void onRefresh() { } }); - // Set true to inflater the options menu. + // Set true to inflate the options menu. setHasOptionsMenu(true); return contentView; @@ -153,7 +165,8 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_search) { - startActivity(new Intent(getContext(), SearchActivity.class)); + startActivity(new Intent(getContext(), SearchActivity.class), + ActivityOptions.makeSceneTransitionAnimation(getActivity()).toBundle()); } else if (id == R.id.action_mark_all_read) { presenter.markAllPacksRead(); } diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesPresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesPresenter.java index 5baf60c..dc7d56b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesPresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/packages/PackagesPresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.packages; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchActivity.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchActivity.java index 5509f8f..534e160 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.search; import android.preference.PreferenceManager; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchContract.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchContract.java index d75adc3..5ce530a 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchContract.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchContract.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.search; import java.util.List; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchFragment.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchFragment.java index 2419a7a..2c83cb2 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.search; import android.app.ActivityOptions; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchPresenter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchPresenter.java index 11c4e8e..ef73152 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchPresenter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchPresenter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.search; import android.support.annotation.NonNull; diff --git a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchResultsAdapter.java b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchResultsAdapter.java index 91249b4..970d2f1 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchResultsAdapter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/mvp/search/SearchResultsAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.mvp.search; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/realm/RealmHelper.java b/mobile/src/main/java/io/github/marktony/espresso/realm/RealmHelper.java index e8f467b..4e18bfd 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/realm/RealmHelper.java +++ b/mobile/src/main/java/io/github/marktony/espresso/realm/RealmHelper.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.realm; import io.realm.Realm; diff --git a/mobile/src/main/java/io/github/marktony/espresso/retrofit/Api.java b/mobile/src/main/java/io/github/marktony/espresso/retrofit/Api.java index e8cdba9..091af03 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/retrofit/Api.java +++ b/mobile/src/main/java/io/github/marktony/espresso/retrofit/Api.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.retrofit; diff --git a/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitClient.java b/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitClient.java index 54fb594..19dab39 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitClient.java +++ b/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitClient.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.retrofit; import retrofit2.Retrofit; diff --git a/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitService.java b/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitService.java index a7f1066..7e0f4e8 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitService.java +++ b/mobile/src/main/java/io/github/marktony/espresso/retrofit/RetrofitService.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.retrofit; import io.github.marktony.espresso.data.CompanyRecognition; diff --git a/mobile/src/main/java/io/github/marktony/espresso/service/ReminderService.java b/mobile/src/main/java/io/github/marktony/espresso/service/ReminderService.java index 7810290..ca65453 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/service/ReminderService.java +++ b/mobile/src/main/java/io/github/marktony/espresso/service/ReminderService.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.service; import android.app.IntentService; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/AboutFragment.java b/mobile/src/main/java/io/github/marktony/espresso/ui/AboutFragment.java index 8882c8b..df6a61b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/AboutFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/AboutFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui; import android.content.ActivityNotFoundException; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/LicensesFragment.java b/mobile/src/main/java/io/github/marktony/espresso/ui/LicensesFragment.java index b63e865..3c04085 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/LicensesFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/LicensesFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui; import android.os.Bundle; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/PrefsActivity.java b/mobile/src/main/java/io/github/marktony/espresso/ui/PrefsActivity.java index b203ab1..bf67825 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/PrefsActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/PrefsActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui; import android.content.Intent; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/SettingsFragment.java b/mobile/src/main/java/io/github/marktony/espresso/ui/SettingsFragment.java index 091d9b4..49b1f23 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/SettingsFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/SettingsFragment.java @@ -1,8 +1,25 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; +import android.support.design.widget.Snackbar; import android.support.v7.preference.Preference; import android.support.v7.preference.PreferenceFragmentCompat; import android.widget.Toast; @@ -21,7 +38,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { private Preference prefStartTime, prefsEndTime, prefAlert; - private Preference prefNotificationInterval; + private Preference prefNotificationInterval, prefNavigationBar; private SharedPreferences sp; @@ -118,6 +135,14 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { } }); + prefNavigationBar.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + Snackbar.make(getView(), R.string.navigation_bar_restart_msg, Snackbar.LENGTH_SHORT).show(); + return true; + } + }); + } /** @@ -128,6 +153,7 @@ private void initPrefs() { prefsEndTime = findPreference("do_not_disturb_mode_end"); prefAlert = findPreference("alert"); prefNotificationInterval = findPreference("notification_interval"); + prefNavigationBar = findPreference("navigation_bar_tint"); } } diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingActivity.java b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingActivity.java index a1dd378..f3a09da 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui.onboarding; import android.animation.ArgbEvaluator; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingFragment.java b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingFragment.java index 4d6a441..599ac4b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingFragment.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingFragment.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui.onboarding; import android.os.Bundle; diff --git a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingPagerAdapter.java b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingPagerAdapter.java index a83d11e..8cf4a7f 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingPagerAdapter.java +++ b/mobile/src/main/java/io/github/marktony/espresso/ui/onboarding/OnboardingPagerAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.ui.onboarding; import android.support.v4.app.Fragment; diff --git a/mobile/src/main/java/io/github/marktony/espresso/util/DensityUtil.java b/mobile/src/main/java/io/github/marktony/espresso/util/DensityUtil.java index fec4b28..fd22cd3 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/util/DensityUtil.java +++ b/mobile/src/main/java/io/github/marktony/espresso/util/DensityUtil.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.util; import android.app.Activity; diff --git a/mobile/src/main/java/io/github/marktony/espresso/util/NetworkUtil.java b/mobile/src/main/java/io/github/marktony/espresso/util/NetworkUtil.java index 5ad7683..d1a483b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/util/NetworkUtil.java +++ b/mobile/src/main/java/io/github/marktony/espresso/util/NetworkUtil.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.util; import android.content.Context; diff --git a/mobile/src/main/java/io/github/marktony/espresso/util/PushUtil.java b/mobile/src/main/java/io/github/marktony/espresso/util/PushUtil.java index 834c432..a09effd 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/util/PushUtil.java +++ b/mobile/src/main/java/io/github/marktony/espresso/util/PushUtil.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.util; import android.app.AlarmManager; diff --git a/mobile/src/main/java/io/github/marktony/espresso/util/SettingsUtil.java b/mobile/src/main/java/io/github/marktony/espresso/util/SettingsUtil.java index 885935b..23123fc 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/util/SettingsUtil.java +++ b/mobile/src/main/java/io/github/marktony/espresso/util/SettingsUtil.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.util; /** diff --git a/mobile/src/main/java/io/github/marktony/espresso/util/TimeFormatUtil.java b/mobile/src/main/java/io/github/marktony/espresso/util/TimeFormatUtil.java index 0d28e7b..e903aa3 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/util/TimeFormatUtil.java +++ b/mobile/src/main/java/io/github/marktony/espresso/util/TimeFormatUtil.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.util; import android.support.annotation.Nullable; diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/CaptureActivity.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/CaptureActivity.java index 7932f8e..8f00d21 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/CaptureActivity.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/CaptureActivity.java @@ -1,3 +1,19 @@ +/* + * Copyright(c) 2017 lizhaotailang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package io.github.marktony.espresso.zxing; import android.content.DialogInterface; diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/AutoFocusManager.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/AutoFocusManager.java index 1e2e5fc..8c9e160 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/AutoFocusManager.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/AutoFocusManager.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2012 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraConfigurationManager.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraConfigurationManager.java index 359f443..3b2d16a 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraConfigurationManager.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraConfigurationManager.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2008 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraManager.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraManager.java index f8fa892..45cac8b 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraManager.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/CameraManager.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2008 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/PreviewCallback.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/PreviewCallback.java index bea7b21..3fc4d5a 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/PreviewCallback.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/PreviewCallback.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2010 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/open/OpenCameraInterface.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/open/OpenCameraInterface.java index 21e6c90..fb27125 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/open/OpenCameraInterface.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/camera/open/OpenCameraInterface.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2012 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeFormatManager.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeFormatManager.java index 9614bd8..182fcd5 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeFormatManager.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeFormatManager.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2010 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeHandler.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeHandler.java index 7de62e5..1fe31e6 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeHandler.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeHandler.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2010 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeThread.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeThread.java index 30feeac..ebcee2d 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeThread.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/decode/DecodeThread.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2008 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/BeepManager.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/BeepManager.java index 1e9968c..409edcf 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/BeepManager.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/BeepManager.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2010 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/CaptureActivityHandler.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/CaptureActivityHandler.java index 279c305..1a1444f 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/CaptureActivityHandler.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/CaptureActivityHandler.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2008 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/InactivityTimer.java b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/InactivityTimer.java index 68a1255..0cf0af3 100644 --- a/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/InactivityTimer.java +++ b/mobile/src/main/java/io/github/marktony/espresso/zxing/utils/InactivityTimer.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2010 ZXing authors + * Copyright(c) 2017 lizhaotailang * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/mobile/src/main/res/anim/fade_in.xml b/mobile/src/main/res/anim/fade_in.xml index 5189076..9b0075a 100644 --- a/mobile/src/main/res/anim/fade_in.xml +++ b/mobile/src/main/res/anim/fade_in.xml @@ -1,5 +1,5 @@ + - - - - - - - - - - - - diff --git a/mobile/src/main/res/drawable/ic_account_circle_black_24dp.xml b/mobile/src/main/res/drawable/ic_account_circle_black_24dp.xml index 7678580..e7bee6c 100644 --- a/mobile/src/main/res/drawable/ic_account_circle_black_24dp.xml +++ b/mobile/src/main/res/drawable/ic_account_circle_black_24dp.xml @@ -1,3 +1,19 @@ + + + + + + + + + + + + + + + + diff --git a/mobile/src/main/res/drawable/ic_home_black_24dp.xml b/mobile/src/main/res/drawable/ic_home_black_24dp.xml index 70fb291..50a7a95 100644 --- a/mobile/src/main/res/drawable/ic_home_black_24dp.xml +++ b/mobile/src/main/res/drawable/ic_home_black_24dp.xml @@ -1,3 +1,19 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/src/main/res/drawable/onboarding_indicator_selected.xml b/mobile/src/main/res/drawable/onboarding_indicator_selected.xml index 3d6e9fa..770ea54 100644 --- a/mobile/src/main/res/drawable/onboarding_indicator_selected.xml +++ b/mobile/src/main/res/drawable/onboarding_indicator_selected.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/drawable/onboarding_indicator_unselected.xml b/mobile/src/main/res/drawable/onboarding_indicator_unselected.xml index 411af86..7461fa9 100644 --- a/mobile/src/main/res/drawable/onboarding_indicator_unselected.xml +++ b/mobile/src/main/res/drawable/onboarding_indicator_unselected.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/drawable/ripple_mask.xml b/mobile/src/main/res/drawable/ripple_mask.xml index 95a72c7..0e0e8dc 100644 --- a/mobile/src/main/res/drawable/ripple_mask.xml +++ b/mobile/src/main/res/drawable/ripple_mask.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/drawable/selector.xml b/mobile/src/main/res/drawable/selector.xml index 0b21ba6..a948de6 100644 --- a/mobile/src/main/res/drawable/selector.xml +++ b/mobile/src/main/res/drawable/selector.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/drawable/side_nav_bar.xml b/mobile/src/main/res/drawable/side_nav_bar.xml index 458b4b0..1e4411c 100644 --- a/mobile/src/main/res/drawable/side_nav_bar.xml +++ b/mobile/src/main/res/drawable/side_nav_bar.xml @@ -1,3 +1,19 @@ + + + + + + + app:menu="@menu/activity_main_drawer" + app:itemIconTint="@drawable/nav_item_color" + app:itemTextColor="@drawable/nav_item_color"/> + diff --git a/mobile/src/main/res/layout/activity_onboarding.xml b/mobile/src/main/res/layout/activity_onboarding.xml index 31bcf3d..c74c242 100644 --- a/mobile/src/main/res/layout/activity_onboarding.xml +++ b/mobile/src/main/res/layout/activity_onboarding.xml @@ -1,4 +1,20 @@ + + + + + + + + + + + android:id="@+id/container" + android:background="@color/layout_background"/> diff --git a/mobile/src/main/res/layout/content_main.xml b/mobile/src/main/res/layout/content_main.xml index ef95a2b..a5b23c7 100644 --- a/mobile/src/main/res/layout/content_main.xml +++ b/mobile/src/main/res/layout/content_main.xml @@ -1,4 +1,20 @@ + + + tools:showIn="@layout/app_bar_main" + android:background="@color/layout_background"/> diff --git a/mobile/src/main/res/layout/dialog_edit_package_name.xml b/mobile/src/main/res/layout/dialog_edit_package_name.xml index bb6a66a..a9710c7 100644 --- a/mobile/src/main/res/layout/dialog_edit_package_name.xml +++ b/mobile/src/main/res/layout/dialog_edit_package_name.xml @@ -1,4 +1,20 @@ + + + + + + + + @@ -71,6 +88,7 @@ android:drawableStart="@drawable/ic_phone_black_24dp" android:lineSpacingExtra="@dimen/activity_margin_half" android:drawablePadding="@dimen/activity_horizontal_margin" + android:textColor="@color/colorPrimaryText" android:id="@+id/textViewCompanyPhoneNumber" android:textIsSelectable="true"/> @@ -81,6 +99,7 @@ android:layout_marginBottom="@dimen/activity_margin_half" android:drawableStart="@drawable/ic_link_black_24dp" android:drawablePadding="@dimen/activity_horizontal_margin" + android:textColor="@color/colorPrimaryText" android:id="@+id/textViewCompanyWebsite" android:textAppearance="@style/TextAppearance.AppCompat.Small" android:lineSpacingExtra="@dimen/activity_margin_half" diff --git a/mobile/src/main/res/layout/fragment_licenses.xml b/mobile/src/main/res/layout/fragment_licenses.xml index 405682e..097322e 100644 --- a/mobile/src/main/res/layout/fragment_licenses.xml +++ b/mobile/src/main/res/layout/fragment_licenses.xml @@ -1,4 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/mobile/src/main/res/layout/fragment_search.xml b/mobile/src/main/res/layout/fragment_search.xml index 8d64b23..87c62d6 100644 --- a/mobile/src/main/res/layout/fragment_search.xml +++ b/mobile/src/main/res/layout/fragment_search.xml @@ -1,4 +1,20 @@ + + + + diff --git a/mobile/src/main/res/layout/item_company_with_header.xml b/mobile/src/main/res/layout/item_company_with_header.xml index 0240e77..b703cc3 100644 --- a/mobile/src/main/res/layout/item_company_with_header.xml +++ b/mobile/src/main/res/layout/item_company_with_header.xml @@ -1,4 +1,20 @@ + + + + @@ -21,6 +38,7 @@ android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:id="@+id/textViewName" + android:textColor="@color/colorSecondaryText" android:textAppearance="@style/TextAppearance.AppCompat.Small" /> @@ -36,6 +55,7 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" + android:textColor="@color/colorSecondaryText" android:id="@+id/textViewPackageNumber" android:textAppearance="@style/TextAppearance.AppCompat.Small" /> @@ -44,6 +64,7 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" android:layout_marginBottom="4dp" + android:textColor="@color/colorPrimaryText" android:textAppearance="@style/TextAppearance.AppCompat.Body2" android:text="@string/company_name"/> @@ -52,6 +73,7 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" + android:textColor="@color/colorSecondaryText" android:id="@+id/textViewCompany" android:textAppearance="@style/TextAppearance.AppCompat.Small" /> diff --git a/mobile/src/main/res/layout/item_package.xml b/mobile/src/main/res/layout/item_package.xml index 37be8a2..3b8a064 100644 --- a/mobile/src/main/res/layout/item_package.xml +++ b/mobile/src/main/res/layout/item_package.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/layout/item_package_for_widget.xml b/mobile/src/main/res/layout/item_package_for_widget.xml index 386baa6..26f7519 100644 --- a/mobile/src/main/res/layout/item_package_for_widget.xml +++ b/mobile/src/main/res/layout/item_package_for_widget.xml @@ -1,4 +1,20 @@ + + + + @@ -102,6 +121,7 @@ android:layout_marginBottom="4dp" android:id="@+id/textViewTime" android:textIsSelectable="true" + android:textColor="@color/colorSecondaryText" android:textAppearance="@style/TextAppearance.AppCompat.Small" /> diff --git a/mobile/src/main/res/layout/item_search_result_category.xml b/mobile/src/main/res/layout/item_search_result_category.xml index 707ff55..c5ada3a 100644 --- a/mobile/src/main/res/layout/item_search_result_category.xml +++ b/mobile/src/main/res/layout/item_search_result_category.xml @@ -1,4 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/mobile/src/main/res/values-night/colors.xml b/mobile/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..596a7b6 --- /dev/null +++ b/mobile/src/main/res/values-night/colors.xml @@ -0,0 +1,49 @@ + + + + + #607d8b + #485a66 + #546dfe + #CFD8DC + #e4e4e4 + #b5b5b5 + #BDBDBD + #35464e + #222222 + #a5a5a5 + + #33000000 + + #00BCD4 + #4CAF50 + #03A9F4 + #FF9800 + #CDDC39 + #FFC107 + #E91E63 + + #FF5722 + + #303030 + + #EEEEEE + + @android:color/white + #4D000000 + + diff --git a/mobile/src/main/res/values-w820dp/dimens.xml b/mobile/src/main/res/values-w820dp/dimens.xml index 63fc816..9ff5438 100644 --- a/mobile/src/main/res/values-w820dp/dimens.xml +++ b/mobile/src/main/res/values-w820dp/dimens.xml @@ -1,3 +1,19 @@ + + + Espresso diff --git a/mobile/src/main/res/values/attr.xml b/mobile/src/main/res/values/attr.xml index 7d95920..fd39563 100644 --- a/mobile/src/main/res/values/attr.xml +++ b/mobile/src/main/res/values/attr.xml @@ -1,4 +1,20 @@ + + diff --git a/mobile/src/main/res/values/colors.xml b/mobile/src/main/res/values/colors.xml index 97a7d34..0c60c3d 100644 --- a/mobile/src/main/res/values/colors.xml +++ b/mobile/src/main/res/values/colors.xml @@ -1,4 +1,20 @@ + + #009688 #00796B @@ -8,6 +24,8 @@ #757575 #BDBDBD #ebebeb + @android:color/white + #757575 #33000000 diff --git a/mobile/src/main/res/values/dimens.xml b/mobile/src/main/res/values/dimens.xml index a691251..b59b57a 100644 --- a/mobile/src/main/res/values/dimens.xml +++ b/mobile/src/main/res/values/dimens.xml @@ -1,3 +1,19 @@ + + 16dp diff --git a/mobile/src/main/res/values/strings.xml b/mobile/src/main/res/values/strings.xml index 14a1c3f..a8df727 100644 --- a/mobile/src/main/res/values/strings.xml +++ b/mobile/src/main/res/values/strings.xml @@ -1,4 +1,20 @@ + + Espresso @@ -100,6 +116,7 @@ User interface Navigation bar tint Color the navigation bar + Changes will be applied after restarting app. 10 minutes 30 minutes diff --git a/mobile/src/main/res/values/styles.xml b/mobile/src/main/res/values/styles.xml index e63f498..3f2ca38 100644 --- a/mobile/src/main/res/values/styles.xml +++ b/mobile/src/main/res/values/styles.xml @@ -1,3 +1,19 @@ + + @@ -33,6 +49,10 @@ true vertical 1 + @color/layout_background + @color/colorPrimaryText + @color/colorSecondaryText + @color/colorAccent