├── AppSearch
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── array.xml
│ │ │ │ │ ├── attrs.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── dialj_ic1.png
│ │ │ │ │ ├── dialj_ic2.png
│ │ │ │ │ ├── dialx_ic1.png
│ │ │ │ │ ├── dialx_ic2.png
│ │ │ │ │ ├── num0_ic1.png
│ │ │ │ │ ├── num0_ic2.png
│ │ │ │ │ ├── num1_ic1.png
│ │ │ │ │ ├── num1_ic2.png
│ │ │ │ │ ├── num2_ic1.png
│ │ │ │ │ ├── num2_ic2.png
│ │ │ │ │ ├── num3_ic1.png
│ │ │ │ │ ├── num3_ic2.png
│ │ │ │ │ ├── num4_ic1.png
│ │ │ │ │ ├── num4_ic2.png
│ │ │ │ │ ├── num5_ic1.png
│ │ │ │ │ ├── num5_ic2.png
│ │ │ │ │ ├── num6_ic1.png
│ │ │ │ │ ├── num6_ic2.png
│ │ │ │ │ ├── num7_ic1.png
│ │ │ │ │ ├── num7_ic2.png
│ │ │ │ │ ├── num8_ic1.png
│ │ │ │ │ ├── num8_ic2.png
│ │ │ │ │ ├── num9_ic1.png
│ │ │ │ │ ├── num9_ic2.png
│ │ │ │ │ ├── back_normal.png
│ │ │ │ │ ├── back_pressed.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── search_press.png
│ │ │ │ │ ├── delete_normal.png
│ │ │ │ │ ├── delete_pressed.png
│ │ │ │ │ ├── search_normal.png
│ │ │ │ │ ├── dial_delete_press.png
│ │ │ │ │ ├── dial_delete_normal.png
│ │ │ │ │ ├── keyboard_hide_normal.png
│ │ │ │ │ ├── keyboard_hide_press.png
│ │ │ │ │ ├── keyboard_show_normal.png
│ │ │ │ │ ├── keyboard_show_press.png
│ │ │ │ │ ├── telephone_dial_close_normal.png
│ │ │ │ │ └── telephone_dial_close_press.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── layout
│ │ │ │ │ ├── activity_fragment.xml
│ │ │ │ │ ├── fragment_main.xml
│ │ │ │ │ ├── icon_button_grid_item.xml
│ │ │ │ │ ├── navigation_bar.xml
│ │ │ │ │ ├── fragment_qwerty_search.xml
│ │ │ │ │ ├── app_info_grid_item.xml
│ │ │ │ │ ├── fragment_t9_search.xml
│ │ │ │ │ └── search_box.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── num0_ic_selector.xml
│ │ │ │ │ ├── num1_ic_selector.xml
│ │ │ │ │ ├── num2_ic_selector.xml
│ │ │ │ │ ├── num3_ic_selector.xml
│ │ │ │ │ ├── num4_ic_selector.xml
│ │ │ │ │ ├── num5_ic_selector.xml
│ │ │ │ │ ├── num6_ic_selector.xml
│ │ │ │ │ ├── num7_ic_selector.xml
│ │ │ │ │ ├── num8_ic_selector.xml
│ │ │ │ │ ├── num9_ic_selector.xml
│ │ │ │ │ ├── back_selector.xml
│ │ │ │ │ ├── dialj_ic_selector.xml
│ │ │ │ │ ├── dialx_ic_selector.xml
│ │ │ │ │ ├── search_selector.xml
│ │ │ │ │ ├── search_box_delete_selector.xml
│ │ │ │ │ ├── dial_delete_selector.xml
│ │ │ │ │ ├── keyboard_hide_selector.xml
│ │ │ │ │ ├── keyboard_show_selector.xml
│ │ │ │ │ ├── telephone_dial_close_selector.xml
│ │ │ │ │ └── icon_button_grid_item_selector.xml
│ │ │ │ ├── values-v21
│ │ │ │ │ └── styles.xml
│ │ │ │ └── values-w820dp
│ │ │ │ │ └── dimens.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── handsomezhou
│ │ │ │ │ └── appsearch
│ │ │ │ │ ├── model
│ │ │ │ │ ├── SearchMode.java
│ │ │ │ │ ├── AppType.java
│ │ │ │ │ ├── PartnerView.java
│ │ │ │ │ ├── BaseAppInfo.java
│ │ │ │ │ ├── IconButtonData.java
│ │ │ │ │ └── IconButtonValue.java
│ │ │ │ │ ├── application
│ │ │ │ │ └── AppSearchApplication.java
│ │ │ │ │ ├── activity
│ │ │ │ │ ├── AboutActivity.java
│ │ │ │ │ ├── BaseSingleFragmentActivity.java
│ │ │ │ │ └── MainActivity.java
│ │ │ │ │ ├── Interface
│ │ │ │ │ └── OnTabChange.java
│ │ │ │ │ ├── dialog
│ │ │ │ │ ├── BaseProgressDialog.java
│ │ │ │ │ └── BaseDialog.java
│ │ │ │ │ ├── adapter
│ │ │ │ │ ├── CustomFragmentPagerAdapter.java
│ │ │ │ │ ├── CustomPartnerViewPagerAdapter.java
│ │ │ │ │ └── AppInfoAdapter.java
│ │ │ │ │ ├── view
│ │ │ │ │ ├── CustomViewPager.java
│ │ │ │ │ ├── NavigationBarLayout.java
│ │ │ │ │ ├── IconButtonView.java
│ │ │ │ │ └── SearchBox.java
│ │ │ │ │ ├── service
│ │ │ │ │ └── AppSearchService.java
│ │ │ │ │ ├── broadcastreceiver
│ │ │ │ │ └── AppChangedReceiver.java
│ │ │ │ │ └── fragment
│ │ │ │ │ ├── AboutFragment.java
│ │ │ │ │ └── BaseFragment.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── handsomezhou
│ │ │ │ └── appsearch
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── handsomezhou
│ │ │ └── appsearch
│ │ │ └── ExampleInstrumentedTest.java
│ ├── libs
│ │ ├── pinyin4j.jar
│ │ └── pinyinsearch.jar
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── .idea
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ ├── compiler.xml
│ └── misc.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
└── gradlew.bat
├── PinyinSearch
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ │ └── dimens.xml
│ │ │ │ └── layout
│ │ │ │ │ └── activity_main.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── handsomezhou
│ │ │ │ │ └── pinyinsearch
│ │ │ │ │ └── MainActivity.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── handsomezhou
│ │ │ │ └── pinyinsearch
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── handsomezhou
│ │ │ └── pinyinsearch
│ │ │ └── ExampleInstrumentedTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
├── pinyinsearch
│ ├── .gitignore
│ ├── libs
│ │ └── pinyin4j.jar
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── pinyinsearch
│ │ ├── util
│ │ └── CommonUtil.java
│ │ └── model
│ │ ├── PinyinBaseUnit.java
│ │ └── PinyinSearchUnit.java
├── settings.gradle
├── .idea
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ ├── compiler.xml
│ └── misc.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── README.md
├── build.gradle
├── gradle.properties
└── gradlew.bat
├── ContactsSearch
├── app
│ ├── .gitignore
│ ├── libs
│ │ ├── pinyin4j.jar
│ │ └── pinyinsearch.jar
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── call_icon.png
│ │ │ │ │ ├── dialj_ic1.png
│ │ │ │ │ ├── dialj_ic2.png
│ │ │ │ │ ├── dialx_ic1.png
│ │ │ │ │ ├── dialx_ic2.png
│ │ │ │ │ ├── num0_ic1.png
│ │ │ │ │ ├── num0_ic2.png
│ │ │ │ │ ├── num1_ic1.png
│ │ │ │ │ ├── num1_ic2.png
│ │ │ │ │ ├── num2_ic1.png
│ │ │ │ │ ├── num2_ic2.png
│ │ │ │ │ ├── num3_ic1.png
│ │ │ │ │ ├── num3_ic2.png
│ │ │ │ │ ├── num4_ic1.png
│ │ │ │ │ ├── num4_ic2.png
│ │ │ │ │ ├── num5_ic1.png
│ │ │ │ │ ├── num5_ic2.png
│ │ │ │ │ ├── num6_ic1.png
│ │ │ │ │ ├── num6_ic2.png
│ │ │ │ │ ├── num7_ic1.png
│ │ │ │ │ ├── num7_ic2.png
│ │ │ │ │ ├── num8_ic1.png
│ │ │ │ │ ├── num8_ic2.png
│ │ │ │ │ ├── num9_ic1.png
│ │ │ │ │ ├── num9_ic2.png
│ │ │ │ │ ├── sms_icon.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── search_press.png
│ │ │ │ │ ├── arrow_up_normal.png
│ │ │ │ │ ├── arrow_up_press.png
│ │ │ │ │ ├── delete_normal.png
│ │ │ │ │ ├── delete_pressed.png
│ │ │ │ │ ├── search_normal.png
│ │ │ │ │ ├── arrow_down_normal.png
│ │ │ │ │ ├── arrow_down_press.png
│ │ │ │ │ ├── dial_delete_press.png
│ │ │ │ │ ├── dial_delete_normal.png
│ │ │ │ │ ├── keyboard_hide_normal.png
│ │ │ │ │ ├── keyboard_hide_press.png
│ │ │ │ │ ├── keyboard_show_normal.png
│ │ │ │ │ ├── keyboard_show_press.png
│ │ │ │ │ ├── sort_icon_bg_click.png
│ │ │ │ │ ├── telephone_dial_close.png
│ │ │ │ │ ├── multiple_phone_unfold.png
│ │ │ │ │ ├── telephone_dial_close_normal.png
│ │ │ │ │ └── telephone_dial_close_press.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── layout
│ │ │ │ │ ├── activity_fragment.xml
│ │ │ │ │ ├── contacts_index_list_item.xml
│ │ │ │ │ ├── fragment_qwerty_search.xml
│ │ │ │ │ ├── contacts_index_view.xml
│ │ │ │ │ ├── fragment_main.xml
│ │ │ │ │ ├── fragment_t9_search.xml
│ │ │ │ │ ├── contacts_operation.xml
│ │ │ │ │ └── search_box.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── num0_ic_selector.xml
│ │ │ │ │ ├── num1_ic_selector.xml
│ │ │ │ │ ├── num2_ic_selector.xml
│ │ │ │ │ ├── num3_ic_selector.xml
│ │ │ │ │ ├── num4_ic_selector.xml
│ │ │ │ │ ├── num5_ic_selector.xml
│ │ │ │ │ ├── num6_ic_selector.xml
│ │ │ │ │ ├── num7_ic_selector.xml
│ │ │ │ │ ├── num8_ic_selector.xml
│ │ │ │ │ ├── num9_ic_selector.xml
│ │ │ │ │ ├── dialj_ic_selector.xml
│ │ │ │ │ ├── dialx_ic_selector.xml
│ │ │ │ │ ├── search_selector.xml
│ │ │ │ │ ├── arrow_up_selector.xml
│ │ │ │ │ ├── arrow_down_selector.xml
│ │ │ │ │ ├── search_box_delete_selector.xml
│ │ │ │ │ ├── dial_delete_selector.xml
│ │ │ │ │ ├── keyboard_hide_selector.xml
│ │ │ │ │ ├── keyboard_show_selector.xml
│ │ │ │ │ ├── telephone_dial_close_selector.xml
│ │ │ │ │ └── btn_grey_selector.xml
│ │ │ │ ├── values-v21
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ │ └── dimens.xml
│ │ │ │ └── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ └── styles.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── handsomezhou
│ │ │ │ │ └── contactssearch
│ │ │ │ │ ├── activity
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── T9SearchActivity.java
│ │ │ │ │ ├── QwertySearchActivity.java
│ │ │ │ │ └── BaseSingleFragmentActivity.java
│ │ │ │ │ ├── application
│ │ │ │ │ └── ContacstSearchApplication.java
│ │ │ │ │ ├── model
│ │ │ │ │ ├── BaseContacts.java
│ │ │ │ │ └── ContactsIndex.java
│ │ │ │ │ ├── util
│ │ │ │ │ └── ShareUtil.java
│ │ │ │ │ ├── fragment
│ │ │ │ │ ├── BaseFragment.java
│ │ │ │ │ └── MainFragment.java
│ │ │ │ │ ├── helper
│ │ │ │ │ └── ContactsIndexHelper.java
│ │ │ │ │ ├── adapter
│ │ │ │ │ └── ContactsIndexAdapter.java
│ │ │ │ │ └── view
│ │ │ │ │ └── SearchBox.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── handsomezhou
│ │ │ │ └── contactssearch
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── handsomezhou
│ │ │ └── contactssearch
│ │ │ └── ExampleInstrumentedTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── .idea
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── gradle.xml
│ ├── compiler.xml
│ └── misc.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
└── gradlew.bat
└── external_res
├── image
├── 0.png
├── 1.png
├── 2.png
├── 3.png
├── AppSearch.gif
└── ContactsSearch.gif
├── bin
├── AppSearch.apk
└── ContactsSearch.apk
└── jar
├── pinyin4j.jar
├── pinyin4j-2.5.0.jar
└── pinyinsearch.jar
/AppSearch/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PinyinSearch/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/ContactsSearch/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/AppSearch/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/ContactsSearch/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/PinyinSearch/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':pinyinsearch'
2 |
--------------------------------------------------------------------------------
/external_res/image/0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/0.png
--------------------------------------------------------------------------------
/external_res/image/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/1.png
--------------------------------------------------------------------------------
/external_res/image/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/2.png
--------------------------------------------------------------------------------
/external_res/image/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/3.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/external_res/bin/AppSearch.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/bin/AppSearch.apk
--------------------------------------------------------------------------------
/external_res/jar/pinyin4j.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/jar/pinyin4j.jar
--------------------------------------------------------------------------------
/AppSearch/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/AppSearch/app/libs/pinyin4j.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/libs/pinyin4j.jar
--------------------------------------------------------------------------------
/PinyinSearch/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/external_res/image/AppSearch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/AppSearch.gif
--------------------------------------------------------------------------------
/AppSearch/app/libs/pinyinsearch.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/libs/pinyinsearch.jar
--------------------------------------------------------------------------------
/ContactsSearch/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/external_res/bin/ContactsSearch.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/bin/ContactsSearch.apk
--------------------------------------------------------------------------------
/external_res/jar/pinyin4j-2.5.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/jar/pinyin4j-2.5.0.jar
--------------------------------------------------------------------------------
/external_res/jar/pinyinsearch.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/jar/pinyinsearch.jar
--------------------------------------------------------------------------------
/ContactsSearch/app/libs/pinyin4j.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/libs/pinyin4j.jar
--------------------------------------------------------------------------------
/external_res/image/ContactsSearch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/external_res/image/ContactsSearch.gif
--------------------------------------------------------------------------------
/ContactsSearch/app/libs/pinyinsearch.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/libs/pinyinsearch.jar
--------------------------------------------------------------------------------
/AppSearch/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/libs/pinyin4j.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/pinyinsearch/libs/pinyin4j.jar
--------------------------------------------------------------------------------
/PinyinSearch/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ContactsSearch/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num0_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num0_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num0_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num0_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num1_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num1_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num1_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num1_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num2_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num2_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num2_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num2_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num3_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num3_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num3_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num3_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num4_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num4_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num4_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num4_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num5_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num5_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num5_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num5_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num6_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num6_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num6_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num6_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num7_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num7_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num7_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num7_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num8_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num8_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num8_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num8_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num9_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num9_ic1.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/num9_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/num9_ic2.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/model/SearchMode.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.model;
2 |
3 | public enum SearchMode {
4 | T9, QWERTY,
5 | }
6 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/back_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/back_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/back_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/back_pressed.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/search_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/search_press.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/delete_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/delete_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/delete_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/delete_pressed.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/search_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/search_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/call_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/call_icon.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialj_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dialx_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num0_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num0_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num0_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num0_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num1_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num1_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num1_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num1_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num2_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num2_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num2_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num2_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num3_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num3_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num3_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num3_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num4_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num4_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num4_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num4_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num5_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num5_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num5_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num5_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num6_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num6_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num6_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num6_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num7_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num7_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num7_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num7_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num8_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num8_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num8_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num8_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num9_ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num9_ic1.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num9_ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/num9_ic2.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/sms_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/sms_icon.png
--------------------------------------------------------------------------------
/PinyinSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/PinyinSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_press.png
--------------------------------------------------------------------------------
/ContactsSearch/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/search_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/search_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_press.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_up_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_up_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_up_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_up_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/delete_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/delete_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/delete_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/delete_pressed.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/search_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/search_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_down_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_down_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_down_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/arrow_down_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_press.png
--------------------------------------------------------------------------------
/AppSearch/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/model/AppType.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.model;
2 |
3 | public enum AppType {
4 | /*SYSTEM_APP,
5 | USER_APP,*/
6 | ALL_APP,
7 | }
8 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/dial_delete_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_hide_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/keyboard_show_press.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/sort_icon_bg_click.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/sort_icon_bg_click.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_normal.png
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/AppSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_press.png
--------------------------------------------------------------------------------
/ContactsSearch/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/multiple_phone_unfold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/multiple_phone_unfold.png
--------------------------------------------------------------------------------
/PinyinSearch/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_normal.png
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/handsomezhou/PinyinSearchLibrary/HEAD/ContactsSearch/app/src/main/res/mipmap-xxhdpi/telephone_dial_close_press.png
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/PinyinSearch/README.md:
--------------------------------------------------------------------------------
1 | #PinyinSearch
2 | The project just for generate pinyinsearch.jar
3 |
4 | ##build
5 | Terminal->gradlew build
6 |
7 | ##jar path
8 | PinyinSearch\pinyinsearch\build\libs\pinyinsearch.jar
9 |
10 | ##Depend
11 | PinyinSearchLibrary\PinyinSearch\pinyinsearch\libs\pinyin4j.jar
--------------------------------------------------------------------------------
/ContactsSearch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/PinyinSearch/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/activity_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/activity_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num0_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num1_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num2_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num3_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num4_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num5_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num6_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num7_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num8_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/num9_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/back_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/dialj_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/dialx_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num0_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num1_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num2_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num3_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num4_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num5_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num6_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num7_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num8_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/num9_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | dependencies {
4 | compile fileTree(include: ['*.jar'], dir: 'libs')
5 | compile files('libs/pinyin4j.jar')
6 | }
7 |
8 | tasks.withType(JavaCompile) {
9 | options.encoding = "UTF-8"
10 | }
11 |
12 | sourceCompatibility = "1.7"
13 | targetCompatibility = "1.7"
14 |
15 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/search_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/dialj_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/dialx_ic_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/search_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/search_box_delete_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/arrow_up_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/dial_delete_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/arrow_down_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/search_box_delete_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/keyboard_hide_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/keyboard_show_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/dial_delete_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PinyinSearch
3 | PinyinSearch:\nProvide data analysis methods, data matching method and so on for T9 pinyin search and Qwerty pinyin search in Java.
4 | \n\n https://github.com/handsomezhou/PinyinSearchLibrary
5 |
6 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/keyboard_hide_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/keyboard_show_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/telephone_dial_close_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/telephone_dial_close_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AppSearch/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/ContactsSearch/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/java/com/handsomezhou/pinyinsearch/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.pinyinsearch;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 |
6 | public class MainActivity extends Activity {
7 |
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | setContentView(R.layout.activity_main);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/application/AppSearchApplication.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.application;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 | public class AppSearchApplication extends Application {
7 | private static Context mContext;
8 |
9 | @Override
10 | public void onCreate() {
11 | super.onCreate();
12 | mContext = getApplicationContext();
13 |
14 | }
15 |
16 | public static Context getContext() {
17 | return mContext;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/AppSearch/app/src/test/java/com/handsomezhou/appsearch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/activity/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.activity;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | import com.handsomezhou.appsearch.fragment.AboutFragment;
6 |
7 | public class AboutActivity extends BaseSingleFragmentActivity {
8 |
9 | @Override
10 | protected Fragment createFragment() {
11 |
12 | return new AboutFragment();
13 | }
14 |
15 | @Override
16 | protected boolean isRealTimeLoadFragment() {
17 |
18 | return false;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/PinyinSearch/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/test/java/com/handsomezhou/pinyinsearch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.pinyinsearch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.activity;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | import com.handsomezhou.contactssearch.fragment.MainFragment;
6 |
7 |
8 | public class MainActivity extends BaseSingleFragmentActivity{
9 |
10 | @Override
11 | protected Fragment createFragment() {
12 | return new MainFragment();
13 | }
14 |
15 | @Override
16 | protected boolean isRealTimeLoadFragment() {
17 | return false;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/test/java/com/handsomezhou/contactssearch/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/application/ContacstSearchApplication.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.application;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 |
6 | public class ContacstSearchApplication extends Application {
7 | private static Context mContext;
8 |
9 | @Override
10 | public void onCreate() {
11 | super.onCreate();
12 | mContext=getApplicationContext();
13 | }
14 |
15 | public static Context getContextObject(){
16 | return mContext;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/activity/T9SearchActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.activity;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | import com.handsomezhou.contactssearch.fragment.T9SearchFragment;
6 |
7 | public class T9SearchActivity extends BaseSingleFragmentActivity{
8 |
9 | @Override
10 | protected Fragment createFragment() {
11 |
12 | return new T9SearchFragment();
13 | }
14 |
15 | @Override
16 | protected boolean isRealTimeLoadFragment() {
17 |
18 | return false;
19 | }}
20 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/drawable/icon_button_grid_item_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/activity/QwertySearchActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.activity;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | import com.handsomezhou.contactssearch.fragment.QwertySearchFragment;
6 |
7 | public class QwertySearchActivity extends BaseSingleFragmentActivity{
8 |
9 | @Override
10 | protected Fragment createFragment() {
11 |
12 | return new QwertySearchFragment();
13 | }
14 |
15 | @Override
16 | protected boolean isRealTimeLoadFragment() {
17 |
18 | return false;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/Interface/OnTabChange.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.Interface;
2 |
3 | /**
4 | *
5 | * listener tab change(from one tab change to other tab) and click current
6 | * tab(click current tab)
7 | */
8 | public interface OnTabChange {
9 | public enum TAB_CHANGE_STATE{
10 | TAB_SELECTED_UNFOCUSED,
11 | TAB_SELECTED_FOCUSED,
12 | TAB_UNSELECTED,
13 | }
14 |
15 | public void onChangeToTab(Object fromTab, Object toTab, TAB_CHANGE_STATE tabChangeState);
16 |
17 | public void onClickTab(Object currentTab, TAB_CHANGE_STATE tabChangeState);
18 | }
19 |
--------------------------------------------------------------------------------
/AppSearch/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.2'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/ContactsSearch/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.2'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/PinyinSearch/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.2'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/AppSearch/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ContactsSearch/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/PinyinSearch/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/contacts_index_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/model/PartnerView.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.model;
2 |
3 | import android.support.v4.app.Fragment;
4 |
5 | public class PartnerView {
6 | private Object mTag;
7 | private Fragment mFragment;
8 |
9 | public PartnerView(Object tag, Fragment fragment) {
10 | super();
11 | mTag = tag;
12 | mFragment = fragment;
13 | }
14 |
15 | public Object getTag() {
16 | return mTag;
17 | }
18 |
19 | public void setTag(Object tag) {
20 | mTag = tag;
21 | }
22 |
23 | public Fragment getFragment() {
24 | return mFragment;
25 | }
26 |
27 | public void setFragment(Fragment fragment) {
28 | mFragment = fragment;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/dialog/BaseProgressDialog.java:
--------------------------------------------------------------------------------
1 |
2 | package com.handsomezhou.appsearch.dialog;
3 |
4 | import com.handsomezhou.appsearch.R;
5 |
6 | import android.app.ProgressDialog;
7 | import android.content.Context;
8 |
9 | public class BaseProgressDialog extends ProgressDialog {
10 | public BaseProgressDialog(Context context) {
11 | super(context, R.style.progress_dialog);
12 |
13 | setCanceledOnTouchOutside(true);
14 | }
15 |
16 | public void show(String message) {
17 | this.setMessage(message);
18 | this.show();
19 | }
20 |
21 | public void hide() {
22 | this.dismiss();
23 |
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/AppSearch/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ContactsSearch/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/AppSearch/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\soft\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/ContactsSearch/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\soft\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/PinyinSearch/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\soft\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/PinyinSearch/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/AppSearch/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/PinyinSearch/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ContactsSearch/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/fragment_qwerty_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
17 |
18 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/adapter/CustomFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.adapter;
2 |
3 | import java.util.List;
4 |
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentManager;
7 | import android.support.v4.app.FragmentPagerAdapter;
8 |
9 | public class CustomFragmentPagerAdapter extends FragmentPagerAdapter {
10 | private List mFragments;
11 |
12 | public CustomFragmentPagerAdapter(FragmentManager fm,
13 | List fragments) {
14 | super(fm);
15 | mFragments = fragments;
16 | }
17 |
18 | @Override
19 | public Fragment getItem(int pos) {
20 | return mFragments.get(pos);
21 | }
22 |
23 | @Override
24 | public int getCount() {
25 | return mFragments.size();
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/AppSearch/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/drawable/btn_grey_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ContactsSearch/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/PinyinSearch/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 联系人搜索
3 | T9 search
4 | Qwerty search
5 | 联系人
6 | 无法读取到联系人数据,无法演示联系人搜索!
7 | 联系人详情
8 | 输入号码或拼音
9 | 输入号码或拼音
10 | 无相关搜索结果
11 | 正在加载联系人
12 | (%d个号码)
13 | 点击可展开
14 | 点击可隐藏
15 |
16 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/model/BaseContacts.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.model;
2 |
3 | public class BaseContacts implements Cloneable{
4 | private String mId;
5 | private String mName;
6 | private String mPhoneNumber;
7 |
8 | public String getId() {
9 | return mId;
10 | }
11 |
12 | public void setId(String id) {
13 | mId = id;
14 | }
15 |
16 | public String getName() {
17 | return mName;
18 | }
19 |
20 | public void setName(String name) {
21 | mName = name;
22 | }
23 |
24 | public String getPhoneNumber() {
25 | return mPhoneNumber;
26 | }
27 |
28 | public void setPhoneNumber(String phoneNumber) {
29 | mPhoneNumber = phoneNumber;
30 | }
31 |
32 | @Override
33 | protected Object clone() throws CloneNotSupportedException {
34 |
35 | return super.clone();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/dialog/BaseDialog.java:
--------------------------------------------------------------------------------
1 |
2 | package com.handsomezhou.appsearch.dialog;
3 |
4 | import android.app.AlertDialog;
5 | import android.content.Context;
6 | import android.view.View;
7 |
8 | import com.handsomezhou.appsearch.R;
9 |
10 | public abstract class BaseDialog extends AlertDialog {
11 | private int mViewSpacingLeft = 0;
12 | private int mViewSpacingTop = 0;
13 | private int mViewSpacingRight = 0;
14 | private int mViewSpacingBottom = 0;
15 |
16 | protected abstract View getView();
17 |
18 | public BaseDialog(Context context) {
19 |
20 | super(context, R.style.dialog);
21 | View view = getView();
22 | new Builder(getContext()).create();
23 |
24 | this.setView(view, mViewSpacingLeft, mViewSpacingTop, mViewSpacingRight, mViewSpacingBottom);
25 | this.setCanceledOnTouchOutside(false);
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/util/ShareUtil.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.util;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 |
6 | /**
7 | * share content by all kinds of ways
8 | * @author handsomezhou
9 | * @date 2015-01-23
10 | */
11 | public class ShareUtil {
12 | /**
13 | * share text by sms
14 | *
15 | * @param context
16 | * @param RecipientsPhoneNumber phoneNumberformat:"phoneNumber1;phoneNumber2;..."
17 | * @param textContent
18 | *
19 | */
20 | public static void shareTextBySms(Context context,
21 | String RecipientsPhoneNumber, String textContent) {
22 | Intent share = new Intent(Intent.ACTION_VIEW);
23 |
24 | share.putExtra("address", RecipientsPhoneNumber);
25 | share.putExtra("sms_body", textContent);
26 | share.setType("vnd.android-dir/mms-sms");
27 |
28 | context.startActivity(share);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/AppSearch/app/src/androidTest/java/com/handsomezhou/appsearch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.handsomezhou.appsearch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/adapter/CustomPartnerViewPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.adapter;
2 |
3 | import java.util.List;
4 |
5 | import com.handsomezhou.appsearch.model.PartnerView;
6 |
7 | import android.support.v4.app.Fragment;
8 | import android.support.v4.app.FragmentManager;
9 | import android.support.v4.app.FragmentPagerAdapter;
10 |
11 | public class CustomPartnerViewPagerAdapter extends FragmentPagerAdapter {
12 | List mPartnerViews;
13 |
14 | public CustomPartnerViewPagerAdapter(FragmentManager fm,
15 | List partnerViews) {
16 | super(fm);
17 | mPartnerViews=partnerViews;
18 | }
19 |
20 | @Override
21 | public Fragment getItem(int pos) {
22 | PartnerView partnerView=mPartnerViews.get(pos);
23 | return partnerView.getFragment();
24 | }
25 |
26 | @Override
27 | public int getCount() {
28 |
29 | return mPartnerViews.size();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/PinyinSearch/app/src/androidTest/java/com/handsomezhou/pinyinsearch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.pinyinsearch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.handsomezhou.pinyinsearch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/androidTest/java/com/handsomezhou/contactssearch/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.handsomezhou.contactssearch", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #FFFFFFFF
8 | #FFF8F8FF
9 | #ADD8E6
10 | #00FFFFFF
11 | #FF333333
12 | #FF1C1C1C
13 | #FFBEBEBE
14 | #D0363636
15 | #30777777
16 | #30474747
17 | #00BFFF
18 | #98F5FF
19 | #00CDCD
20 | #FF8C00
21 |
22 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
17 |
18 |
22 |
23 |
--------------------------------------------------------------------------------
/AppSearch/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "com.handsomezhou.appsearch"
8 | minSdkVersion 9
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.0.0'
28 | testCompile 'junit:junit:4.12'
29 | }
30 |
--------------------------------------------------------------------------------
/PinyinSearch/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "com.handsomezhou.pinyinsearch"
8 | minSdkVersion 9
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.0.0'
28 | testCompile 'junit:junit:4.12'
29 | }
30 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/icon_button_grid_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/contacts_index_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/navigation_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
15 |
16 |
22 |
23 |
25 |
26 |
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/src/main/java/com/pinyinsearch/util/CommonUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 handsomezhou
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.pinyinsearch.util;
18 |
19 | public class CommonUtil {
20 |
21 | public static boolean isEmpty(String value){
22 | boolean empty=true;
23 |
24 | if((null==value)||(value.length()<=0)){
25 | empty=true;
26 | }else{
27 | empty=false;
28 | }
29 |
30 | return empty;
31 | }
32 |
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
8 | #FF000000
9 | #FFFFFFFF
10 | #FFF8F8FF
11 | #FFFFFAFA
12 | #FFF5F5F5
13 | #FF00BFFF
14 | #BBADD8E6
15 | #FF1E90FF
16 | #FF2E8B57
17 | #00FFFFFF
18 | #FFBEBEBE
19 | #D0363636
20 | #FF696969
21 |
22 |
27 | #FFFF8C00
28 |
29 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
26 |
27 |
--------------------------------------------------------------------------------
/ContactsSearch/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "24.0.2"
6 | defaultConfig {
7 | applicationId "com.handsomezhou.contactssearch"
8 | minSdkVersion 14
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.0.0'
28 | testCompile 'junit:junit:4.12'
29 |
30 | /**
31 | * 一行代码搞定漂亮的Android6.0权限
32 | * https://github.com/yewei02538/HiPermission
33 | */
34 | compile 'me.weyye.hipermission:library:1.0.7'
35 | }
36 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/view/CustomViewPager.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.view;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Context;
5 | import android.support.v4.view.ViewPager;
6 | import android.util.AttributeSet;
7 | import android.view.MotionEvent;
8 |
9 | public class CustomViewPager extends ViewPager {
10 | private boolean mPagingEnabled = true;
11 |
12 | public CustomViewPager(Context context) {
13 | super(context);
14 | }
15 |
16 | public CustomViewPager(Context context, AttributeSet attrs) {
17 | super(context, attrs);
18 | }
19 |
20 | @SuppressLint("ClickableViewAccessibility")
21 | @Override
22 | public boolean onTouchEvent(MotionEvent event) {
23 | return this.mPagingEnabled && super.onTouchEvent(event);
24 | }
25 |
26 | @Override
27 | public boolean onInterceptTouchEvent(MotionEvent event) {
28 | return this.mPagingEnabled && super.onInterceptTouchEvent(event);
29 | }
30 |
31 | public void setPagingEnabled(boolean pagingEnabled) {
32 | this.mPagingEnabled = pagingEnabled;
33 | }
34 |
35 | public boolean isPagingEnabled() {
36 | return mPagingEnabled;
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/model/BaseAppInfo.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.model;
2 |
3 | import android.graphics.drawable.Drawable;
4 |
5 | public class BaseAppInfo implements Cloneable{
6 | private String mLabel;
7 | private Drawable mIcon;
8 | private String mPackageName;
9 |
10 |
11 | public BaseAppInfo() {
12 | super();
13 | // TODO Auto-generated constructor stub
14 | }
15 |
16 | public BaseAppInfo(String label, Drawable icon, String packageName) {
17 | super();
18 | mLabel = label;
19 | mIcon = icon;
20 | mPackageName = packageName;
21 | }
22 |
23 | @Override
24 | protected Object clone() throws CloneNotSupportedException {
25 | // TODO Auto-generated method stub
26 | return super.clone();
27 | }
28 |
29 | public String getLabel() {
30 | return mLabel;
31 | }
32 |
33 | public void setLabel(String label) {
34 | mLabel = label;
35 | }
36 |
37 | public Drawable getIcon() {
38 | return mIcon;
39 | }
40 |
41 | public void setIcon(Drawable icon) {
42 | mIcon = icon;
43 | }
44 |
45 | public String getPackageName() {
46 | return mPackageName;
47 | }
48 |
49 | public void setPackageName(String packageName) {
50 | mPackageName = packageName;
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/model/IconButtonData.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.model;
2 |
3 | import android.content.Context;
4 |
5 | import com.handsomezhou.appsearch.view.IconButtonView;
6 |
7 |
8 |
9 | public class IconButtonData {
10 | private IconButtonValue mIconButtonValue;
11 | private IconButtonView mIconButtonView;
12 |
13 | public IconButtonData(Context context,IconButtonValue iconButtonValue) {
14 | super();
15 | mIconButtonValue = iconButtonValue;
16 | mIconButtonView = new IconButtonView(context,iconButtonValue.isHideIcon());
17 | mIconButtonView.getTitleTv().setText(mIconButtonValue.getText());;
18 | mIconButtonView.getIconIv().setBackgroundResource(mIconButtonValue.getIconUnselected());
19 | }
20 |
21 | public IconButtonValue getIconButtonValue() {
22 | return mIconButtonValue;
23 | }
24 |
25 | public void setIconButtonValue(IconButtonValue iconButtonValue) {
26 | mIconButtonValue = iconButtonValue;
27 | }
28 |
29 | public IconButtonView getIconButtonView() {
30 | return mIconButtonView;
31 | }
32 |
33 | public void setIconButtonView(IconButtonView iconButtonView) {
34 | mIconButtonView = iconButtonView;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/AppSearch/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 1.8
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/PinyinSearch/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 1.8
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/ContactsSearch/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 1.8
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/fragment_qwerty_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
16 |
17 |
26 |
27 |
28 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/model/ContactsIndex.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.model;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | /**
7 | * @Description
8 | * Contacts classified according to '#','A' ~ 'Z'.
9 | * The variable of ContactsIndex will save a certain type of contacts.
10 | * @author handsomezhou
11 | * @date 2014-12-15
12 | */
13 | public class ContactsIndex {
14 | private static final String INDEX_KEY_DEFAULT_VALUE="#";
15 | String mIndexKey;//'#','A'~'Z'
16 | List mContacts;
17 |
18 | public ContactsIndex(){
19 | mIndexKey=INDEX_KEY_DEFAULT_VALUE;
20 | mContacts = new ArrayList();
21 | }
22 |
23 | public ContactsIndex(String indexKey) {
24 |
25 | mIndexKey = indexKey;
26 | mContacts = new ArrayList();
27 | }
28 |
29 | public String getIndexKey() {
30 | return mIndexKey;
31 | }
32 |
33 | public void setIndexKey(String indexKey) {
34 | mIndexKey = indexKey;
35 | }
36 |
37 | public List getContacts() {
38 | return mContacts;
39 | }
40 |
41 | /*public void setContacts(List contacts) {
42 | mContacts = contacts;
43 | }*/
44 |
45 | public boolean addContacts(Contacts contacts){
46 | if(null==mContacts){
47 | mContacts=new ArrayList();
48 | }
49 |
50 | if(null==contacts){
51 | return false;
52 | }
53 |
54 | return mContacts.add(contacts);
55 | }
56 |
57 | public void clearContacts(){
58 | if(null==mContacts){
59 | return;
60 | }
61 | mContacts.clear();
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Settings
4 | 应用搜索
5 | T9搜索
6 | 全键盘搜索
7 | 输入应用名称
8 | 应用信息加载中...
9 | 无相关搜索结果
10 | 该应用无法被直接启动
11 | 该应用已经打开
12 | 无法卸载自己
13 |
14 |
15 | 退出应用时是否提示
16 | 再按一次退出%s
17 |
18 |
19 |
20 |
21 | 关于
22 | 版本信息
23 | :
24 | 作者
25 | handsomezhou
26 | 联系方式
27 | quanjunzhou@gmail.com
28 | Github主页
29 | https://github.com/handsomezhou/
30 |
31 |
32 |
33 |
34 | 长按卸载应用
35 |
36 |
37 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 | 54dp
8 | 32dp
9 | 32dp
10 | 12dp
11 | 12dp
12 | 4dp
13 | 4dp
14 | 4dp
15 | 4dp
16 | 4dp
17 | 4dp
18 | 4dp
19 | 4dp
20 | 4dp
21 | 4dp
22 | 54dp
23 | 54dp
24 | 54dp
25 | 16sp
26 | 24sp
27 | 32dp
28 | 32dp
29 | 12sp
30 | 54dp
31 | 54dp
32 | 44dp
33 | 54dp
34 |
35 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/service/AppSearchService.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.service;
2 |
3 | import android.app.Service;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.os.IBinder;
7 | import android.util.Log;
8 |
9 | import com.handsomezhou.appsearch.helper.AppInfoHelper;
10 |
11 | public class AppSearchService extends Service{
12 | private static final String TAG=AppSearchService.class.getSimpleName();
13 | public static final String ACTION_APP_SEARCH_SERVICE="com.handsomezhou.appsearch.service.APP_SEARCH_SERVICE";
14 | @Override
15 | public IBinder onBind(Intent intent) {
16 | // TODO Auto-generated method stub
17 | return null;
18 | }
19 |
20 | @Override
21 | public void onCreate() {
22 | Log.i(TAG, "onCreate");
23 | super.onCreate();
24 |
25 | }
26 |
27 | @Override
28 | public int onStartCommand(Intent intent, int flags, int startId) {
29 | AppInfoHelper.getInstance().startLoadAppInfo();
30 | Log.i(TAG, "onStartCommand");
31 |
32 |
33 | return START_STICKY;
34 | }
35 |
36 | @Override
37 | public void onDestroy() {
38 | Log.i(TAG, "onDestroy");
39 | startAppSearchService();
40 | super.onDestroy();
41 | }
42 |
43 |
44 |
45 | private void startAppSearchService(){
46 | Intent intent=new Intent();
47 | intent.setAction(ACTION_APP_SEARCH_SERVICE);
48 | startService(intent);
49 | }
50 |
51 | public static void startAppSearchService(Context context){
52 | Intent intent=new Intent(context,AppSearchService.class);
53 | intent.setAction(AppSearchService.ACTION_APP_SEARCH_SERVICE);
54 | context.startService(intent);
55 |
56 |
57 | }
58 |
59 | public static void stopAppSearchService(Context context){
60 | Intent intent=new Intent(context,AppSearchService.class);
61 | context.stopService(intent);
62 | }
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 | 54dp
8 | 32dp
9 | 32dp
10 | 12dp
11 | 12dp
12 | 54dp
13 | 54dp
14 | 54dp
15 | 4dp
16 | 4dp
17 | 4dp
18 | 4dp
19 | 4dp
20 | 4dp
21 | 4dp
22 | 4dp
23 | 4dp
24 | 4dp
25 | 48dp
26 | 192dp
27 | 36dp
28 | 36dp
29 | 36dp
30 | 36dp
31 | 24sp
32 | 24sp
33 | 1dp
34 | 36dp
35 | 36dp
36 | 54dp
37 | 3dp
38 |
39 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/broadcastreceiver/AppChangedReceiver.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.broadcastreceiver;
2 |
3 | import com.handsomezhou.appsearch.helper.AppInfoHelper;
4 | import com.handsomezhou.appsearch.service.AppSearchService;
5 |
6 | import android.content.BroadcastReceiver;
7 | import android.content.Context;
8 | import android.content.Intent;
9 | import android.util.Log;
10 |
11 | public class AppChangedReceiver extends BroadcastReceiver {
12 | private static final String TAG="AppChangedReceiver";
13 | @Override
14 | public void onReceive(Context context, Intent intent) {
15 | //Toast.makeText(context, "AppChangedReceiver["+intent.getAction()+"]", Toast.LENGTH_LONG).show();
16 | if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED)) {
17 | //Toast.makeText(context, "AppChangedReceiver ACTION_PACKAGE_ADDED", Toast.LENGTH_LONG).show();
18 | Log.i(TAG, "ACTION_PACKAGE_ADDED");
19 |
20 | String packageName = intent.getData().getSchemeSpecificPart();
21 | if(false==AppInfoHelper.getInstance().isAppExist(packageName)){
22 | AppInfoHelper.getInstance().setAppInfoChanged(true);
23 | }
24 |
25 | AppSearchService.startAppSearchService(context);
26 | } else if (intent.getAction().equals(Intent.ACTION_PACKAGE_CHANGED)) {
27 | //Toast.makeText(context, "AppChangedReceiver ACTION_PACKAGE_CHANGED", Toast.LENGTH_LONG).show();
28 | Log.i(TAG, "ACTION_PACKAGE_CHANGED");
29 | //AppInfoHelper.getInstance().setAppInfoChanged(true);
30 | AppSearchService.startAppSearchService(context);
31 | } else if (intent.getAction().equals(Intent.ACTION_PACKAGE_REMOVED)) {
32 | //Toast.makeText(context, "AppChangedReceiver ACTION_PACKAGE_REMOVED", Toast.LENGTH_LONG).show();
33 | Log.i(TAG, "ACTION_PACKAGE_REMOVED");
34 | //AppInfoHelper.getInstance().setAppInfoChanged(true);
35 | AppSearchService.startAppSearchService(context);
36 | }
37 | }
38 |
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/app_info_grid_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/fragment_t9_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
25 |
26 |
27 |
35 |
36 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/fragment/AboutFragment.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.fragment;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.TextView;
7 |
8 | import com.handsomezhou.appsearch.R;
9 | import com.handsomezhou.appsearch.util.AppUtil;
10 | import com.handsomezhou.appsearch.util.ViewUtil;
11 | import com.handsomezhou.appsearch.view.NavigationBarLayout;
12 | import com.handsomezhou.appsearch.view.NavigationBarLayout.OnNavigationBarLayout;
13 |
14 | public class AboutFragment extends BaseFragment implements
15 | OnNavigationBarLayout {
16 |
17 | private NavigationBarLayout mNavigationBarLayout;
18 | private String mTitle;
19 | private String mVersionName;
20 |
21 | @Override
22 | public void onResume() {
23 | refreshView();
24 | super.onResume();
25 | }
26 |
27 | @Override
28 | protected void initData() {
29 | setContext(getActivity());
30 |
31 | mTitle = getContext().getString(R.string.about);
32 |
33 | mVersionName = getContext().getString(R.string.version_name)
34 | + getContext().getString(R.string.colon)
35 | + AppUtil.getVersionName(getContext(), getContext()
36 | .getPackageName());
37 | }
38 |
39 | @Override
40 | protected View initView(LayoutInflater inflater, ViewGroup container) {
41 | View view = inflater.inflate(R.layout.fragment_about, container, false);
42 | mNavigationBarLayout = (NavigationBarLayout) view
43 | .findViewById(R.id.navigation_bar_layout);
44 | mNavigationBarLayout.setOnNavigationBarLayout(this);
45 | mNavigationBarLayout.setTitle(mTitle);
46 |
47 | return view;
48 | }
49 |
50 | @Override
51 | protected void initListener() {
52 |
53 | return;
54 | }
55 |
56 | /* Start: OnNavigationBarLayout */
57 | @Override
58 | public void onBack() {
59 | back();
60 |
61 | }
62 |
63 | /* End: OnNavigationBarLayout */
64 |
65 | private void refreshView() {
66 |
67 |
68 |
69 | }
70 |
71 | private void back() {
72 | getActivity().finish();
73 | }
74 |
75 | }
76 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/fragment/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.fragment;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.handsomezhou.appsearch.util.ViewUtil;
11 |
12 | public abstract class BaseFragment extends Fragment {
13 | private Context mContext;
14 | private boolean mHideImeTouchOutsideEditText=true;
15 |
16 | @Override
17 | public void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | initData();
20 | }
21 |
22 | @Override
23 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
24 | Bundle savedInstanceState) {
25 |
26 | View view =initView(inflater,container);
27 | if(isHideImeTouchOutsideEditText()){
28 | ViewUtil.setHideIme(getActivity(), view);
29 | }
30 |
31 | initListener();
32 |
33 | return view;
34 | }
35 |
36 | /**
37 | * init data in onCreate()
38 | *
39 | * initData()->initView()->initListener()
40 | */
41 | protected abstract void initData();
42 |
43 | /**
44 | * init view in onCreate()
45 | *
46 | * initData()->initView()->initListener()
47 | * @return
48 | */
49 | protected abstract View initView(LayoutInflater inflater, ViewGroup container);
50 |
51 |
52 | /**
53 | * init Listener in onCreate()
54 | *
55 | * initData()->initView()->initListener()
56 | */
57 | protected abstract void initListener();
58 |
59 | public Context getContext() {
60 | return mContext;
61 | }
62 |
63 | public void setContext(Context context) {
64 | mContext = context;
65 | }
66 |
67 | public boolean isHideImeTouchOutsideEditText() {
68 | return mHideImeTouchOutsideEditText;
69 | }
70 |
71 | public void setHideImeTouchOutsideEditText(boolean hideImeTouchOutsideEditText) {
72 | mHideImeTouchOutsideEditText = hideImeTouchOutsideEditText;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/src/main/java/com/pinyinsearch/model/PinyinBaseUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 handsomezhou
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.pinyinsearch.model;
18 | /**
19 | * As a single Pinyin units
20 | * for example:
21 | * "hao" ===>mOriginalString="hao"; mPinyin="hao";mNumber="426";
22 | * "???hao" ===>mOriginalString="???hao"; mPinyin="???hao";mNumber="???426";
23 | * "周" ===>mOriginalString="周"; mPinyin="zhou";mNumber="9468";
24 | */
25 | public class PinyinBaseUnit implements Cloneable{
26 | private String mOriginalString;
27 | private String mPinyin;
28 | private String mNumber;
29 |
30 | public PinyinBaseUnit(){
31 |
32 | }
33 |
34 | public PinyinBaseUnit(String originalString,String pinyin, String number) {
35 | super();
36 | mOriginalString=originalString;
37 | mPinyin = pinyin;
38 | mNumber = number;
39 | }
40 |
41 | public String getOriginalString() {
42 | return mOriginalString;
43 | }
44 |
45 | public void setOriginalString(String originalString) {
46 | mOriginalString = originalString;
47 | }
48 |
49 | public String getPinyin() {
50 | return mPinyin;
51 | }
52 |
53 | public void setPinyin(String pinyin) {
54 | mPinyin = pinyin;
55 | }
56 |
57 | public String getNumber() {
58 | return mNumber;
59 | }
60 |
61 | public void setNumber(String number) {
62 | mNumber = number;
63 | }
64 |
65 | @Override
66 | protected Object clone() throws CloneNotSupportedException {
67 | return super.clone();
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/fragment/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.fragment;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.handsomezhou.contactssearch.util.ViewUtil;
11 |
12 | public abstract class BaseFragment extends Fragment {
13 | private Context mContext;
14 | private boolean mHideImeTouchOutsideEditText=true;
15 |
16 | @Override
17 | public void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | initData();
20 | }
21 |
22 | @Override
23 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
24 | Bundle savedInstanceState) {
25 |
26 | View view =initView(inflater,container);
27 | if(isHideImeTouchOutsideEditText()){
28 | ViewUtil.setHideIme(getActivity(), view);
29 | }
30 |
31 | initListener();
32 |
33 | return view;
34 | }
35 |
36 | /**
37 | * init data in onCreate()
38 | *
39 | * initData()->initView()->initListener()
40 | */
41 | protected abstract void initData();
42 |
43 | /**
44 | * init view in onCreate()
45 | *
46 | * initData()->initView()->initListener()
47 | * @return
48 | */
49 | protected abstract View initView(LayoutInflater inflater, ViewGroup container);
50 |
51 |
52 | /**
53 | * init Listener in onCreate()
54 | *
55 | * initData()->initView()->initListener()
56 | */
57 | protected abstract void initListener();
58 |
59 | public Context getContext() {
60 | return mContext;
61 | }
62 |
63 | public void setContext(Context context) {
64 | mContext = context;
65 | }
66 |
67 | public boolean isHideImeTouchOutsideEditText() {
68 | return mHideImeTouchOutsideEditText;
69 | }
70 |
71 | public void setHideImeTouchOutsideEditText(boolean hideImeTouchOutsideEditText) {
72 | mHideImeTouchOutsideEditText = hideImeTouchOutsideEditText;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/activity/BaseSingleFragmentActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.activity;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.support.v4.app.FragmentManager;
8 | import android.view.Window;
9 |
10 | import com.handsomezhou.appsearch.R;
11 |
12 | public abstract class BaseSingleFragmentActivity extends FragmentActivity {
13 | private Context mContext;
14 | private boolean mFullScreen = true;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContext(this);
20 | if (true == isFullScreen()) {
21 | requestWindowFeature(Window.FEATURE_NO_TITLE);
22 | }
23 | setContentView(R.layout.activity_fragment);
24 |
25 | // load fragment
26 | loadFragment();
27 |
28 | }
29 |
30 | @Override
31 | protected void onDestroy() {
32 | // TODO Auto-generated method stub
33 | super.onDestroy();
34 | }
35 |
36 | protected abstract Fragment createFragment();
37 |
38 | /**
39 | * return true, fragment was loaded in real-time.Otherwise,fragment was loaded non-real time.
40 | * @return
41 | */
42 | protected abstract boolean isRealTimeLoadFragment();
43 |
44 | public Context getContext() {
45 | return mContext;
46 | }
47 |
48 | public void setContext(Context context) {
49 | mContext = context;
50 | }
51 |
52 | public boolean isFullScreen() {
53 | return mFullScreen;
54 | }
55 |
56 | public void setFullScreen(boolean fullScreen) {
57 | mFullScreen = fullScreen;
58 | }
59 |
60 | private void loadFragment() {
61 | FragmentManager fm = getSupportFragmentManager();
62 | Fragment fragment = fm.findFragmentById(R.id.fragment_container);
63 | if (false == isRealTimeLoadFragment()) {
64 | if (null == fragment) {
65 | fragment = createFragment();
66 | fm.beginTransaction().add(R.id.fragment_container, fragment)
67 | .commit();
68 | }
69 | } else {
70 | fragment = createFragment();
71 | fm.beginTransaction().replace(R.id.fragment_container, fragment)
72 | .commit();
73 | }
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/activity/BaseSingleFragmentActivity.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.activity;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.support.v4.app.FragmentManager;
8 | import android.view.Window;
9 |
10 | import com.handsomezhou.contactssearch.R;
11 |
12 | public abstract class BaseSingleFragmentActivity extends FragmentActivity {
13 | private Context mContext;
14 | private boolean mFullScreen = true;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContext(this);
20 | if (true == isFullScreen()) {
21 | requestWindowFeature(Window.FEATURE_NO_TITLE);
22 | }
23 | setContentView(R.layout.activity_fragment);
24 |
25 | // load fragment
26 | loadFragment();
27 |
28 | }
29 |
30 | @Override
31 | protected void onDestroy() {
32 | // TODO Auto-generated method stub
33 | super.onDestroy();
34 | }
35 |
36 | protected abstract Fragment createFragment();
37 |
38 | /**
39 | * return true, fragment was loaded in real-time.Otherwise,fragment was loaded non-real time.
40 | * @return
41 | */
42 | protected abstract boolean isRealTimeLoadFragment();
43 |
44 | public Context getContext() {
45 | return mContext;
46 | }
47 |
48 | public void setContext(Context context) {
49 | mContext = context;
50 | }
51 |
52 | public boolean isFullScreen() {
53 | return mFullScreen;
54 | }
55 |
56 | public void setFullScreen(boolean fullScreen) {
57 | mFullScreen = fullScreen;
58 | }
59 |
60 | private void loadFragment() {
61 | FragmentManager fm = getSupportFragmentManager();
62 | Fragment fragment = fm.findFragmentById(R.id.fragment_container);
63 | if (false == isRealTimeLoadFragment()) {
64 | if (null == fragment) {
65 | fragment = createFragment();
66 | fm.beginTransaction().add(R.id.fragment_container, fragment)
67 | .commit();
68 | }
69 | } else {
70 | fragment = createFragment();
71 | fm.beginTransaction().replace(R.id.fragment_container, fragment)
72 | .commit();
73 | }
74 |
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/view/NavigationBarLayout.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.view;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.RelativeLayout;
9 | import android.widget.TextView;
10 |
11 | import com.handsomezhou.appsearch.R;
12 |
13 | public class NavigationBarLayout extends RelativeLayout {
14 | private Context mContext;
15 | private View mNavigationBarView;
16 | private Button mBackBtn;
17 | private TextView mTitleTv;
18 |
19 | private String mTitle;
20 |
21 | private OnNavigationBarLayout mOnNavigationBarLayout;
22 |
23 | public interface OnNavigationBarLayout{
24 | void onBack();
25 | }
26 |
27 | public NavigationBarLayout(Context context, AttributeSet attrs) {
28 | super(context, attrs);
29 | mContext=context;
30 | initView();
31 | initData();
32 | initListener();
33 | }
34 |
35 | public OnNavigationBarLayout getOnNavigationBarLayout() {
36 | return mOnNavigationBarLayout;
37 | }
38 |
39 | public void setOnNavigationBarLayout(OnNavigationBarLayout onNavigationBarLayout) {
40 | mOnNavigationBarLayout = onNavigationBarLayout;
41 | }
42 |
43 | public String getTitle() {
44 | return mTitle;
45 | }
46 |
47 | public void setTitle(String title) {
48 | mTitle = title;
49 | mTitleTv.setText(mTitle);
50 | }
51 |
52 | private void initView(){
53 | LayoutInflater inflater = (LayoutInflater) mContext
54 | .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
55 | mNavigationBarView=(View) inflater.inflate(R.layout.navigation_bar, this);
56 | mBackBtn=(Button) mNavigationBarView.findViewById(R.id.back_btn);
57 | mTitleTv=(TextView) mNavigationBarView.findViewById(R.id.title_text_view);
58 | return;
59 | }
60 |
61 | private void initData(){
62 |
63 | return;
64 | }
65 |
66 | private void initListener(){
67 | mBackBtn.setOnClickListener(new OnClickListener() {
68 |
69 | @Override
70 | public void onClick(View v) {
71 | if(null!=mOnNavigationBarLayout){
72 | mOnNavigationBarLayout.onBack();
73 | }
74 |
75 | }
76 | });
77 | return;
78 | }
79 |
80 |
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
30 |
31 |
32 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/PinyinSearch/pinyinsearch/src/main/java/com/pinyinsearch/model/PinyinSearchUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 handsomezhou
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.pinyinsearch.model;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | public class PinyinSearchUnit implements Cloneable{
23 | private String mBaseData; //the original string
24 | private List mPinyinUnits;
25 | private StringBuffer mMatchKeyword;//the sub string of base data which search by key word
26 |
27 |
28 | public PinyinSearchUnit() {
29 | super();
30 | initPinyinSearchUnit();
31 | }
32 |
33 | public PinyinSearchUnit(String baseData) {
34 | super();
35 | mBaseData = baseData;
36 | initPinyinSearchUnit();
37 | }
38 |
39 | public String getBaseData() {
40 | return mBaseData;
41 | }
42 |
43 | public void setBaseData(String baseData) {
44 | mBaseData = baseData;
45 | }
46 |
47 | public List getPinyinUnits() {
48 | return mPinyinUnits;
49 | }
50 |
51 | public void setPinyinUnits(List pinyinUnits) {
52 | mPinyinUnits = pinyinUnits;
53 | }
54 |
55 | public StringBuffer getMatchKeyword() {
56 | return mMatchKeyword;
57 | }
58 |
59 | public void setMatchKeyword(StringBuffer matchKeyword) {
60 | mMatchKeyword = matchKeyword;
61 | }
62 |
63 |
64 | @Override
65 | public Object clone() throws CloneNotSupportedException {
66 | PinyinSearchUnit obj=(PinyinSearchUnit) super.clone();
67 | obj.mPinyinUnits=new ArrayList();
68 | for(PinyinUnit pu:mPinyinUnits){
69 | obj.mPinyinUnits.add((PinyinUnit) pu.clone());
70 | }
71 |
72 | return obj;
73 | }
74 |
75 | private void initPinyinSearchUnit(){
76 | mPinyinUnits=new ArrayList();
77 | mMatchKeyword=new StringBuffer();
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/adapter/AppInfoAdapter.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.adapter;
2 |
3 | import java.util.List;
4 |
5 | import android.annotation.SuppressLint;
6 | import android.content.Context;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.ArrayAdapter;
11 | import android.widget.ImageView;
12 | import android.widget.TextView;
13 |
14 | import com.handsomezhou.appsearch.R;
15 | import com.handsomezhou.appsearch.model.AppInfo;
16 | import com.handsomezhou.appsearch.util.ViewUtil;
17 |
18 | public class AppInfoAdapter extends ArrayAdapter {
19 | private Context mContext;
20 | private int mTextViewResourceId;
21 |
22 | private List mAppInfos;
23 |
24 | public AppInfoAdapter(Context context, int textViewResourceId,
25 | List appInfos) {
26 | super(context, textViewResourceId, appInfos);
27 | ;
28 | mContext = context;
29 | mTextViewResourceId = textViewResourceId;
30 | mAppInfos = appInfos;
31 |
32 | }
33 |
34 | @SuppressLint("NewApi")
35 | @Override
36 | public View getView(int position, View convertView, ViewGroup parent) {
37 | View view = null;
38 | ViewHolder viewHolder;
39 | AppInfo appInfo = getItem(position);
40 | if (null == convertView) {
41 | view = LayoutInflater.from(mContext).inflate(mTextViewResourceId,
42 | null);
43 | viewHolder = new ViewHolder();
44 | viewHolder.mAlphabetTv = (TextView) view
45 | .findViewById(R.id.alphabet_text_view);
46 | viewHolder.mIconIv = (ImageView) view
47 | .findViewById(R.id.icon_image_view);
48 | viewHolder.mLabelTv = (TextView) view
49 | .findViewById(R.id.label_text_view);
50 | view.setTag(viewHolder);
51 | } else {
52 | view = convertView;
53 | viewHolder = (ViewHolder) view.getTag();
54 | }
55 |
56 | viewHolder.mIconIv.setBackground(appInfo.getIcon());
57 | switch (appInfo.getSearchByType()) {
58 | case SearchByLabel:
59 | ViewUtil.showTextHighlight(viewHolder.mLabelTv, appInfo.getLabel(),
60 | appInfo.getMatchKeywords().toString());
61 |
62 | break;
63 | case SearchByNull:
64 | ViewUtil.showTextNormal(viewHolder.mLabelTv, appInfo.getLabel());
65 | break;
66 | default:
67 | break;
68 | }
69 |
70 | return view;
71 | }
72 |
73 | private class ViewHolder {
74 | TextView mAlphabetTv;
75 | ImageView mIconIv;
76 | TextView mLabelTv;
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/contacts_operation.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
12 |
17 |
18 |
27 | \
28 |
38 |
39 |
46 |
47 |
50 |
51 |
55 |
56 |
57 |
64 |
65 |
--------------------------------------------------------------------------------
/AppSearch/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/ContactsSearch/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/PinyinSearch/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/fragment_t9_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
22 |
23 |
24 |
31 |
32 |
37 |
38 |
43 |
44 |
45 |
46 |
47 |
48 |
56 |
57 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/helper/ContactsIndexHelper.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.helper;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import com.handsomezhou.contactssearch.model.Contacts;
7 | import com.handsomezhou.contactssearch.model.ContactsIndex;
8 | import com.handsomezhou.contactssearch.view.QuickAlphabeticBar;
9 |
10 | /**
11 | * @Description
12 | *
13 | * @author handsomezhou
14 | * @date 2014-12-15
15 | */
16 | public class ContactsIndexHelper{
17 | private static final String TAG="ContactsIndexHelper";
18 | private static ContactsIndexHelper mInstance = null;
19 | private List mContactsIndexs;
20 |
21 | private ContactsIndexHelper(){
22 | initContactsIndexHelper();
23 | }
24 |
25 | public static ContactsIndexHelper getInstance() {
26 | if (null == mInstance) {
27 | mInstance = new ContactsIndexHelper();
28 | }
29 |
30 | return mInstance;
31 | }
32 |
33 | private void initContactsIndexHelper(){
34 | mContactsIndexs=new ArrayList();
35 |
36 | for(int i=0; i();
47 | return;
48 | }
49 |
50 | mContactsIndexs.clear();
51 | mInstance=null;
52 | }
53 |
54 | public List getContactsIndexs() {
55 | return mContactsIndexs;
56 | }
57 |
58 | public void praseContacts(List contacts){
59 | if(null==contacts){
60 | return;
61 | }
62 |
63 | int contactsCount=contacts.size();
64 | for(int i=0; i contactsIndexs) {
76 | mContactsIndexs = contactsIndexs;
77 | }*/
78 |
79 | /*public void showContactsInfo2(){
80 | if(null==mContactsIndexs){
81 | return;
82 | }
83 |
84 | int contactsIndexsSize=mContactsIndexs.size();
85 | for(int i=0; i System
92 | .currentTimeMillis()) {
93 |
94 | moveTaskToBack(true);
95 | AppSearchService.startAppSearchService(getApplicationContext());
96 |
97 | } else {
98 | String DoubleBackPressExitApp = mContext.getString(
99 | R.string.double_back_press_exit_app,
100 | mContext.getString(R.string.app_name));
101 | Toast.makeText(mContext, DoubleBackPressExitApp, Toast.LENGTH_SHORT)
102 | .show();
103 | }
104 |
105 | mBackPressedTimeMillis = System.currentTimeMillis();
106 | }
107 |
108 | private void enterAbout(){
109 | Intent intent=new Intent(getContext(), AboutActivity.class);
110 | startActivity(intent);
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/adapter/ContactsIndexAdapter.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.adapter;
2 |
3 | import java.util.List;
4 |
5 | import android.content.Context;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.ArrayAdapter;
10 | import android.widget.TextView;
11 |
12 | import com.handsomezhou.contactssearch.R;
13 | import com.handsomezhou.contactssearch.model.Contacts;
14 |
15 | public class ContactsIndexAdapter extends ArrayAdapter {
16 | private Context mContext;
17 | private int mTextViewResourceId;
18 | private List mContacts;
19 | private OnContactsIndexAdapter mOnContactsIndexAdapter;
20 |
21 | public interface OnContactsIndexAdapter{
22 | public void onIndexKeyClick(final Contacts contacts);
23 | }
24 |
25 | public ContactsIndexAdapter(Context context, int textViewResourceId,
26 | List contacts) {
27 | super(context, textViewResourceId, contacts);
28 | mContext = context;
29 | mTextViewResourceId = textViewResourceId;
30 | mContacts = contacts;
31 | mOnContactsIndexAdapter=null;
32 | }
33 |
34 | public OnContactsIndexAdapter getOnContactsIndexAdapter() {
35 | return mOnContactsIndexAdapter;
36 | }
37 |
38 | public void setOnContactsIndexAdapter(
39 | OnContactsIndexAdapter onContactsIndexAdapter) {
40 | mOnContactsIndexAdapter = onContactsIndexAdapter;
41 | }
42 |
43 | @Override
44 | public View getView(int position, View convertView, ViewGroup parent) {
45 | View view = null;
46 | ViewHolder viewHolder;
47 | Contacts contacts = getItem(position);
48 | if (null == convertView) {
49 | view = LayoutInflater.from(mContext).inflate(mTextViewResourceId,
50 | null);
51 | viewHolder = new ViewHolder();
52 | viewHolder.mIndexKeyTv = (TextView) view
53 | .findViewById(R.id.index_value_text_view);
54 | view.setTag(viewHolder);
55 | } else {
56 | view = convertView;
57 | viewHolder = (ViewHolder) view.getTag();
58 | }
59 |
60 | viewHolder.mIndexKeyTv.setText(String.valueOf(contacts.getName().charAt(0)));
61 | viewHolder.mIndexKeyTv.setTextColor(mContext.getResources().getColor(
62 | R.color.black));
63 | viewHolder.mIndexKeyTv.setTag(position);
64 | viewHolder.mIndexKeyTv.setOnClickListener(new View.OnClickListener() {
65 |
66 | @Override
67 | public void onClick(View v) {
68 | int pos = (Integer) v.getTag();
69 | Contacts cs = getItem(pos);
70 | clickIndexKey(cs);
71 | }
72 | });
73 |
74 | return view;
75 | }
76 |
77 | private class ViewHolder {
78 | TextView mIndexKeyTv;
79 | }
80 |
81 | private void clickIndexKey(final Contacts contacts) {
82 | if (null == contacts) {
83 | return;
84 | }
85 |
86 | if(null!=mOnContactsIndexAdapter){
87 | /*Toast.makeText(mContext,PinyinUtil.getFirstCharacter(contacts.getNamePinyinUnits()),
88 | Toast.LENGTH_SHORT).show();*/
89 | mOnContactsIndexAdapter.onIndexKeyClick(contacts);
90 | }
91 | }
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/java/com/handsomezhou/appsearch/view/SearchBox.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.appsearch.view;
2 |
3 | import android.content.Context;
4 | import android.text.Editable;
5 | import android.text.TextUtils;
6 | import android.text.TextWatcher;
7 | import android.util.AttributeSet;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.widget.EditText;
11 | import android.widget.ImageView;
12 | import android.widget.LinearLayout;
13 |
14 | import com.handsomezhou.appsearch.R;
15 | import com.handsomezhou.appsearch.util.ViewUtil;
16 |
17 | public class SearchBox extends LinearLayout {
18 | private Context mContext;
19 | /* start: search box */
20 | private View mSearchBox;
21 |
22 | private EditText mSearchEt;
23 |
24 | private ImageView mDeleteIv;
25 | /* end: search box */
26 | private OnSearchBox mOnSearchBox;
27 |
28 | public interface OnSearchBox {
29 | void onSearchTextChanged(String curCharacter);
30 | }
31 |
32 | public SearchBox(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | mContext = context;
35 | initView();
36 | initData();
37 | initListener();
38 | }
39 |
40 | public OnSearchBox getOnSearchBox() {
41 | return mOnSearchBox;
42 | }
43 |
44 | public void setOnSearchBox(OnSearchBox onSearchBox) {
45 | mOnSearchBox = onSearchBox;
46 | }
47 |
48 | public EditText getSearchEt() {
49 | return mSearchEt;
50 | }
51 |
52 | public void setSearchEt(EditText searchEt) {
53 | mSearchEt = searchEt;
54 | }
55 |
56 | public String getSearchEtInput() {
57 | return mSearchEt.getText().toString();
58 | }
59 |
60 | private void initView() {
61 | LayoutInflater.from(mContext).inflate(R.layout.search_box, this);
62 | mSearchBox = findViewById(R.id.search_box);
63 |
64 | mSearchEt = (EditText) findViewById(R.id.search_edit_text);
65 | mDeleteIv = (ImageView) findViewById(R.id.delete_image_view);
66 |
67 | return;
68 | }
69 |
70 | private void initData() {
71 |
72 | return;
73 | }
74 |
75 | private void initListener() {
76 | mSearchEt.addTextChangedListener(new TextWatcher() {
77 |
78 | @Override
79 | public void onTextChanged(CharSequence s, int start, int before,
80 | int count) {
81 | // TODO Auto-generated method stub
82 |
83 | }
84 |
85 | @Override
86 | public void beforeTextChanged(CharSequence s, int start, int count,
87 | int after) {
88 | // TODO Auto-generated method stub
89 |
90 | }
91 |
92 | @Override
93 | public void afterTextChanged(Editable s) {
94 | if (null != mOnSearchBox) {
95 | String inputStr=s.toString();
96 | mOnSearchBox.onSearchTextChanged(inputStr);
97 | if(TextUtils.isEmpty(inputStr)){
98 | ViewUtil.hideView(mDeleteIv);
99 | }else{
100 | ViewUtil.showView(mDeleteIv);
101 | }
102 | }
103 |
104 | }
105 | });
106 |
107 | mDeleteIv.setOnClickListener(new OnClickListener() {
108 |
109 | @Override
110 | public void onClick(View v) {
111 | delete();
112 | }
113 | });
114 |
115 | return;
116 | }
117 |
118 | private void delete() {
119 | mSearchEt.setText("");
120 | ViewUtil.hideView(mDeleteIv);
121 | }
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/view/SearchBox.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.view;
2 |
3 | import android.content.Context;
4 | import android.text.Editable;
5 | import android.text.TextUtils;
6 | import android.text.TextWatcher;
7 | import android.util.AttributeSet;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.widget.EditText;
11 | import android.widget.ImageView;
12 | import android.widget.LinearLayout;
13 |
14 | import com.handsomezhou.contactssearch.R;
15 | import com.handsomezhou.contactssearch.util.ViewUtil;
16 |
17 | public class SearchBox extends LinearLayout {
18 | private Context mContext;
19 | /* start: search box */
20 | private View mSearchBox;
21 |
22 | private EditText mSearchEt;
23 |
24 | private ImageView mDeleteIv;
25 | /* end: search box */
26 | private OnSearchBox mOnSearchBox;
27 |
28 | public interface OnSearchBox {
29 | void onSearchTextChanged(String curCharacter);
30 | }
31 |
32 | public SearchBox(Context context, AttributeSet attrs) {
33 | super(context, attrs);
34 | mContext = context;
35 | initView();
36 | initData();
37 | initListener();
38 | }
39 |
40 | public OnSearchBox getOnSearchBox() {
41 | return mOnSearchBox;
42 | }
43 |
44 | public void setOnSearchBox(OnSearchBox onSearchBox) {
45 | mOnSearchBox = onSearchBox;
46 | }
47 |
48 | public EditText getSearchEt() {
49 | return mSearchEt;
50 | }
51 |
52 | public void setSearchEt(EditText searchEt) {
53 | mSearchEt = searchEt;
54 | }
55 |
56 | public String getSearchEtInput() {
57 | return mSearchEt.getText().toString();
58 | }
59 |
60 | private void initView() {
61 | LayoutInflater.from(mContext).inflate(R.layout.search_box, this);
62 | mSearchBox = findViewById(R.id.search_box);
63 |
64 | mSearchEt = (EditText) findViewById(R.id.search_edit_text);
65 | mDeleteIv = (ImageView) findViewById(R.id.delete_image_view);
66 |
67 | return;
68 | }
69 |
70 | private void initData() {
71 |
72 | return;
73 | }
74 |
75 | private void initListener() {
76 | mSearchEt.addTextChangedListener(new TextWatcher() {
77 |
78 | @Override
79 | public void onTextChanged(CharSequence s, int start, int before,
80 | int count) {
81 | // TODO Auto-generated method stub
82 |
83 | }
84 |
85 | @Override
86 | public void beforeTextChanged(CharSequence s, int start, int count,
87 | int after) {
88 | // TODO Auto-generated method stub
89 |
90 | }
91 |
92 | @Override
93 | public void afterTextChanged(Editable s) {
94 | if (null != mOnSearchBox) {
95 | String inputStr=s.toString();
96 | mOnSearchBox.onSearchTextChanged(inputStr);
97 | if(TextUtils.isEmpty(inputStr)){
98 | ViewUtil.hideView(mDeleteIv);
99 | }else{
100 | ViewUtil.showView(mDeleteIv);
101 | }
102 | }
103 |
104 | }
105 | });
106 |
107 | mDeleteIv.setOnClickListener(new OnClickListener() {
108 |
109 | @Override
110 | public void onClick(View v) {
111 | delete();
112 | }
113 | });
114 |
115 | return;
116 | }
117 |
118 | private void delete() {
119 | mSearchEt.setText("");
120 | ViewUtil.hideView(mDeleteIv);
121 | }
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
25 |
26 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
49 |
50 |
59 |
60 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
26 |
27 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
50 |
51 |
60 |
61 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/java/com/handsomezhou/contactssearch/fragment/MainFragment.java:
--------------------------------------------------------------------------------
1 | package com.handsomezhou.contactssearch.fragment;
2 |
3 | import android.Manifest;
4 | import android.content.Intent;
5 | import android.util.Log;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.Button;
10 | import android.widget.Toast;
11 |
12 | import com.handsomezhou.contactssearch.R;
13 | import com.handsomezhou.contactssearch.activity.MainActivity;
14 | import com.handsomezhou.contactssearch.activity.QwertySearchActivity;
15 | import com.handsomezhou.contactssearch.activity.T9SearchActivity;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | import me.weyye.hipermission.HiPermission;
21 | import me.weyye.hipermission.PermissionCallback;
22 | import me.weyye.hipermission.PermissionItem;
23 |
24 | public class MainFragment extends BaseFragment {
25 | private static final String TAG="MainFragment";
26 | private Button mT9SearchBtn;
27 | private Button mQwertySearchBtn;
28 |
29 | @Override
30 | protected void initData() {
31 | setContext(getActivity());
32 |
33 | }
34 |
35 | @Override
36 | protected View initView(LayoutInflater inflater, ViewGroup container) {
37 | View view=inflater.inflate(R.layout.fragment_main, container, false);
38 | mT9SearchBtn=(Button) view.findViewById(R.id.t9_search_btn);
39 | mQwertySearchBtn=(Button) view.findViewById(R.id.qwerty_search_btn);
40 | return view;
41 | }
42 |
43 | @Override
44 | protected void initListener() {
45 | mT9SearchBtn.setOnClickListener(new View.OnClickListener() {
46 |
47 | @Override
48 | public void onClick(View v) {
49 | startT9Search();
50 | }
51 | });
52 |
53 | mQwertySearchBtn.setOnClickListener(new View.OnClickListener() {
54 |
55 | @Override
56 | public void onClick(View v) {
57 | startQwertySearch();
58 | }
59 | });
60 |
61 | checkPermission();
62 | }
63 |
64 | private void startT9Search(){
65 | Intent intent=new Intent(getContext(), T9SearchActivity.class);
66 | startActivity(intent);
67 | }
68 |
69 | private void startQwertySearch(){
70 | Intent intent=new Intent(getContext(), QwertySearchActivity.class);
71 | startActivity(intent);
72 | }
73 |
74 | private void checkPermission(){
75 | List permissionItems = new ArrayList();
76 | permissionItems.add(new PermissionItem(Manifest.permission.READ_CONTACTS, getString(R.string.contacts), R.mipmap.ic_launcher));
77 |
78 |
79 | HiPermission.create(getActivity())
80 | .permissions(permissionItems)
81 | .checkMutiPermission(new PermissionCallback() {
82 | @Override
83 | public void onClose() {
84 | Log.i(TAG, "onClose");
85 | String tips=getString(R.string.can_not_read_contacts_data_tips);
86 | Toast.makeText(getContext(),tips,Toast.LENGTH_LONG).show();
87 | }
88 |
89 | @Override
90 | public void onFinish() {
91 | String tips="permissions requested completed";
92 | Log.i(TAG, tips);
93 | //Toast.makeText(getContext(),tips,Toast.LENGTH_LONG).show();
94 | }
95 |
96 | @Override
97 | public void onDeny(String permission, int position) {
98 | Log.i(TAG, "onDeny");
99 | }
100 |
101 | @Override
102 | public void onGuarantee(String permission, int position) {
103 | Log.i(TAG, "onGuarantee");
104 | }
105 | });
106 | }
107 |
108 | }
109 |
--------------------------------------------------------------------------------
/AppSearch/app/src/main/res/layout/search_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
29 |
30 |
37 |
38 |
39 |
48 |
49 |
56 |
57 |
58 |
68 |
69 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/ContactsSearch/app/src/main/res/layout/search_box.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
29 |
30 |
37 |
38 |
39 |
48 |
49 |
56 |
57 |
58 |
68 |
69 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------