├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ ├── libit.xml │ └── profiles_settings.xml ├── dictionaries │ └── libit.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── libs │ ├── gson-2.2.4.jar │ ├── org.apache.http.legacy.jar │ └── pinyin4j-2.5.0.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── com │ │ ├── androidquery │ │ │ ├── AQuery.java │ │ │ ├── AbstractAQuery.java │ │ │ ├── WebDialog.java │ │ │ ├── auth │ │ │ │ ├── AccountHandle.java │ │ │ │ ├── BasicHandle.java │ │ │ │ ├── FacebookHandle.java │ │ │ │ └── GoogleHandle.java │ │ │ ├── callback │ │ │ │ ├── AbstractAjaxCallback.java │ │ │ │ ├── AjaxCallback.java │ │ │ │ ├── AjaxStatus.java │ │ │ │ ├── BitmapAjaxCallback.java │ │ │ │ ├── ImageOptions.java │ │ │ │ ├── LocationAjaxCallback.java │ │ │ │ ├── ProxyHandle.java │ │ │ │ └── Transformer.java │ │ │ ├── service │ │ │ │ └── MarketService.java │ │ │ └── util │ │ │ │ ├── AQUtility.java │ │ │ │ ├── BitmapCache.java │ │ │ │ ├── Common.java │ │ │ │ ├── Constants.java │ │ │ │ ├── PredefinedBAOS.java │ │ │ │ ├── Progress.java │ │ │ │ ├── RatioDrawable.java │ │ │ │ ├── WebImage.java │ │ │ │ └── XmlDom.java │ │ ├── external │ │ │ └── xlistview │ │ │ │ ├── LoadView.java │ │ │ │ ├── XListView.java │ │ │ │ ├── XListViewFooter.java │ │ │ │ └── XListViewHeader.java │ │ ├── lrcall │ │ │ ├── appcall │ │ │ │ ├── MyApplication.java │ │ │ │ ├── models │ │ │ │ │ ├── ErrorInfo.java │ │ │ │ │ ├── PicInfo.java │ │ │ │ │ ├── PicSortInfo.java │ │ │ │ │ ├── ReturnInfo.java │ │ │ │ │ ├── ReturnListInfo.java │ │ │ │ │ ├── UserBackupInfo.java │ │ │ │ │ └── UserInfo.java │ │ │ │ └── services │ │ │ │ │ ├── ApiConfig.java │ │ │ │ │ ├── BackupService.java │ │ │ │ │ ├── BaseService.java │ │ │ │ │ ├── BugService.java │ │ │ │ │ ├── GsonCallBack.java │ │ │ │ │ ├── IAjaxDataResponse.java │ │ │ │ │ └── UserService.java │ │ │ ├── calllogs │ │ │ │ ├── CallLogsFactory.java │ │ │ │ └── CallLogsUtils8.java │ │ │ ├── contacts │ │ │ │ ├── ContactsFactory.java │ │ │ │ ├── ContactsUtils14.java │ │ │ │ ├── ContactsUtils19.java │ │ │ │ ├── ContactsUtils23.java │ │ │ │ └── ContactsUtils8.java │ │ │ ├── db │ │ │ │ ├── DataBaseFactory.java │ │ │ │ ├── DataBaseProvider.java │ │ │ │ ├── DbAppFactory.java │ │ │ │ └── DbConstant.java │ │ │ ├── enums │ │ │ │ └── EventTypeLayoutSideMain.java │ │ │ ├── models │ │ │ │ ├── AppInfo.java │ │ │ │ ├── CallLogInfo.java │ │ │ │ ├── ContactInfo.java │ │ │ │ ├── DbObject.java │ │ │ │ ├── FuncInfo.java │ │ │ │ ├── MemoryInfo.java │ │ │ │ ├── TabInfo.java │ │ │ │ └── UpdateInfo.java │ │ │ ├── ui │ │ │ │ ├── ActivityChangePwd.java │ │ │ │ ├── ActivityContactDetail.java │ │ │ │ ├── ActivityContactEdit.java │ │ │ │ ├── ActivityLogin.java │ │ │ │ ├── ActivityMain.java │ │ │ │ ├── ActivitySearch.java │ │ │ │ ├── ActivitySplash.java │ │ │ │ ├── ActivityWebView.java │ │ │ │ ├── FragmentContacts.java │ │ │ │ ├── FragmentDialer.java │ │ │ │ ├── FragmentImage.java │ │ │ │ ├── FragmentMore.java │ │ │ │ ├── FragmentSms.java │ │ │ │ ├── LayoutSideMain.java │ │ │ │ ├── MyBaseActivity.java │ │ │ │ ├── MyBaseFragment.java │ │ │ │ ├── SearchContentView.java │ │ │ │ ├── adapter │ │ │ │ │ ├── BaseCallLogsAdapter.java │ │ │ │ │ ├── BaseContactsAdapter.java │ │ │ │ │ ├── CallLogsAdapter.java │ │ │ │ │ ├── ContactCallLogsAdapter.java │ │ │ │ │ ├── ContactEditNumbersAdapter.java │ │ │ │ │ ├── ContactNumbersAdapter.java │ │ │ │ │ ├── ContactsAdapter.java │ │ │ │ │ ├── ContactsSearchAdapter.java │ │ │ │ │ ├── FileListAdapter.java │ │ │ │ │ ├── FuncsAdapter.java │ │ │ │ │ └── SearchAdapter.java │ │ │ │ ├── customer │ │ │ │ │ ├── AddressAware.java │ │ │ │ │ ├── AddressText.java │ │ │ │ │ ├── DialingFeedback.java │ │ │ │ │ ├── Digit.java │ │ │ │ │ ├── DraftImageView.java │ │ │ │ │ ├── EraseButton.java │ │ │ │ │ ├── MarqueeTextView.java │ │ │ │ │ ├── MaxHeightGridView.java │ │ │ │ │ ├── MaxHeightListView.java │ │ │ │ │ ├── MyActionBarDrawerToggle.java │ │ │ │ │ ├── Numpad.java │ │ │ │ │ ├── QuickAlphabeticBar.java │ │ │ │ │ └── ToastView.java │ │ │ │ └── dialog │ │ │ │ │ ├── DialogCommon.java │ │ │ │ │ ├── DialogContactNumberAdd.java │ │ │ │ │ ├── DialogFileList.java │ │ │ │ │ ├── DialogList.java │ │ │ │ │ └── MyProgressDialog.java │ │ │ └── utils │ │ │ │ ├── CallTools.java │ │ │ │ ├── ConstValues.java │ │ │ │ ├── CryptoTools.java │ │ │ │ ├── DisplayTools.java │ │ │ │ ├── FileTools.java │ │ │ │ ├── GsonTools.java │ │ │ │ ├── HttpTools.java │ │ │ │ ├── INativeInterface.java │ │ │ │ ├── LogcatTools.java │ │ │ │ ├── MyConfig.java │ │ │ │ ├── MyExecutorService.java │ │ │ │ ├── PinyinTools.java │ │ │ │ ├── PreferenceUtils.java │ │ │ │ ├── ShellUtils.java │ │ │ │ ├── StringTools.java │ │ │ │ └── apptools │ │ │ │ ├── AppFactory.java │ │ │ │ ├── AppInterface.java │ │ │ │ ├── AppUtil22.java │ │ │ │ ├── AppUtil8.java │ │ │ │ ├── RootAppImpl.java │ │ │ │ └── UnRootAppImpl.java │ │ └── ogaclejapan │ │ │ └── smarttablayout │ │ │ ├── SmartTabIndicationInterpolator.java │ │ │ ├── SmartTabLayout.java │ │ │ ├── SmartTabStrip.java │ │ │ ├── TintableImageView.java │ │ │ ├── Utils.java │ │ │ └── utils │ │ │ ├── PagerItem.java │ │ │ ├── PagerItems.java │ │ │ ├── ViewPagerItem.java │ │ │ ├── ViewPagerItemAdapter.java │ │ │ ├── ViewPagerItems.java │ │ │ └── v4 │ │ │ ├── Bundler.java │ │ │ ├── FragmentPagerItem.java │ │ │ ├── FragmentPagerItemAdapter.java │ │ │ ├── FragmentPagerItems.java │ │ │ └── FragmentStatePagerItemAdapter.java │ ├── me │ │ └── imid │ │ │ └── swipebacklayout │ │ │ └── lib │ │ │ ├── SwipeBackLayout.java │ │ │ ├── Utils.java │ │ │ ├── ViewDragHelper.java │ │ │ └── app │ │ │ ├── SwipeBackActivity.java │ │ │ ├── SwipeBackActivityBase.java │ │ │ ├── SwipeBackActivityHelper.java │ │ │ └── SwipeBackPreferenceActivity.java │ └── org │ │ └── greenrobot │ │ └── eventbus │ │ ├── AsyncPoster.java │ │ ├── BackgroundPoster.java │ │ ├── EventBus.java │ │ ├── EventBusBuilder.java │ │ ├── EventBusException.java │ │ ├── HandlerPoster.java │ │ ├── NoSubscriberEvent.java │ │ ├── PendingPost.java │ │ ├── PendingPostQueue.java │ │ ├── Subscribe.java │ │ ├── SubscriberExceptionEvent.java │ │ ├── SubscriberMethod.java │ │ ├── SubscriberMethodFinder.java │ │ ├── Subscription.java │ │ ├── ThreadMode.java │ │ ├── meta │ │ ├── AbstractSubscriberInfo.java │ │ ├── SimpleSubscriberInfo.java │ │ ├── SubscriberInfo.java │ │ ├── SubscriberInfoIndex.java │ │ └── SubscriberMethodInfo.java │ │ └── util │ │ ├── AsyncExecutor.java │ │ ├── ErrorDialogConfig.java │ │ ├── ErrorDialogFragmentFactory.java │ │ ├── ErrorDialogFragments.java │ │ ├── ErrorDialogManager.java │ │ ├── ExceptionToResourceMapping.java │ │ ├── HasExecutionScope.java │ │ └── ThrowableFailureEvent.java │ ├── jni │ ├── Android.mk │ ├── Application.mk │ ├── main.cpp │ ├── utils.cpp │ └── utils.h │ ├── res │ ├── anim │ │ └── loading_animation.xml │ ├── color │ │ └── custom_tab_icon.xml │ ├── drawable-hdpi │ │ ├── avatar_frame.png │ │ ├── back.png │ │ ├── bg_contact_search_edittext.9.png │ │ ├── bg_item_down_default.png │ │ ├── bg_item_down_long_default.png │ │ ├── bg_item_up_default.png │ │ ├── bg_item_up_long_default.png │ │ ├── bg_search_panel.9.png │ │ ├── bg_user.jpg │ │ ├── body_cont.9.png │ │ ├── bottom_bar.png │ │ ├── btn_del_search_default.png │ │ ├── btn_del_search_pressed.png │ │ ├── btn_dial_call_normal.9.png │ │ ├── btn_dial_call_pre.9.png │ │ ├── btn_edt_bak_bg.9.png │ │ ├── camera.png │ │ ├── default_header.png │ │ ├── default_ptr_flip.png │ │ ├── dial_add_normal.png │ │ ├── dial_add_pres.png │ │ ├── dial_callicon_press.png │ │ ├── dial_husa_normal.png │ │ ├── dial_num_0_normal.png │ │ ├── dial_num_1_normal.png │ │ ├── dial_num_2_normal.png │ │ ├── dial_num_3_normal.png │ │ ├── dial_num_4_normal.png │ │ ├── dial_num_5_normal.png │ │ ├── dial_num_6_normal.png │ │ ├── dial_num_7_normal.png │ │ ├── dial_num_8_normal.png │ │ ├── dial_num_9_normal.png │ │ ├── dial_num_phone.png │ │ ├── dial_star_normal.png │ │ ├── ic_delete_character_normal.png │ │ ├── ic_delete_character_pressed.png │ │ ├── ic_digits_normal.9.png │ │ ├── ic_digits_pressed.9.png │ │ ├── ic_done_grey600_18dp.png │ │ ├── ic_file.png │ │ ├── ic_folder.png │ │ ├── ic_tab_contacts_normal.png │ │ ├── ic_tab_contacts_pressed.png │ │ ├── ic_tab_dialer_normal.png │ │ ├── ic_tab_dialer_pressed.png │ │ ├── ic_tab_money_normal.png │ │ ├── ic_tab_money_pressed.png │ │ ├── ic_tab_more_normal.png │ │ ├── ic_tab_more_pressed.png │ │ ├── ic_test_0.jpg │ │ ├── ic_test_1.jpg │ │ ├── ic_test_2.jpg │ │ ├── ic_test_3.jpg │ │ ├── icon_search.png │ │ ├── incall.png │ │ ├── index_bg.9.png │ │ ├── item_grid_filter_bg_line.png │ │ ├── line.png │ │ ├── line_bg00.9.png │ │ ├── loading.png │ │ ├── more.png │ │ ├── netload_01.png │ │ ├── netload_02.png │ │ ├── netload_03.png │ │ ├── netload_04.png │ │ ├── netload_05.png │ │ ├── netload_06.png │ │ ├── netload_07.png │ │ ├── netload_08.png │ │ ├── netload_09.png │ │ ├── netload_10.png │ │ ├── netload_11.png │ │ ├── netload_12.png │ │ ├── placeholder_large.png │ │ ├── setting_right_arrow.png │ │ ├── shadow_bottom.png │ │ ├── shadow_left.png │ │ ├── shadow_right.png │ │ ├── slidetab_bg_press.9.png │ │ ├── splash.png │ │ ├── tocall.png │ │ ├── web_back.png │ │ ├── web_forward.png │ │ ├── web_home.png │ │ ├── web_refresh.png │ │ └── web_stop.png │ ├── drawable │ │ ├── bg_item.xml │ │ ├── bg_item_down.xml │ │ ├── bg_item_down_long.xml │ │ ├── bg_item_long.xml │ │ ├── bg_item_up.xml │ │ ├── bg_item_up_long.xml │ │ ├── btn_del_search.xml │ │ ├── custom_circle.xml │ │ ├── delete_btn_bg.xml │ │ ├── ic_digits.xml │ │ ├── image_progress.xml │ │ ├── progress_bg.xml │ │ ├── tab_addcontact_image_btn.xml │ │ ├── tab_call_image_btn.xml │ │ └── toast_bg.xml │ ├── layout │ │ ├── activity_change_pwd.xml │ │ ├── activity_contact_detail.xml │ │ ├── activity_contact_edit.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_main2.xml │ │ ├── activity_main_slide_head.xml │ │ ├── activity_search.xml │ │ ├── activity_splash.xml │ │ ├── activity_web_view.xml │ │ ├── activity_web_view_head.xml │ │ ├── custom_tab_circle.xml │ │ ├── dialog_common.xml │ │ ├── dialog_contact_number_add.xml │ │ ├── dialog_file_list.xml │ │ ├── dialog_list.xml │ │ ├── fragment_contacts.xml │ │ ├── fragment_dialer.xml │ │ ├── fragment_image.xml │ │ ├── fragment_more.xml │ │ ├── fragment_more_head.xml │ │ ├── fragment_sms.xml │ │ ├── item_call_log.xml │ │ ├── item_contact_call_log.xml │ │ ├── item_contact_number.xml │ │ ├── item_contact_number_edit.xml │ │ ├── item_file.xml │ │ ├── item_func.xml │ │ ├── item_phonebook.xml │ │ ├── item_phonebook_with_head.xml │ │ ├── item_tab.xml │ │ ├── layout_custom_tab.xml │ │ ├── layout_numpad.xml │ │ ├── layout_title.xml │ │ ├── progress_view.xml │ │ ├── swipeback_layout.xml │ │ ├── toast_view.xml │ │ ├── xlistview_footer.xml │ │ └── xlistview_header.xml │ ├── menu │ │ ├── menu_activity_contact_detail.xml │ │ ├── menu_activity_contact_edit.xml │ │ ├── menu_activity_main.xml │ │ ├── menu_activity_webview.xml │ │ ├── menu_calllog_list_context.xml │ │ └── menu_fragment_more.xml │ ├── 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-v21 │ │ └── styles.xml │ ├── values-w820dp │ │ └── dimens.xml │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ ├── sw_attrs.xml │ │ └── sw_styles.xml │ └── resources │ └── com │ └── androidquery │ └── util │ └── web_image.html ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lr_dialer_v1.0.iml ├── settings.gradle └── 日志.log /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | lr_dialer_v1.0 -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.idea/copyright/libit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/libit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 24 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lr_dialer 2 | 集打电话、发短信、网络电话、及时消息、骚扰拦截、来电备注等功能于一体的拨号程序。 3 | 主要功能:
4 | 1,拨打本地电话,并有来电识别功能;
5 | 2,收发短信;
6 | 3,可集成网络电话;
7 | 4,集成环信IM;
8 | 5,企业电话本;
9 | 6,广告展示;
10 | 7,其他功能;
11 | 如需定制请联系QQ:18520332370
12 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'android-apt' 3 | 4 | android { 5 | compileSdkVersion 23 6 | buildToolsVersion "23.0.1" 7 | 8 | defaultConfig { 9 | applicationId "com.lrcall.appcall" 10 | minSdkVersion 9 11 | targetSdkVersion 23 12 | versionCode 1001 13 | versionName "1.0.0" 14 | ndk { 15 | moduleName "appcallsdk" 16 | } 17 | } 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | debug { 24 | jniDebuggable true 25 | } 26 | } 27 | lintOptions { 28 | checkReleaseBuilds false 29 | abortOnError false 30 | } 31 | } 32 | 33 | dependencies { 34 | compile fileTree(include: ['*.jar'], dir: 'libs') 35 | compile 'com.android.support:support-v4:23.1.1' 36 | compile 'com.android.support:appcompat-v7:23.1.1' 37 | compile 'com.github.hotchemi:permissionsdispatcher:2.1.3' 38 | apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3' 39 | } 40 | -------------------------------------------------------------------------------- /app/libs/gson-2.2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/libs/gson-2.2.4.jar -------------------------------------------------------------------------------- /app/libs/org.apache.http.legacy.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/libs/org.apache.http.legacy.jar -------------------------------------------------------------------------------- /app/libs/pinyin4j-2.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/libs/pinyin4j-2.5.0.jar -------------------------------------------------------------------------------- /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 /Users/libit/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include fileName 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 | -dontusemixedcaseclassnames 19 | -dontskipnonpubliclibraryclasses 20 | -verbose 21 | 22 | -dontoptimize 23 | -dontpreverify 24 | 25 | -dontwarn demo.** 26 | #-dontskipnonpubliclibraryclassmembers 27 | -libraryjars libs/pinyin4j-2.5.0.jar 28 | -libraryjars libs/gson-2.2.4.jar 29 | -libraryjars libs/org.apache.http.legacy.jar 30 | 31 | -keepattributes *Annotation* 32 | -keep public class com.google.vending.licensing.ILicensingService 33 | -keep public class com.android.vending.licensing.ILicensingService 34 | 35 | -keepclasseswithmembernames class * { 36 | native ; 37 | } 38 | 39 | -keepclassmembers public class * extends android.view.View { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keepclassmembers class * extends android.app.Activity { 45 | public void *(android.view.View); 46 | } 47 | 48 | -keepclassmembers enum * { 49 | public static **[] values(); 50 | public static ** valueOf(java.lang.String); 51 | } 52 | 53 | -keep class * implements android.os.Parcelable { 54 | public static final android.os.Parcelable$Creator *; 55 | } 56 | 57 | -keepclassmembers class **.R$* { 58 | public static ; 59 | } 60 | 61 | -dontwarn android.support.** 62 | 63 | -keep public class com.lrcall.models.* 64 | -keepclassmembers public class com.lrcall.models.* { 65 | void set*(***); 66 | *** get*(); 67 | } 68 | 69 | #-keep public class com.lrcall.models.* { 70 | # *; 71 | #} -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/AQuery.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 - AndroidQuery.com (tinyeeliu@gmail.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * 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, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.androidquery; 17 | 18 | import android.app.Activity; 19 | import android.content.Context; 20 | import android.view.View; 21 | 22 | /** 23 | * The main class of AQuery. All methods are actually inherited from AbstractAQuery. 24 | */ 25 | public class AQuery extends AbstractAQuery 26 | { 27 | public AQuery(Activity act) 28 | { 29 | super(act); 30 | } 31 | 32 | public AQuery(View view) 33 | { 34 | super(view); 35 | } 36 | 37 | public AQuery(Context context) 38 | { 39 | super(context); 40 | } 41 | 42 | public AQuery(Activity act, View root) 43 | { 44 | super(act, root); 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/auth/BasicHandle.java: -------------------------------------------------------------------------------- 1 | package com.androidquery.auth; 2 | 3 | import android.net.Uri; 4 | 5 | import com.androidquery.callback.AbstractAjaxCallback; 6 | import com.androidquery.callback.AjaxStatus; 7 | import com.androidquery.util.AQUtility; 8 | 9 | import org.apache.http.HttpRequest; 10 | 11 | import java.net.HttpURLConnection; 12 | 13 | public class BasicHandle extends AccountHandle 14 | { 15 | private String username; 16 | private String password; 17 | 18 | public BasicHandle(String username, String password) 19 | { 20 | this.username = username; 21 | this.password = password; 22 | } 23 | 24 | @Override 25 | public boolean authenticated() 26 | { 27 | return true; 28 | } 29 | 30 | @Override 31 | protected void auth() 32 | { 33 | } 34 | 35 | @Override 36 | public boolean expired(AbstractAjaxCallback cb, AjaxStatus status) 37 | { 38 | return false; 39 | } 40 | 41 | @Override 42 | public boolean reauth(AbstractAjaxCallback cb) 43 | { 44 | return false; 45 | } 46 | 47 | @Override 48 | public void applyToken(AbstractAjaxCallback cb, HttpRequest request) 49 | { 50 | String cred = username + ":" + password; 51 | byte[] data = cred.getBytes(); 52 | String auth = "Basic " + new String(AQUtility.encode64(data, 0, data.length)); 53 | Uri uri = Uri.parse(cb.getUrl()); 54 | String host = uri.getHost(); 55 | request.addHeader("Host", host); 56 | request.addHeader("Authorization", auth); 57 | } 58 | 59 | @Override 60 | public void applyToken(AbstractAjaxCallback cb, HttpURLConnection conn) 61 | { 62 | String cred = username + ":" + password; 63 | byte[] data = cred.getBytes(); 64 | String auth = "Basic " + new String(AQUtility.encode64(data, 0, data.length)); 65 | Uri uri = Uri.parse(cb.getUrl()); 66 | String host = uri.getHost(); 67 | conn.setRequestProperty("Host", host); 68 | conn.setRequestProperty("Authorization", auth); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/callback/AjaxCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 - AndroidQuery.com (tinyeeliu@gmail.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * 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, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.androidquery.callback; 17 | 18 | /** 19 | * The default ajax callback handler. All methods are actually inherited from AbstractAjaxCallback. 20 | */ 21 | public class AjaxCallback extends AbstractAjaxCallback> 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/callback/ImageOptions.java: -------------------------------------------------------------------------------- 1 | package com.androidquery.callback; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import com.androidquery.AQuery; 6 | 7 | public class ImageOptions 8 | { 9 | public boolean memCache = true; 10 | public boolean fileCache = true; 11 | public Bitmap preset; 12 | public int policy; 13 | public int targetWidth; 14 | public int fallback; 15 | public int animation; 16 | public float ratio; 17 | public int round; 18 | public float anchor = AQuery.ANCHOR_DYNAMIC; 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/callback/ProxyHandle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 - AndroidQuery.com (tinyeeliu@gmail.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * 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, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.androidquery.callback; 17 | 18 | import org.apache.http.HttpRequest; 19 | import org.apache.http.impl.client.DefaultHttpClient; 20 | 21 | import java.net.Proxy; 22 | 23 | public abstract class ProxyHandle 24 | { 25 | public abstract void applyProxy(AbstractAjaxCallback cb, HttpRequest request, DefaultHttpClient client); 26 | 27 | public abstract Proxy makeProxy(AbstractAjaxCallback cb); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/callback/Transformer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 - AndroidQuery.com (tinyeeliu@gmail.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * 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, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.androidquery.callback; 17 | 18 | public interface Transformer 19 | { 20 | public T transform(String url, Class type, String encoding, byte[] data, AjaxStatus status); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/androidquery/util/PredefinedBAOS.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 - AndroidQuery.com (tinyeeliu@gmail.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * 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, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.androidquery.util; 17 | 18 | import java.io.ByteArrayOutputStream; 19 | 20 | /** 21 | * AQuery internal use only. 22 | *

23 | * Return the buffered array as is if the predefined size matches exactly the result byte array length. 24 | * Reduce memory allocation by half by avoiding array expand and copy. 25 | */ 26 | public class PredefinedBAOS extends ByteArrayOutputStream 27 | { 28 | public PredefinedBAOS(int size) 29 | { 30 | super(size); 31 | } 32 | 33 | @Override 34 | public byte[] toByteArray() 35 | { 36 | if (count == buf.length) 37 | { 38 | return buf; 39 | } 40 | return super.toByteArray(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/external/xlistview/LoadView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.external.xlistview; 6 | 7 | import android.content.Context; 8 | import android.graphics.Bitmap; 9 | import android.graphics.BitmapFactory; 10 | import android.graphics.Matrix; 11 | import android.os.Handler; 12 | import android.os.Message; 13 | import android.util.AttributeSet; 14 | import android.widget.ImageView; 15 | 16 | import com.lrcall.appcall.R; 17 | 18 | import java.util.Timer; 19 | import java.util.TimerTask; 20 | 21 | /** 22 | * Created by limxing on 16/1/7. 23 | */ 24 | public class LoadView extends ImageView 25 | { 26 | private float degrees = 0f; 27 | private Matrix max; 28 | private int width; 29 | private int height; 30 | Handler handler = new Handler() 31 | { 32 | @Override 33 | public void handleMessage(Message msg) 34 | { 35 | degrees += 30f; 36 | max.setRotate(degrees, width, height); 37 | setImageMatrix(max); 38 | if (degrees == 360) 39 | { 40 | degrees = 0; 41 | } 42 | } 43 | }; 44 | private Bitmap bitmap; 45 | 46 | public LoadView(Context context) 47 | { 48 | super(context); 49 | init(); 50 | } 51 | 52 | public LoadView(Context context, AttributeSet attrs) 53 | { 54 | super(context, attrs); 55 | init(); 56 | } 57 | 58 | public LoadView(Context context, AttributeSet attrs, int defStyleAttr) 59 | { 60 | super(context, attrs, defStyleAttr); 61 | init(); 62 | } 63 | 64 | private void init() 65 | { 66 | setScaleType(ScaleType.MATRIX); 67 | bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.loading); 68 | setImageBitmap(bitmap); 69 | max = new Matrix(); 70 | width = bitmap.getWidth() / 2; 71 | height = bitmap.getHeight() / 2; 72 | Timer time = new Timer(); 73 | time.schedule(new TimerTask() 74 | { 75 | @Override 76 | public void run() 77 | { 78 | handler.sendEmptyMessage(0); 79 | } 80 | }, 0, 80); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.appcall; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.lrcall.utils.LogcatTools; 7 | 8 | /** 9 | * Created by libit on 15/8/19. 10 | */ 11 | public class MyApplication extends Application 12 | { 13 | private static MyApplication instance; 14 | 15 | public static MyApplication getInstance() 16 | { 17 | return instance; 18 | } 19 | 20 | public static Context getContext() 21 | { 22 | return getInstance(); 23 | } 24 | 25 | @Override 26 | public void onCreate() 27 | { 28 | super.onCreate(); 29 | instance = this; 30 | } 31 | 32 | @Override 33 | public void onTerminate() 34 | { 35 | LogcatTools.getInstance().stop(); 36 | instance = null; 37 | super.onTerminate(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/ErrorInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | 6 | package com.lrcall.appcall.models; 7 | 8 | import com.lrcall.utils.StringTools; 9 | 10 | import java.util.HashMap; 11 | 12 | public class ErrorInfo 13 | { 14 | private static final int SUCCESS = 0; 15 | private static final int PARAM_ERROR = -10; 16 | private static final int EXIST_ERROR = -11; 17 | private static final int NOT_EXIST_ERROR = -12; 18 | private static final int HIBERNATE_ERROR = -100; 19 | private static final int NETWORK_ERROR = -200; 20 | private static final int FORBIDDEN_ERROR = -300; 21 | private static final int UNKNOWN_ERROR = -10000; 22 | public final static HashMap ERROR_INFO = new HashMap() 23 | { 24 | private static final long serialVersionUID = 111L; 25 | 26 | { 27 | put(SUCCESS, "操作成功"); 28 | put(PARAM_ERROR, "参数错误"); 29 | put(EXIST_ERROR, "对象已存在"); 30 | put(NOT_EXIST_ERROR, "对象不存在"); 31 | put(HIBERNATE_ERROR, "数据库错误"); 32 | put(NETWORK_ERROR, "网络错误"); 33 | put(FORBIDDEN_ERROR, "禁止访问"); 34 | put(UNKNOWN_ERROR, "未知错误"); 35 | } 36 | }; 37 | private static final int PASSWORD_ERROR = -20000; 38 | 39 | public static int getSuccessId() 40 | { 41 | return SUCCESS; 42 | } 43 | 44 | public static int getParamErrorId() 45 | { 46 | return PARAM_ERROR; 47 | } 48 | 49 | public static int getPasswordErrorId() 50 | { 51 | return PASSWORD_ERROR; 52 | } 53 | 54 | public static int getExistErrorId() 55 | { 56 | return EXIST_ERROR; 57 | } 58 | 59 | public static int getNotExistErrorId() 60 | { 61 | return NOT_EXIST_ERROR; 62 | } 63 | 64 | public static int getHibernateErrorId() 65 | { 66 | return HIBERNATE_ERROR; 67 | } 68 | 69 | public static int getNetWorkErrorId() 70 | { 71 | return NETWORK_ERROR; 72 | } 73 | 74 | public static int getForbiddenErrorId() 75 | { 76 | return FORBIDDEN_ERROR; 77 | } 78 | 79 | public static int getUnknownErrorId() 80 | { 81 | return UNKNOWN_ERROR; 82 | } 83 | 84 | public static String getErrorInfo(int errcode) 85 | { 86 | String errInfo = ERROR_INFO.get(errcode); 87 | if (StringTools.isNull(errInfo)) 88 | { 89 | errInfo = String.format("未知错误代码%d", errcode); 90 | } 91 | return errInfo; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/PicInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.models; 6 | 7 | /** 8 | * Created by libit on 16/4/13. 9 | */ 10 | public class PicInfo 11 | { 12 | private Integer id; 13 | private String picId; 14 | private String sortId; 15 | private String picUrl; 16 | private String picSizeInfo; 17 | private PicSortInfo picSortInfo; 18 | 19 | public PicInfo() 20 | { 21 | } 22 | 23 | public PicInfo(String picId, String sortId, String picUrl, String picSizeInfo, PicSortInfo picSortInfo) 24 | { 25 | this.picId = picId; 26 | this.sortId = sortId; 27 | this.picUrl = picUrl; 28 | this.picSizeInfo = picSizeInfo; 29 | this.picSortInfo = picSortInfo; 30 | } 31 | 32 | public Integer getId() 33 | { 34 | return id; 35 | } 36 | 37 | public void setId(Integer id) 38 | { 39 | this.id = id; 40 | } 41 | 42 | public String getPicId() 43 | { 44 | return picId; 45 | } 46 | 47 | public void setPicId(String picId) 48 | { 49 | this.picId = picId; 50 | } 51 | 52 | public String getSortId() 53 | { 54 | return sortId; 55 | } 56 | 57 | public void setSortId(String sortId) 58 | { 59 | this.sortId = sortId; 60 | } 61 | 62 | public String getPicUrl() 63 | { 64 | return picUrl; 65 | } 66 | 67 | public void setPicUrl(String picUrl) 68 | { 69 | this.picUrl = picUrl; 70 | } 71 | 72 | public String getPicSizeInfo() 73 | { 74 | return picSizeInfo; 75 | } 76 | 77 | public void setPicSizeInfo(String picSizeInfo) 78 | { 79 | this.picSizeInfo = picSizeInfo; 80 | } 81 | 82 | public PicSortInfo getPicSortInfo() 83 | { 84 | return picSortInfo; 85 | } 86 | 87 | public void setPicSortInfo(PicSortInfo picSortInfo) 88 | { 89 | this.picSortInfo = picSortInfo; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/PicSortInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.models; 6 | 7 | /** 8 | * Created by libit on 16/4/13. 9 | */ 10 | public class PicSortInfo 11 | { 12 | private Integer id; 13 | private String sortId; 14 | private String name; 15 | 16 | public PicSortInfo() 17 | { 18 | } 19 | 20 | public PicSortInfo(String sortId, String name) 21 | { 22 | this.sortId = sortId; 23 | this.name = name; 24 | } 25 | 26 | public Integer getId() 27 | { 28 | return id; 29 | } 30 | 31 | public void setId(Integer id) 32 | { 33 | this.id = id; 34 | } 35 | 36 | public String getSortId() 37 | { 38 | return sortId; 39 | } 40 | 41 | public void setSortId(String sortId) 42 | { 43 | this.sortId = sortId; 44 | } 45 | 46 | public String getName() 47 | { 48 | return name; 49 | } 50 | 51 | public void setName(String name) 52 | { 53 | this.name = name; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/ReturnInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | 6 | package com.lrcall.appcall.models; 7 | 8 | import com.lrcall.utils.GsonTools; 9 | 10 | public class ReturnInfo 11 | { 12 | private Integer errcode; 13 | private String errmsg; 14 | 15 | public ReturnInfo() 16 | { 17 | super(); 18 | } 19 | 20 | public ReturnInfo(Integer errcode, String errmsg) 21 | { 22 | super(); 23 | this.errcode = errcode; 24 | this.errmsg = errmsg; 25 | } 26 | 27 | public static boolean isSuccess(ReturnInfo info) 28 | { 29 | if (info != null && info.getErrcode() != null && info.getErrcode().intValue() == 0) 30 | { 31 | return true; 32 | } 33 | else 34 | { 35 | return false; 36 | } 37 | } 38 | 39 | public Integer getErrcode() 40 | { 41 | return errcode; 42 | } 43 | 44 | public void setErrcode(Integer errcode) 45 | { 46 | this.errcode = errcode; 47 | } 48 | 49 | public String getErrmsg() 50 | { 51 | return errmsg; 52 | } 53 | 54 | public void setErrmsg(String errmsg) 55 | { 56 | this.errmsg = errmsg; 57 | } 58 | 59 | @Override 60 | public String toString() 61 | { 62 | return GsonTools.toJson(this); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/ReturnListInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.models; 6 | 7 | /** 8 | * Created by libit on 16/4/12. 9 | */ 10 | public class ReturnListInfo extends ReturnInfo 11 | { 12 | protected long count; 13 | protected long totalCount; 14 | 15 | public ReturnListInfo() 16 | { 17 | super(); 18 | } 19 | 20 | public ReturnListInfo(Integer errcode, String errmsg) 21 | { 22 | super(errcode, errmsg); 23 | } 24 | 25 | public ReturnListInfo(ReturnInfo returnInfo) 26 | { 27 | super(returnInfo.getErrcode(), returnInfo.getErrmsg()); 28 | this.count = 0; 29 | this.totalCount = 0; 30 | } 31 | 32 | public ReturnListInfo(ReturnInfo returnInfo, long count, long totalCount) 33 | { 34 | super(returnInfo.getErrcode(), returnInfo.getErrmsg()); 35 | this.count = count; 36 | this.totalCount = totalCount; 37 | } 38 | 39 | public ReturnListInfo(Integer errcode, String errmsg, long count, long totalCount) 40 | { 41 | super(errcode, errmsg); 42 | this.count = count; 43 | this.totalCount = totalCount; 44 | } 45 | 46 | public long getCount() 47 | { 48 | return count; 49 | } 50 | 51 | public void setCount(long count) 52 | { 53 | this.count = count; 54 | } 55 | 56 | public long getTotalCount() 57 | { 58 | return totalCount; 59 | } 60 | 61 | public void setTotalCount(long totalCount) 62 | { 63 | this.totalCount = totalCount; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/models/UserBackupInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.models; 6 | 7 | public class UserBackupInfo 8 | { 9 | private Integer id; 10 | private String userId; 11 | private String dataType; 12 | private String name; 13 | private String data; 14 | private String description; 15 | private String signData; 16 | private long addDateLong; 17 | 18 | public UserBackupInfo() 19 | { 20 | } 21 | 22 | public UserBackupInfo(Integer id, String userId, String dataType, String name, String data, String description, String signData, long addDateLong) 23 | { 24 | this.id = id; 25 | this.userId = userId; 26 | this.dataType = dataType; 27 | this.name = name; 28 | this.data = data; 29 | this.description = description; 30 | this.signData = signData; 31 | this.addDateLong = addDateLong; 32 | } 33 | 34 | public Integer getId() 35 | { 36 | return id; 37 | } 38 | 39 | public void setId(Integer id) 40 | { 41 | this.id = id; 42 | } 43 | 44 | public String getUserId() 45 | { 46 | return userId; 47 | } 48 | 49 | public void setUserId(String userId) 50 | { 51 | this.userId = userId; 52 | } 53 | 54 | public String getDataType() 55 | { 56 | return dataType; 57 | } 58 | 59 | public void setDataType(String dataType) 60 | { 61 | this.dataType = dataType; 62 | } 63 | 64 | public String getName() 65 | { 66 | return name; 67 | } 68 | 69 | public void setName(String name) 70 | { 71 | this.name = name; 72 | } 73 | 74 | public String getData() 75 | { 76 | return data; 77 | } 78 | 79 | public void setData(String data) 80 | { 81 | this.data = data; 82 | } 83 | 84 | public String getDescription() 85 | { 86 | return description; 87 | } 88 | 89 | public void setDescription(String description) 90 | { 91 | this.description = description; 92 | } 93 | 94 | public String getSignData() 95 | { 96 | return signData; 97 | } 98 | 99 | public void setSignData(String signData) 100 | { 101 | this.signData = signData; 102 | } 103 | 104 | public long getAddDateLong() 105 | { 106 | return addDateLong; 107 | } 108 | 109 | public void setAddDateLong(long addDateLong) 110 | { 111 | this.addDateLong = addDateLong; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/services/ApiConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.services; 6 | 7 | import com.lrcall.utils.MyConfig; 8 | 9 | /** 10 | * Created by libit on 16/4/6. 11 | */ 12 | public class ApiConfig 13 | { 14 | public static final String API_VERSION = "1"; 15 | public static final String RELEASE_URL = "http://www.lrcall.com/lr_dialer/user"; 16 | public static final String DEBUG_URL = "http://192.168.0.105:8080/lr_dialer/user"; 17 | public static final String SUBMIT_BUG = getServerUrl() + "/ajaxClientToSubmitBug";//BUG日志提交 18 | public static final String CHECK_UPDATE = getServerUrl() + "/ajaxClientToCheckUpdate";//检查更新 19 | public static final String UPLOAD_FILE = getServerUrl() + "/ajaxFileToUploadBug";//上传文件 20 | public static final String SUBMIT_ADVICE = getServerUrl() + "/ajaxAdviceToSubmit";//提交意见反馈 21 | public static final String USER_LOGIN = getServerUrl() + "/ajaxLogin1";//用户登录 22 | public static final String USER_CHANGE_PWD = getServerUrl() + "/ajaxChangePwd";//用户修改密码 23 | public static final String USER_REGISTER = getServerUrl() + "/ajaxRegister";//用户注册 24 | public static final String GET_USER_INFO = getServerUrl() + "/ajaxGetUserInfo";//获取用户信息 25 | public static final String USER_BACKUP_CONTACTS = getServerUrl() + "/ajaxBackupContactList";//用户备份联系人 26 | public static final String GET_BACKUP_CONFIG = getServerUrl() + "/ajaxUserToGetBackupConfig";//获取用户配置备份信息 27 | public static final String UPDATE_BACKUP_CONFIG = getServerUrl() + "/ajaxUserToUpdateBackupConfig";//用户配置备份 28 | public static final String USER_SHARE = getServerUrl() + "/ajaxShareApp";//用户分享App 29 | 30 | public static String getServerUrl() 31 | { 32 | if (MyConfig.isDebug()) 33 | { 34 | return DEBUG_URL; 35 | } 36 | else 37 | { 38 | return RELEASE_URL; 39 | } 40 | } 41 | 42 | // 关于我们页面 43 | public static String getAboutUrl() 44 | { 45 | return getServerUrl() + "/../about"; 46 | } 47 | 48 | // 更多应用页面 49 | public static String getMoreAppUrl() 50 | { 51 | return getServerUrl() + "/../moreApp"; 52 | // return getServerUrl() + "/pageRegister"; 53 | } 54 | 55 | //教程页面 56 | public static String getTutorialUrl() 57 | { 58 | return getServerUrl() + "/../tutorial"; 59 | } 60 | 61 | //意见反馈页面,已废弃,用原生界面提交意见反馈代替 62 | public static String getAdviceUrl() 63 | { 64 | return getServerUrl() + "/pageAdvice"; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/services/GsonCallBack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.services; 6 | 7 | import com.androidquery.callback.AjaxCallback; 8 | 9 | /** 10 | * Created by libit on 16/4/6. 11 | */ 12 | public class GsonCallBack extends AjaxCallback 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/appcall/services/IAjaxDataResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.appcall.services; 6 | 7 | import com.androidquery.callback.AjaxStatus; 8 | 9 | /** 10 | * Created by libit on 16/4/6. 11 | * ajax数据回调接口 12 | */ 13 | public interface IAjaxDataResponse 14 | { 15 | /** 16 | * ajax回调函数 17 | * 18 | * @param url 19 | * @param result 返回结果 20 | * @param status 状态 21 | * @return 22 | */ 23 | boolean onAjaxDataResponse(String url, String result, AjaxStatus status); 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/contacts/ContactsUtils14.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.contacts; 2 | 3 | import android.text.SpannableStringBuilder; 4 | 5 | import com.lrcall.utils.PinyinTools; 6 | 7 | public class ContactsUtils14 extends ContactsUtils8 8 | { 9 | /** 10 | * 返回带颜色的姓名 11 | * 12 | * @param name 13 | * @param condition 14 | * @return 15 | */ 16 | @Override 17 | public SpannableStringBuilder getSpanNameString(String name, String condition) 18 | { 19 | return PinyinTools.getSpanNumberString(name, condition); 20 | } 21 | 22 | /** 23 | * 返回带颜色的号码 24 | * 25 | * @param number 26 | * @param condition 27 | * @return 28 | */ 29 | @Override 30 | public SpannableStringBuilder getSpanNumberString(String number, String condition) 31 | { 32 | return PinyinTools.getSpanNumberString(number, condition); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/contacts/ContactsUtils19.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.contacts; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.provider.ContactsContract; 6 | 7 | import com.lrcall.utils.LogcatTools; 8 | 9 | public class ContactsUtils19 extends ContactsUtils14 10 | { 11 | public static final String SORT_KEY = "phonebook_label"; 12 | public static final String PHOTO_URI = ContactsContract.Contacts.PHOTO_URI; 13 | 14 | /** 15 | * 测试失败 16 | * 17 | * @param context 18 | * @param contactId 联系人ID 19 | * @return 20 | */ 21 | @Override 22 | public boolean deleteContact(Context context, Long contactId) 23 | { 24 | if (contactId == null) 25 | { 26 | return false; 27 | } 28 | LogcatTools.debug("deleteContact", "contactId:" + contactId); 29 | //根据姓名求id 30 | int count = context.getContentResolver().delete(Uri.parse("content://com.android.contacts/contacts"), "contact_id" + " = ?", new String[]{contactId.toString()}); 31 | return count > 0; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/contacts/ContactsUtils23.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.contacts; 6 | 7 | public class ContactsUtils23 extends ContactsUtils19 8 | { 9 | // private static final int REQUEST_READ_CONTACTS = 0; 10 | // 11 | // private void accessContacts() 12 | // { 13 | // if (!mayRequestContacts()) 14 | // { 15 | // return; 16 | // } 17 | // 18 | // } 19 | // 20 | // private boolean mayRequestContacts() 21 | // { 22 | // if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) 23 | // { 24 | // return true; 25 | // } 26 | // if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) 27 | // { 28 | // return true; 29 | // } 30 | // if (shouldShowRequestPermissionRationale(READ_CONTACTS)) 31 | // { 32 | // Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE).setAction(android.R.string.ok, new View.OnClickListener() 33 | // { 34 | // @Override 35 | // @TargetApi(Build.VERSION_CODES.M) 36 | // public void onClick(View v) 37 | // { 38 | // requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS); 39 | // } 40 | // }); 41 | // } 42 | // else 43 | // { 44 | // requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS); 45 | // } 46 | // return false; 47 | // } 48 | // 49 | // @Override 50 | // public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) 51 | // { 52 | // if (requestCode == REQUEST_READ_CONTACTS) 53 | // { 54 | // if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) 55 | // { 56 | // // Permission granted , Access contacts here or do whatever you need. 57 | // } 58 | // } 59 | // } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/db/DataBaseFactory.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.db; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteDatabase; 5 | import android.database.sqlite.SQLiteOpenHelper; 6 | 7 | import com.lrcall.models.AppInfo; 8 | 9 | /** 10 | * Created by libit on 15/8/26. 11 | */ 12 | public class DataBaseFactory 13 | { 14 | private static DataBaseFactory instance = null; 15 | 16 | private DataBaseFactory() 17 | { 18 | } 19 | 20 | public static DataBaseFactory getInstance() 21 | { 22 | if (instance == null) 23 | { 24 | instance = new DataBaseFactory(); 25 | } 26 | return instance; 27 | } 28 | 29 | public static class DBHelper extends SQLiteOpenHelper 30 | { 31 | private static final int DATABASE_VERSION = 12; 32 | private static final String[] TABLES = new String[]{AppInfo.getCreateTableSQL()// App信息表 33 | }; 34 | 35 | DBHelper(Context context) 36 | { 37 | super(context, DbConstant.AUTHORITY, null, DATABASE_VERSION); 38 | } 39 | 40 | @Override 41 | public void onCreate(SQLiteDatabase db) 42 | { 43 | int count = TABLES.length; 44 | for (int i = 0; i < count; i++) 45 | { 46 | db.execSQL(TABLES[i]); 47 | } 48 | } 49 | 50 | @Override 51 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) 52 | { 53 | if (oldVersion < 1) 54 | { 55 | db.execSQL("DROP TABLE IF EXISTS " + DbConstant.TABLE_NAME_APPINFO); 56 | } 57 | onCreate(db); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/db/DbConstant.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.db; 2 | 3 | import android.content.ContentResolver; 4 | import android.content.ContentUris; 5 | import android.net.Uri; 6 | 7 | import com.lrcall.utils.MyConfig; 8 | 9 | /** 10 | * Created by libit on 15/8/26. 11 | */ 12 | public class DbConstant 13 | { 14 | /** 15 | * AppInfo表 16 | */ 17 | public static final String TABLE_NAME_APPINFO = "app_info"; 18 | /** 19 | * AppInfo隐藏表 20 | */ 21 | public static final String TABLE_NAME_HIDE_APPINFO = "hide_app"; 22 | /** 23 | * AppInfo黑名单表 24 | */ 25 | public static final String TABLE_NAME_BLACK_APPINFO = "black_app"; 26 | /** 27 | * 备份信息表 28 | */ 29 | public static final String TABLE_NAME_BACKUP_INFO = "backup_info"; 30 | /** 31 | * Authority for regular database of the application. 32 | * 值与com.lrcall.db.DBProvider的authorities值相同 33 | */ 34 | public static final String AUTHORITY = MyConfig.AUTHORITY_NAME + ".db"; 35 | /** 36 | * Base content type for appinfo objects. 37 | */ 38 | public static final String BASE_DIR_TYPE = "vnd.android.cursor.dir/vnd.starter"; 39 | /** 40 | * Base item content type for appinfo objects. 41 | */ 42 | public static final String BASE_ITEM_TYPE = "vnd.android.cursor.item/vnd.starter"; 43 | 44 | /** 45 | * Base uri for the table.
46 | * To append with FIELD_ID 47 | * 48 | * @param tableName 表名 49 | * @return 表的Uri 50 | * @see ContentUris#appendId(android.net.Uri.Builder, long) 51 | */ 52 | public static Uri getTableUriBase(String tableName) 53 | { 54 | return Uri.parse(ContentResolver.SCHEME_CONTENT + "://" + AUTHORITY + "/" + tableName + "/"); 55 | } 56 | 57 | /** 58 | * Uri of table. 59 | * 60 | * @param tableName 表名 61 | * @return 表的Uri 62 | */ 63 | public static Uri getTableUri(String tableName) 64 | { 65 | return Uri.parse(ContentResolver.SCHEME_CONTENT + "://" + AUTHORITY + "/" + tableName); 66 | } 67 | 68 | /** 69 | * Content type for table 70 | * 71 | * @param tableName 表名 72 | * @return 73 | */ 74 | public static String getTableContentType(String tableName) 75 | { 76 | return BASE_DIR_TYPE + "." + tableName; 77 | } 78 | 79 | /** 80 | * Item type for table 81 | * 82 | * @param tableName 表名 83 | * @return 84 | */ 85 | public static String getTableContentItemType(String tableName) 86 | { 87 | return BASE_ITEM_TYPE + "." + tableName; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/enums/EventTypeLayoutSideMain.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.enums; 6 | 7 | /** 8 | * Created by libit on 16/6/30. 9 | */ 10 | public enum EventTypeLayoutSideMain 11 | { 12 | CLOSE_DRAWER("close_drawer"); 13 | private String type; 14 | 15 | EventTypeLayoutSideMain(String type) 16 | { 17 | this.type = type; 18 | } 19 | 20 | public String getType() 21 | { 22 | return type; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/models/DbObject.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.models; 2 | 3 | import android.content.ContentValues; 4 | import android.database.Cursor; 5 | 6 | /** 7 | * Created by libit on 15/8/31. 8 | */ 9 | public abstract class DbObject 10 | { 11 | /** 12 | * Primary key id. 13 | * 14 | * @see Long 15 | */ 16 | public static final String FIELD_ID = "id"; 17 | 18 | /** 19 | * 获取创建表的SQL语句 20 | * 21 | * @return SQL语句 22 | */ 23 | public static String getCreateTableSQL() 24 | { 25 | return null; 26 | } 27 | 28 | /** 29 | * 从数据库中取出对象 30 | * 31 | * @param cursor 32 | * @return 33 | */ 34 | public static Object getObjectFromDb(Cursor cursor) 35 | { 36 | return null; 37 | } 38 | 39 | /** 40 | * 转换成数据库存储的数据 41 | * 42 | * @return ContentValues 43 | */ 44 | public abstract ContentValues getObjectContentValues(); 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/models/FuncInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.models; 6 | 7 | public class FuncInfo 8 | { 9 | private int imgRes; 10 | private String label; 11 | 12 | public FuncInfo() 13 | { 14 | } 15 | 16 | public FuncInfo(int imgRes, String label) 17 | { 18 | this.imgRes = imgRes; 19 | this.label = label; 20 | } 21 | 22 | public int getImgRes() 23 | { 24 | return imgRes; 25 | } 26 | 27 | public void setImgRes(int imgRes) 28 | { 29 | this.imgRes = imgRes; 30 | } 31 | 32 | public String getLabel() 33 | { 34 | return label; 35 | } 36 | 37 | public void setLabel(String label) 38 | { 39 | this.label = label; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/models/MemoryInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2015. 4 | */ 5 | package com.lrcall.models; 6 | 7 | /** 8 | * Created by libit on 15/9/30. 9 | */ 10 | public class MemoryInfo 11 | { 12 | private long totalMemory; 13 | private long unusedMemory; 14 | 15 | public long getTotalMemory() 16 | { 17 | return totalMemory; 18 | } 19 | 20 | public void setTotalMemory(long totalMemory) 21 | { 22 | this.totalMemory = totalMemory; 23 | } 24 | 25 | public long getUnusedMemory() 26 | { 27 | return unusedMemory; 28 | } 29 | 30 | public void setUnusedMemory(long unusedMemory) 31 | { 32 | this.unusedMemory = unusedMemory; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/models/TabInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.models; 6 | 7 | import android.widget.ImageView; 8 | import android.widget.TextView; 9 | 10 | /** 11 | * Created by libit on 16/5/8. 12 | */ 13 | public class TabInfo 14 | { 15 | private String label; 16 | private int imgResId; 17 | private Class loadClass; 18 | private ImageView imgIcon; 19 | private TextView tvLabel; 20 | 21 | public TabInfo() 22 | { 23 | } 24 | 25 | public TabInfo(String label, int imgResId, Class loadClass) 26 | { 27 | this.label = label; 28 | this.imgResId = imgResId; 29 | this.loadClass = loadClass; 30 | } 31 | 32 | public String getLabel() 33 | { 34 | return label; 35 | } 36 | 37 | public void setLabel(String label) 38 | { 39 | this.label = label; 40 | } 41 | 42 | public int getImgResId() 43 | { 44 | return imgResId; 45 | } 46 | 47 | public void setImgResId(int imgResId) 48 | { 49 | this.imgResId = imgResId; 50 | } 51 | 52 | public Class getLoadClass() 53 | { 54 | return loadClass; 55 | } 56 | 57 | public void setLoadClass(Class loadClass) 58 | { 59 | this.loadClass = loadClass; 60 | } 61 | 62 | public ImageView getImgIcon() 63 | { 64 | return imgIcon; 65 | } 66 | 67 | public void setImgIcon(ImageView imgIcon) 68 | { 69 | this.imgIcon = imgIcon; 70 | } 71 | 72 | public TextView getTvLabel() 73 | { 74 | return tvLabel; 75 | } 76 | 77 | public void setTvLabel(TextView tvLabel) 78 | { 79 | this.tvLabel = tvLabel; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/models/UpdateInfo.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.models; 2 | 3 | public class UpdateInfo 4 | { 5 | private String platform; 6 | private String version; 7 | private Integer versionCode; 8 | private String url; 9 | private String description; 10 | private Long addDateLong; 11 | 12 | public UpdateInfo() 13 | { 14 | super(); 15 | } 16 | 17 | public String getPlatform() 18 | { 19 | return platform; 20 | } 21 | 22 | public void setPlatform(String platform) 23 | { 24 | this.platform = platform; 25 | } 26 | 27 | public String getVersion() 28 | { 29 | return version; 30 | } 31 | 32 | public void setVersion(String version) 33 | { 34 | this.version = version; 35 | } 36 | 37 | public Integer getVersionCode() 38 | { 39 | return versionCode; 40 | } 41 | 42 | public void setVersionCode(Integer versionCode) 43 | { 44 | this.versionCode = versionCode; 45 | } 46 | 47 | public String getUrl() 48 | { 49 | return url; 50 | } 51 | 52 | public void setUrl(String url) 53 | { 54 | this.url = url; 55 | } 56 | 57 | public String getDescription() 58 | { 59 | return description; 60 | } 61 | 62 | public void setDescription(String description) 63 | { 64 | this.description = description; 65 | } 66 | 67 | public Long getAddDateLong() 68 | { 69 | return addDateLong; 70 | } 71 | 72 | public void setAddDateLong(Long addDateLong) 73 | { 74 | this.addDateLong = addDateLong; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/FragmentSms.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui; 6 | 7 | import android.os.Bundle; 8 | import android.support.v4.app.Fragment; 9 | import android.view.LayoutInflater; 10 | import android.view.View; 11 | import android.view.ViewGroup; 12 | 13 | import com.lrcall.appcall.R; 14 | 15 | public class FragmentSms extends Fragment 16 | { 17 | private static final String TAG = FragmentSms.class.getSimpleName(); 18 | 19 | @Override 20 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 21 | { 22 | // Inflate the layout for this fragment 23 | View rootView = inflater.inflate(R.layout.fragment_sms, container, false); 24 | initView(rootView); 25 | return rootView; 26 | } 27 | 28 | protected void initView(View rootView) 29 | { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/MyBaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.ui; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.widget.Toolbar; 5 | import android.view.View; 6 | 7 | import com.lrcall.appcall.R; 8 | 9 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity; 10 | 11 | /** 12 | * 自定义ActionBar基类 13 | * Created by libit on 15/8/30. 14 | */ 15 | public class MyBaseActivity extends SwipeBackActivity 16 | { 17 | protected Toolbar mToolbar; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) 21 | { 22 | super.onCreate(savedInstanceState); 23 | // setOverflowShowingAlways(); 24 | } 25 | 26 | protected void viewInit() 27 | { 28 | mToolbar = (Toolbar) findViewById(R.id.toolbar_title); 29 | mToolbar.setTitle(getTitle().toString());// 标题的文字需在setSupportActionBar之前,不然会无效 30 | // mToolbar.setSubtitle("副标题"); 31 | setSupportActionBar(mToolbar); 32 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 33 | // setBackButton(); 34 | } 35 | 36 | //后退按钮 37 | protected void setBackButton() 38 | { 39 | // mToolbar.setNavigationIcon(R.drawable.back); 40 | mToolbar.setNavigationOnClickListener(new View.OnClickListener() 41 | { 42 | @Override 43 | public void onClick(View v) 44 | { 45 | finish(); 46 | } 47 | }); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/MyBaseFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui; 6 | 7 | import android.support.v4.app.Fragment; 8 | import android.view.View; 9 | 10 | import com.lrcall.utils.LogcatTools; 11 | 12 | /** 13 | * Created by libit on 16/4/27. 14 | */ 15 | public class MyBaseFragment extends Fragment 16 | { 17 | private static final String TAG = MyBaseFragment.class.getSimpleName(); 18 | protected boolean isInit = false;//视图是否已经初始化 19 | 20 | protected void viewInit(View rootView) 21 | { 22 | isInit = true; 23 | } 24 | 25 | @Override 26 | public void setUserVisibleHint(boolean isVisibleToUser) 27 | { 28 | super.setUserVisibleHint(isVisibleToUser); 29 | LogcatTools.debug(TAG, "fragment setUserVisibleHint:" + isVisibleToUser); 30 | if (isInit) 31 | { 32 | if (isVisibleToUser) 33 | { 34 | fragmentShow(); 35 | } 36 | else 37 | { 38 | fragmentHide(); 39 | } 40 | } 41 | } 42 | 43 | /** 44 | * 当fragment隐藏时调用 45 | * 注意:第一次调用时必须等待视图已经初始化完成。 46 | */ 47 | public void fragmentHide() 48 | { 49 | } 50 | 51 | /** 52 | * 当fragment显示时调用 53 | * 注意:第一次调用时必须等待视图已经初始化完成。 54 | */ 55 | public void fragmentShow() 56 | { 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/SearchContentView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui; 6 | 7 | import android.content.Context; 8 | import android.support.v7.widget.SearchView; 9 | import android.util.AttributeSet; 10 | import android.widget.Toast; 11 | 12 | /** 13 | * Created by libit on 16/5/8. 14 | */ 15 | public class SearchContentView extends SearchView implements SearchView.OnQueryTextListener 16 | { 17 | public SearchContentView(Context context) 18 | { 19 | super(context); 20 | setOnQueryTextListener(this); 21 | } 22 | 23 | public SearchContentView(Context context, AttributeSet attrs) 24 | { 25 | super(context, attrs); 26 | setOnQueryTextListener(this); 27 | } 28 | 29 | public SearchContentView(Context context, AttributeSet attrs, int defStyleAttr) 30 | { 31 | super(context, attrs, defStyleAttr); 32 | setOnQueryTextListener(this); 33 | } 34 | 35 | /** 36 | * Called when the user submits the query. This could be due to a key press on the 37 | * keyboard or due to pressing a submit button. 38 | * The listener can override the standard behavior by returning true 39 | * to indicate that it has handled the submit request. Otherwise return false to 40 | * let the SearchView handle the submission by launching any associated intent. 41 | * 42 | * @param query the query text that is to be submitted 43 | * @return true if the query has been handled by the listener, false to let the 44 | * SearchView perform the default action. 45 | */ 46 | @Override 47 | public boolean onQueryTextSubmit(String query) 48 | { 49 | Toast.makeText(this.getContext(), "onQueryTextSubmit", Toast.LENGTH_LONG).show(); 50 | return true; 51 | } 52 | 53 | /** 54 | * Called when the query text is changed by the user. 55 | * 56 | * @param newText the new content of the query text field. 57 | * @return false if the SearchView should perform the default action of showing any 58 | * suggestions if available, true if the action was handled by the listener. 59 | */ 60 | @Override 61 | public boolean onQueryTextChange(String newText) 62 | { 63 | Toast.makeText(this.getContext(), "onQueryTextChange", Toast.LENGTH_LONG).show(); 64 | return true; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/adapter/BaseCallLogsAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.adapter; 6 | 7 | import android.content.Context; 8 | import android.widget.BaseAdapter; 9 | 10 | import com.lrcall.models.CallLogInfo; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * Created by libit on 16/4/30. 16 | */ 17 | public abstract class BaseCallLogsAdapter extends BaseAdapter 18 | { 19 | public interface IBaseCallLogsAdapterItemClicked 20 | { 21 | void onItemClicked(CallLogInfo callLogInfo); 22 | } 23 | 24 | protected Context context; 25 | protected List list; 26 | 27 | public BaseCallLogsAdapter(Context context, List list) 28 | { 29 | this.context = context; 30 | this.list = list; 31 | } 32 | 33 | @Override 34 | public int getCount() 35 | { 36 | return list != null ? list.size() : 0; 37 | } 38 | 39 | @Override 40 | public Object getItem(int position) 41 | { 42 | return list != null ? list.get(position) : null; 43 | } 44 | 45 | @Override 46 | public long getItemId(int position) 47 | { 48 | return position; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/adapter/ContactCallLogsAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.adapter; 6 | 7 | import android.content.Context; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.ImageView; 12 | import android.widget.TextView; 13 | 14 | import com.lrcall.appcall.R; 15 | import com.lrcall.models.CallLogInfo; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Created by libit on 16/4/30. 21 | */ 22 | public class ContactCallLogsAdapter extends CallLogsAdapter 23 | { 24 | public ContactCallLogsAdapter(Context context, List list, ICallLogsAdapterItemClicked callLogsAdapterItemClicked) 25 | { 26 | super(context, list, callLogsAdapterItemClicked); 27 | } 28 | 29 | @Override 30 | public View getView(int position, View convertView, ViewGroup parent) 31 | { 32 | convertView = LayoutInflater.from(context).inflate(R.layout.item_contact_call_log, null); 33 | ImageView ivCallLogType = (ImageView) convertView.findViewById(R.id.call_log_type_icon); 34 | TextView tvNumber = (TextView) convertView.findViewById(R.id.call_log_number); 35 | TextView tvDuration = (TextView) convertView.findViewById(R.id.call_log_duration); 36 | TextView tvTime = (TextView) convertView.findViewById(R.id.call_log_date); 37 | final CallLogInfo callLogInfo = list.get(position); 38 | ivCallLogType.setImageResource(CallLogInfo.getTypeRes(callLogInfo.getType())); 39 | tvNumber.setText(callLogInfo.getNumber()); 40 | tvDuration.setText(CallLogInfo.getDurationString(callLogInfo.getDuration())); 41 | tvTime.setText(CallLogInfo.getCustomerDate(callLogInfo.getDate())); 42 | convertView.findViewById(R.id.v_call).setOnClickListener(new View.OnClickListener() 43 | { 44 | @Override 45 | public void onClick(View v) 46 | { 47 | if (callLogsAdapterItemClicked != null) 48 | { 49 | callLogsAdapterItemClicked.onCallClicked(callLogInfo); 50 | } 51 | } 52 | }); 53 | convertView.setOnClickListener(new View.OnClickListener() 54 | { 55 | @Override 56 | public void onClick(View v) 57 | { 58 | if (callLogsAdapterItemClicked != null) 59 | { 60 | callLogsAdapterItemClicked.onItemClicked(callLogInfo); 61 | } 62 | } 63 | }); 64 | return convertView; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/adapter/ContactEditNumbersAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.adapter; 6 | 7 | import android.content.Context; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.EditText; 12 | import android.widget.TextView; 13 | 14 | import com.lrcall.appcall.R; 15 | import com.lrcall.models.ContactInfo; 16 | 17 | import java.util.List; 18 | 19 | /** 20 | * Created by libit on 16/4/30. 21 | */ 22 | public class ContactEditNumbersAdapter extends BaseContactsAdapter 23 | { 24 | public interface IContactEditNumberAdapterItemClicked extends IBaseContactsAdapterItemClicked 25 | { 26 | void onDeleteClicked(ContactInfo.PhoneInfo phoneInfo); 27 | } 28 | 29 | private IContactEditNumberAdapterItemClicked contactEditNumberAdapterItemClicked; 30 | 31 | public ContactEditNumbersAdapter(Context context, List list, IContactEditNumberAdapterItemClicked contactEditNumberAdapterItemClicked) 32 | { 33 | super(context, list); 34 | this.contactEditNumberAdapterItemClicked = contactEditNumberAdapterItemClicked; 35 | } 36 | 37 | @Override 38 | public View getView(int position, View convertView, ViewGroup parent) 39 | { 40 | convertView = LayoutInflater.from(context).inflate(R.layout.item_contact_number_edit, null); 41 | EditText etNumber = (EditText) convertView.findViewById(R.id.et_number); 42 | TextView tvType = (TextView) convertView.findViewById(R.id.tv_type); 43 | final ContactInfo.PhoneInfo phoneInfo = list.get(position); 44 | final String number = phoneInfo.getNumber(); 45 | String type = phoneInfo.getType(); 46 | etNumber.setText(number); 47 | tvType.setText(type); 48 | convertView.findViewById(R.id.btn_delete).setOnClickListener(new View.OnClickListener() 49 | { 50 | @Override 51 | public void onClick(View v) 52 | { 53 | if (contactEditNumberAdapterItemClicked != null) 54 | { 55 | contactEditNumberAdapterItemClicked.onDeleteClicked(phoneInfo); 56 | } 57 | } 58 | }); 59 | convertView.setOnClickListener(new View.OnClickListener() 60 | { 61 | @Override 62 | public void onClick(View v) 63 | { 64 | if (contactEditNumberAdapterItemClicked != null) 65 | { 66 | contactEditNumberAdapterItemClicked.onItemClicked(phoneInfo); 67 | } 68 | } 69 | }); 70 | return convertView; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/adapter/ContactNumbersAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.adapter; 6 | 7 | import android.content.Context; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.TextView; 12 | 13 | import com.lrcall.appcall.R; 14 | import com.lrcall.models.ContactInfo; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * Created by libit on 16/4/30. 20 | */ 21 | public class ContactNumbersAdapter extends BaseContactsAdapter 22 | { 23 | public interface IContactNumberAdapterItemClicked extends IBaseContactsAdapterItemClicked 24 | { 25 | void onCallClicked(ContactInfo.PhoneInfo phoneInfo); 26 | } 27 | 28 | private IContactNumberAdapterItemClicked contactNumberAdapterItemClicked; 29 | 30 | public ContactNumbersAdapter(Context context, List list, IContactNumberAdapterItemClicked contactNumberAdapterItemClicked) 31 | { 32 | super(context, list); 33 | this.contactNumberAdapterItemClicked = contactNumberAdapterItemClicked; 34 | } 35 | 36 | @Override 37 | public View getView(int position, View convertView, ViewGroup parent) 38 | { 39 | convertView = LayoutInflater.from(context).inflate(R.layout.item_contact_number, null); 40 | TextView tvNumber = (TextView) convertView.findViewById(R.id.tv_number); 41 | TextView tvType = (TextView) convertView.findViewById(R.id.tv_type); 42 | TextView tvLocal = (TextView) convertView.findViewById(R.id.tv_local); 43 | final ContactInfo.PhoneInfo phoneInfo = list.get(position); 44 | final String number = phoneInfo.getNumber(); 45 | String type = phoneInfo.getType(); 46 | tvNumber.setText(number); 47 | tvType.setText(type); 48 | convertView.findViewById(R.id.v_call).setOnClickListener(new View.OnClickListener() 49 | { 50 | @Override 51 | public void onClick(View v) 52 | { 53 | if (contactNumberAdapterItemClicked != null) 54 | { 55 | contactNumberAdapterItemClicked.onCallClicked(phoneInfo); 56 | } 57 | } 58 | }); 59 | convertView.setOnClickListener(new View.OnClickListener() 60 | { 61 | @Override 62 | public void onClick(View v) 63 | { 64 | if (contactNumberAdapterItemClicked != null) 65 | { 66 | contactNumberAdapterItemClicked.onItemClicked(phoneInfo); 67 | } 68 | } 69 | }); 70 | return convertView; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/adapter/FuncsAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.adapter; 6 | 7 | import android.content.Context; 8 | import android.view.LayoutInflater; 9 | import android.view.View; 10 | import android.view.ViewGroup; 11 | import android.widget.BaseAdapter; 12 | import android.widget.ImageView; 13 | import android.widget.TextView; 14 | 15 | import com.lrcall.appcall.R; 16 | import com.lrcall.models.FuncInfo; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Created by libit on 16/4/30. 22 | */ 23 | public class FuncsAdapter extends BaseAdapter 24 | { 25 | public interface IFuncsAdapterItemClicked 26 | { 27 | void onFuncClicked(FuncInfo funcInfo); 28 | } 29 | 30 | private Context context; 31 | private List list; 32 | private IFuncsAdapterItemClicked funcsAdapterItemClicked; 33 | 34 | public FuncsAdapter(Context context, List list, IFuncsAdapterItemClicked funcsAdapterItemClicked) 35 | { 36 | this.context = context; 37 | this.list = list; 38 | this.funcsAdapterItemClicked = funcsAdapterItemClicked; 39 | } 40 | 41 | @Override 42 | public int getCount() 43 | { 44 | return list.size(); 45 | } 46 | 47 | @Override 48 | public Object getItem(int position) 49 | { 50 | return list.get(position); 51 | } 52 | 53 | @Override 54 | public long getItemId(int position) 55 | { 56 | return position; 57 | } 58 | 59 | @Override 60 | public View getView(int position, View convertView, ViewGroup parent) 61 | { 62 | convertView = LayoutInflater.from(context).inflate(R.layout.item_func, null); 63 | ImageView ivHead = (ImageView) convertView.findViewById(R.id.iv_head); 64 | TextView tvName = (TextView) convertView.findViewById(R.id.tv_label); 65 | final FuncInfo funcInfo = list.get(position); 66 | ivHead.setImageResource(funcInfo.getImgRes()); 67 | tvName.setText(funcInfo.getLabel()); 68 | convertView.setOnClickListener(new View.OnClickListener() 69 | { 70 | @Override 71 | public void onClick(View v) 72 | { 73 | if (funcsAdapterItemClicked != null) 74 | { 75 | funcsAdapterItemClicked.onFuncClicked(funcInfo); 76 | } 77 | } 78 | }); 79 | return convertView; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/AddressAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | public interface AddressAware 8 | { 9 | void setAddressWidget(AddressText address); 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/AddressText.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.text.InputType; 9 | import android.util.AttributeSet; 10 | import android.widget.EditText; 11 | 12 | import com.lrcall.utils.StringTools; 13 | import com.lrcall.utils.apptools.AppFactory; 14 | 15 | import java.lang.reflect.Method; 16 | 17 | public class AddressText extends EditText 18 | { 19 | private InputNumberChangedListener inputNumberChangedListener; 20 | 21 | public AddressText(Context context, AttributeSet attrs) 22 | { 23 | super(context, attrs); 24 | if (!AppFactory.isCompatible(11)) 25 | { 26 | setInputType(InputType.TYPE_NULL); 27 | } 28 | else 29 | { 30 | try 31 | { 32 | Class cls = EditText.class; 33 | Method setShowSoftInputOnFocus = cls.getMethod("setShowSoftInputOnFocus", boolean.class); 34 | setShowSoftInputOnFocus.setAccessible(true); 35 | setShowSoftInputOnFocus.invoke(this, false); 36 | } 37 | catch (Exception e) 38 | { 39 | e.printStackTrace(); 40 | } 41 | } 42 | setCursorVisible(false); 43 | } 44 | 45 | public void setInputNumberChangedListener(InputNumberChangedListener l) 46 | { 47 | inputNumberChangedListener = l; 48 | } 49 | 50 | @Override 51 | protected void onTextChanged(CharSequence text, int start, int before, int after) 52 | { 53 | if (inputNumberChangedListener != null) 54 | { 55 | inputNumberChangedListener.onInputNumberChanged(this.getText().toString()); 56 | } 57 | if (StringTools.isNull(text.toString())) 58 | { 59 | setCursorVisible(false); 60 | } 61 | else 62 | { 63 | setCursorVisible(true); 64 | } 65 | super.onTextChanged(text, start, before, after); 66 | } 67 | 68 | public interface InputNumberChangedListener 69 | { 70 | void onInputNumberChanged(String txt); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/EraseButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.util.AttributeSet; 9 | import android.view.View; 10 | import android.view.View.OnClickListener; 11 | import android.view.View.OnLongClickListener; 12 | import android.widget.ImageView; 13 | 14 | public class EraseButton extends ImageView implements AddressAware, OnClickListener, OnLongClickListener 15 | { 16 | private AddressText address; 17 | 18 | public EraseButton(Context context, AttributeSet attrs) 19 | { 20 | super(context, attrs); 21 | setOnClickListener(this); 22 | setOnLongClickListener(this); 23 | } 24 | 25 | public void onClick(View v) 26 | { 27 | if (address.getText().length() > 0) 28 | { 29 | int lBegin = address.getSelectionStart(); 30 | if (lBegin == -1) 31 | { 32 | lBegin = address.getEditableText().length() - 1; 33 | } 34 | if (lBegin > 0) 35 | { 36 | address.getEditableText().delete(lBegin - 1, lBegin); 37 | } 38 | } 39 | } 40 | 41 | public boolean onLongClick(View v) 42 | { 43 | address.getEditableText().clear(); 44 | // address.setText(""); 45 | return true; 46 | } 47 | 48 | public void setAddressWidget(AddressText view) 49 | { 50 | address = view; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/MarqueeTextView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.graphics.Rect; 9 | import android.util.AttributeSet; 10 | import android.widget.TextView; 11 | 12 | public class MarqueeTextView extends TextView 13 | { 14 | public MarqueeTextView(Context context, AttributeSet attrs) 15 | { 16 | super(context, attrs); 17 | } 18 | 19 | @Override 20 | protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) 21 | { 22 | if (focused) 23 | super.onFocusChanged(focused, direction, previouslyFocusedRect); 24 | } 25 | 26 | @Override 27 | public void onWindowFocusChanged(boolean focused) 28 | { 29 | if (focused) 30 | super.onWindowFocusChanged(focused); 31 | } 32 | 33 | @Override 34 | public boolean isFocused() 35 | { 36 | return true; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/MaxHeightGridView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.util.AttributeSet; 9 | import android.widget.GridView; 10 | 11 | /** 12 | * Created by libit on 16/5/7. 13 | */ 14 | public class MaxHeightGridView extends GridView 15 | { 16 | public MaxHeightGridView(Context context) 17 | { 18 | super(context); 19 | } 20 | 21 | public MaxHeightGridView(Context context, AttributeSet attrs) 22 | { 23 | super(context, attrs); 24 | } 25 | 26 | public MaxHeightGridView(Context context, AttributeSet attrs, int defStyle) 27 | { 28 | super(context, attrs, defStyle); 29 | } 30 | 31 | //解决和ScrollView显示的问题 32 | @Override 33 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 34 | { 35 | int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); 36 | super.onMeasure(widthMeasureSpec, expandSpec); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/MaxHeightListView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.util.AttributeSet; 9 | import android.widget.ListView; 10 | 11 | /** 12 | * Created by libit on 16/5/7. 13 | */ 14 | public class MaxHeightListView extends ListView 15 | { 16 | public MaxHeightListView(Context context) 17 | { 18 | super(context); 19 | } 20 | 21 | public MaxHeightListView(Context context, AttributeSet attrs) 22 | { 23 | super(context, attrs); 24 | } 25 | 26 | public MaxHeightListView(Context context, AttributeSet attrs, int defStyle) 27 | { 28 | super(context, attrs, defStyle); 29 | } 30 | 31 | //解决和ScrollView显示的问题 32 | @Override 33 | public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 34 | { 35 | int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); 36 | super.onMeasure(widthMeasureSpec, expandSpec); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/customer/Numpad.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.customer; 6 | 7 | import android.content.Context; 8 | import android.content.res.TypedArray; 9 | import android.util.AttributeSet; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.view.ViewGroup; 13 | import android.widget.LinearLayout; 14 | 15 | import com.lrcall.appcall.R; 16 | 17 | import java.util.ArrayList; 18 | import java.util.Collection; 19 | 20 | public class Numpad extends LinearLayout implements AddressAware 21 | { 22 | private boolean mPlayDtmf; 23 | 24 | public Numpad(Context context, boolean playDtmf) 25 | { 26 | super(context); 27 | mPlayDtmf = playDtmf; 28 | LayoutInflater.from(context).inflate(R.layout.layout_numpad, this); 29 | setLongClickable(true); 30 | onFinishInflate(); 31 | } 32 | 33 | public Numpad(Context context, AttributeSet attrs) 34 | { 35 | super(context, attrs); 36 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Numpad); 37 | mPlayDtmf = 1 == a.getInt(R.styleable.Numpad_play_dtmf, 1); 38 | a.recycle(); 39 | LayoutInflater.from(context).inflate(R.layout.layout_numpad, this); 40 | setLongClickable(true); 41 | } 42 | 43 | public void setPlayDtmf(boolean sendDtmf) 44 | { 45 | this.mPlayDtmf = sendDtmf; 46 | } 47 | 48 | @Override 49 | protected final void onFinishInflate() 50 | { 51 | super.onFinishInflate(); 52 | } 53 | 54 | public void setAddressWidget(AddressText address) 55 | { 56 | for (AddressAware v : retrieveChildren(this, AddressAware.class)) 57 | { 58 | v.setAddressWidget(address); 59 | } 60 | } 61 | 62 | private final Collection retrieveChildren(ViewGroup viewGroup, Class clazz) 63 | { 64 | final Collection views = new ArrayList(); 65 | for (int i = 0; i < viewGroup.getChildCount(); i++) 66 | { 67 | View v = viewGroup.getChildAt(i); 68 | if (v instanceof ViewGroup) 69 | { 70 | views.addAll(retrieveChildren((ViewGroup) v, clazz)); 71 | } 72 | else 73 | { 74 | if (clazz.isInstance(v)) 75 | views.add(clazz.cast(v)); 76 | } 77 | } 78 | return views; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/dialog/DialogContactNumberAdd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.dialog; 6 | 7 | import android.app.Dialog; 8 | import android.content.Context; 9 | import android.os.Bundle; 10 | import android.view.View; 11 | import android.view.View.OnClickListener; 12 | import android.view.Window; 13 | import android.widget.EditText; 14 | 15 | import com.lrcall.appcall.R; 16 | 17 | public class DialogContactNumberAdd extends Dialog implements OnClickListener 18 | { 19 | private EditText etNumber, etType; 20 | private OnContactNumberAddListenser listenser; 21 | 22 | public DialogContactNumberAdd(Context context, OnContactNumberAddListenser listenser) 23 | { 24 | super(context, R.style.MyDialog); 25 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); 26 | setCancelable(false); 27 | this.listenser = listenser; 28 | } 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) 32 | { 33 | super.onCreate(savedInstanceState); 34 | setContentView(R.layout.dialog_contact_number_add); 35 | initView(); 36 | } 37 | 38 | private void initView() 39 | { 40 | etNumber = (EditText) findViewById(R.id.et_number); 41 | etType = (EditText) findViewById(R.id.et_type); 42 | findViewById(R.id.dialog_btn_ok).setOnClickListener(this); 43 | findViewById(R.id.dialog_btn_cancel).setOnClickListener(this); 44 | } 45 | 46 | @Override 47 | public void onClick(View v) 48 | { 49 | switch (v.getId()) 50 | { 51 | case R.id.dialog_btn_ok: 52 | { 53 | if (listenser != null) 54 | { 55 | listenser.onOkClick(etType.getText().toString(), etNumber.getText().toString()); 56 | } 57 | dismiss(); 58 | break; 59 | } 60 | case R.id.dialog_btn_cancel: 61 | { 62 | if (listenser != null) 63 | { 64 | listenser.onCancelClick(); 65 | } 66 | dismiss(); 67 | break; 68 | } 69 | } 70 | } 71 | 72 | public interface OnContactNumberAddListenser 73 | { 74 | void onOkClick(String type, String number); 75 | 76 | void onCancelClick(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/dialog/DialogList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.dialog; 6 | 7 | import android.app.Dialog; 8 | import android.content.Context; 9 | import android.os.Bundle; 10 | import android.view.Window; 11 | import android.widget.ListAdapter; 12 | import android.widget.ListView; 13 | 14 | import com.lrcall.appcall.R; 15 | 16 | public class DialogList extends Dialog 17 | { 18 | private ListView listView; 19 | private ListAdapter adapter; 20 | 21 | public DialogList(Context context, ListAdapter adapter) 22 | { 23 | super(context, R.style.MyDialog); 24 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); 25 | // setCancelable(false); 26 | this.adapter = adapter; 27 | } 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) 31 | { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.dialog_list); 34 | initView(); 35 | } 36 | 37 | private void initView() 38 | { 39 | listView = (ListView) findViewById(R.id.list_view); 40 | listView.setAdapter(adapter); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/ui/dialog/MyProgressDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.ui.dialog; 6 | 7 | import android.app.Dialog; 8 | import android.content.Context; 9 | import android.graphics.drawable.AnimationDrawable; 10 | import android.view.LayoutInflater; 11 | import android.view.View; 12 | import android.widget.ImageView; 13 | import android.widget.TextView; 14 | 15 | import com.lrcall.appcall.R; 16 | 17 | public class MyProgressDialog 18 | { 19 | public final Dialog mDialog; 20 | private AnimationDrawable animationDrawable = null; 21 | 22 | public MyProgressDialog(Context context, String message) 23 | { 24 | LayoutInflater inflater = LayoutInflater.from(context); 25 | View view = inflater.inflate(R.layout.progress_view, null); 26 | TextView text = (TextView) view.findViewById(R.id.progress_message); 27 | text.setText(message); 28 | ImageView loadingImage = (ImageView) view.findViewById(R.id.progress_view); 29 | loadingImage.setImageResource(R.anim.loading_animation); 30 | animationDrawable = (AnimationDrawable) loadingImage.getDrawable(); 31 | if (animationDrawable != null) 32 | { 33 | animationDrawable.setOneShot(false); 34 | animationDrawable.start(); 35 | } 36 | mDialog = new Dialog(context, R.style.MyDialog); 37 | mDialog.setContentView(view); 38 | mDialog.setCanceledOnTouchOutside(false); 39 | } 40 | 41 | public void show() 42 | { 43 | mDialog.show(); 44 | } 45 | 46 | public void setCanceledOnTouchOutside(boolean cancel) 47 | { 48 | mDialog.setCanceledOnTouchOutside(cancel); 49 | } 50 | 51 | public void dismiss() 52 | { 53 | if (mDialog.isShowing()) 54 | { 55 | mDialog.dismiss(); 56 | animationDrawable.stop(); 57 | } 58 | } 59 | 60 | public boolean isShowing() 61 | { 62 | return mDialog.isShowing(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/CallTools.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.utils; 6 | 7 | import android.app.PendingIntent; 8 | import android.content.Context; 9 | import android.content.Intent; 10 | import android.net.Uri; 11 | 12 | import com.lrcall.appcall.models.ErrorInfo; 13 | import com.lrcall.appcall.models.ReturnInfo; 14 | 15 | /** 16 | * Created by libit on 16/5/1. 17 | */ 18 | public class CallTools 19 | { 20 | //呼叫 21 | public static ReturnInfo makeCall(Context context, String number) 22 | { 23 | if (StringTools.isNull(number)) 24 | { 25 | return new ReturnInfo(ErrorInfo.getForbiddenErrorId(), "呼叫号码不能为空!"); 26 | } 27 | try 28 | { 29 | Intent i = new Intent(Intent.ACTION_CALL); 30 | i.setData(Uri.fromParts("tel", number, null)); 31 | PendingIntent.getActivity(context, 0, i, 0).send(); 32 | return new ReturnInfo(ErrorInfo.getSuccessId(), "呼叫号码成功!"); 33 | } 34 | catch (PendingIntent.CanceledException e) 35 | { 36 | e.printStackTrace(); 37 | return new ReturnInfo(ErrorInfo.getForbiddenErrorId(), e.getMessage()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/ConstValues.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.utils; 2 | 3 | /** 4 | * Created by libit on 15/8/31. 5 | */ 6 | public class ConstValues 7 | { 8 | // App类型 9 | public static final int TYPE_ALL = 0; 10 | public static final int TYPE_SYSTEM = 1; 11 | public static final int TYPE_USER = 2; 12 | // App状态 13 | public static final int STATUS_ALL = 0; 14 | public static final int STATUS_ENABLED = 1; 15 | public static final int STATUS_DISABLED = 2; 16 | // App隐藏属性 17 | public static final int STATUS_HIDE = 1; 18 | public static final int STATUS_SHOW = 2; 19 | // App属性--是否存在 20 | public static final int STATUS_EXIST = 1; 21 | public static final int STATUS_NOT_EXIST = 2; 22 | public static final String DATA_TITLE = "dialog.layout_title"; 23 | public static final String DATA_CONTENT = "dialog.content"; 24 | public final static String DATA_WEB_TITLE = "data.web.layout_title"; 25 | public final static String DATA_WEB_URL = "data.web.url"; 26 | public final static String DATA_PACKAGE_NAME = "data.package.name"; 27 | public final static String DATA_ACTION = "data.action"; 28 | // 登录结果 29 | public final static int REQUEST_LOGIN = 1000;//登录代码 30 | public final static int REQUEST_LOGIN_USER = 1001;//登录代码,跳转到用户中心 31 | public final static int REQUEST_LOGIN_ADVICE = 1002;//登录代码,跳转到意见反馈 32 | public final static int RESULT_LOGIN_SUCCESS = 2000;//登录成功代码 33 | public final static int RESULT_LOGIN_ERROR = 2001;//登录失败代码 34 | // 注册结果 35 | public final static int REQUEST_REGISTER = 1100;//注册代码 36 | public final static int RESULT_REGISTER_SUCCESS = 2002;//注册成功代码 37 | public final static int RESULT_REGISTER_ERROR = 2003;//注册失败代码 38 | public static final String DATA_SHOW_SERVER = "data.show_server";//是否显示云端 39 | //联系人 40 | public static final String DATA_CONTACT_ID = "contact_id"; 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/DisplayTools.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.utils; 2 | 3 | import android.content.Context; 4 | 5 | public class DisplayTools 6 | { 7 | /** 8 | * 获取屏幕宽度 9 | * 10 | * @param context 11 | * @return 12 | */ 13 | public static int getWindowWidth(Context context) 14 | { 15 | final float width = context.getResources().getDisplayMetrics().widthPixels; 16 | LogcatTools.debug("getWindowWidth", "width:" + width); 17 | return (int) (width); 18 | } 19 | 20 | /** 21 | * 获取屏幕高度 22 | * 23 | * @param context 24 | * @return 25 | */ 26 | public static int getWindowHeight(Context context) 27 | { 28 | final float height = context.getResources().getDisplayMetrics().heightPixels; 29 | LogcatTools.debug("getWindowHeight", "height:" + height); 30 | return (int) (height); 31 | } 32 | 33 | /** 34 | * dip转px 35 | * 36 | * @param context 37 | * @param dipValue 38 | * @return 39 | */ 40 | public static int dip2px(Context context, float dipValue) 41 | { 42 | final float scale = context.getResources().getDisplayMetrics().density; 43 | return (int) (dipValue * scale + 0.5f); 44 | } 45 | 46 | /** 47 | * px转dip 48 | * 49 | * @param context 50 | * @param pxValue 51 | * @return 52 | */ 53 | public static int px2dip(Context context, float pxValue) 54 | { 55 | final float scale = context.getResources().getDisplayMetrics().density; 56 | return (int) (pxValue / scale + 0.5f); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/INativeInterface.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.utils; 2 | 3 | import java.util.HashMap; 4 | 5 | public class INativeInterface 6 | { 7 | // 加载so 8 | static 9 | { 10 | System.loadLibrary("appcallsdk"); 11 | } 12 | 13 | // so调用的HTTP GET方法 14 | public static String doGet(String url) 15 | { 16 | return HttpTools.doGet(url, "utf-8"); 17 | } 18 | 19 | // so调用的HTTP POST方法 20 | public static String doPost(String url, String params) 21 | { 22 | // [key,value];[key,value];... 23 | HashMap map = new HashMap<>(); 24 | String[] param = params.split(";"); 25 | if (param.length > 0) 26 | { 27 | for (String str : param) 28 | { 29 | if (str.indexOf("[") > -1 && str.indexOf(",") > str.indexOf("[") && str.indexOf("]") > str.indexOf(",")) 30 | { 31 | String key = str.substring(str.indexOf("[") + 1, str.indexOf(",")); 32 | String value = str.substring(str.indexOf(",") + 1, str.indexOf("]")); 33 | map.put(key, value); 34 | } 35 | } 36 | } 37 | return HttpTools.doPost(url, map); 38 | } 39 | 40 | public native String getUrl(String key); 41 | 42 | public native String login(String number, String pwd, String agentId, String signKey, String key); 43 | 44 | public native String getLocal(String user, String pwd, String number, String agentId, String signKey, String key); 45 | 46 | public native String getInvite(String number, String pwd, String agentId, String signKey, String key); 47 | 48 | public native String submitCrash(String number, String pwd, String agentId, String content, String signedData, String platformInfo, String key); 49 | 50 | public native String getUpdate(String number, String pwd, String agentId, String signedData, String platformInfo, String key); 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/MyConfig.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.utils; 2 | 3 | import android.os.Build; 4 | 5 | import com.lrcall.utils.apptools.AppFactory; 6 | 7 | public class MyConfig 8 | { 9 | /** 10 | * 代理ID 11 | */ 12 | public static final String AGENT_ID = "libit"; 13 | /** 14 | * 平台类型 15 | */ 16 | public static final String PLATFORM = "android"; 17 | /** 18 | * 程序存放数据的目录 19 | */ 20 | public static final String APP_FOLDER = "dialer"; 21 | /** 22 | * 数据分享的名字 23 | */ 24 | public static final String AUTHORITY_NAME = "lr_dialer"; 25 | 26 | public static final String getBackupFileName() 27 | { 28 | return Build.MODEL + "_" + Build.DISPLAY + "_" + Build.VERSION.RELEASE + "_" + AppFactory.getInstance().getVersionName() + "_" + StringTools.getCurrentTimeNum() + ".bak"; 29 | } 30 | 31 | /** 32 | * 调试模式 33 | * 用于显示LOG,签名验证等 34 | * 35 | * @return 36 | */ 37 | public static boolean isDebug() 38 | { 39 | return true; 40 | } 41 | 42 | /** 43 | * 获取代理ID 44 | * 45 | * @return 46 | */ 47 | public static String getAgent() 48 | { 49 | return AGENT_ID; 50 | } 51 | 52 | /** 53 | * 获取程序存放数据的目录 54 | * 55 | * @return 56 | */ 57 | public static String getSDCardFolder() 58 | { 59 | return AGENT_ID + "/" + APP_FOLDER; 60 | } 61 | 62 | /** 63 | * 数据备份目录 64 | * 65 | * @return 66 | */ 67 | public static String getBackupFolder() 68 | { 69 | // return "backup/data/" + Build.MODEL + "_" + Build.DISPLAY + "_" + Build.VERSION.RELEASE; 70 | return "backup"; 71 | } 72 | 73 | /** 74 | * 日志记录的文件夹 75 | * 76 | * @return 77 | */ 78 | public static String getLogcatFolder() 79 | { 80 | return "logcat"; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/MyExecutorService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.lrcall.utils; 6 | 7 | import java.util.concurrent.ExecutorService; 8 | import java.util.concurrent.Executors; 9 | import java.util.concurrent.Future; 10 | 11 | /** 12 | * Created by libit on 16/4/6. 13 | */ 14 | public class MyExecutorService 15 | { 16 | // private BlockingQueue queue = new ArrayBlockingQueue<>(8); 17 | private static MyExecutorService instance = null; 18 | private ExecutorService executorService = Executors.newFixedThreadPool(1); 19 | 20 | private MyExecutorService() 21 | { 22 | } 23 | 24 | synchronized public static MyExecutorService getInstance() 25 | { 26 | if (instance == null) 27 | { 28 | instance = new MyExecutorService(); 29 | } 30 | return instance; 31 | } 32 | 33 | /** 34 | * 关闭线程池 35 | */ 36 | public static void shutdown() 37 | { 38 | if (instance != null && !instance.executorService.isShutdown() && !instance.executorService.isTerminated()) 39 | { 40 | instance.executorService.shutdown(); 41 | } 42 | } 43 | 44 | /** 45 | * 提交任务 46 | * 47 | * @param task 任务 48 | * @return 49 | */ 50 | public Future submitTask(Runnable task) 51 | { 52 | Future result = null; 53 | if (!executorService.isTerminated() && !executorService.isShutdown() && task != null) 54 | { 55 | result = executorService.submit(task); 56 | // synchronized (queue) 57 | // { 58 | // queue.add(task); 59 | // try 60 | // { 61 | // result = executorService.submit(queue.take()); 62 | // } 63 | // catch (InterruptedException e) 64 | // { 65 | // } 66 | // } 67 | } 68 | return result; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/lrcall/utils/apptools/AppInterface.java: -------------------------------------------------------------------------------- 1 | package com.lrcall.utils.apptools; 2 | 3 | import com.lrcall.utils.ShellUtils; 4 | 5 | import java.io.File; 6 | import java.util.List; 7 | 8 | /** 9 | * Created by libit on 15/9/29. 10 | */ 11 | public interface AppInterface 12 | { 13 | /** 14 | * 启用App 15 | * 16 | * @param packageName App包名 17 | * @return 18 | */ 19 | public ShellUtils.CommandResult enableApp(String packageName); 20 | 21 | /** 22 | * 启用Apps 23 | * 24 | * @param packageNames App包名列表 25 | * @return 26 | */ 27 | public ShellUtils.CommandResult enableApps(List packageNames); 28 | 29 | /** 30 | * 禁用App 31 | * 32 | * @param packageName App包名 33 | * @return 34 | */ 35 | public ShellUtils.CommandResult disableApp(String packageName); 36 | 37 | /** 38 | * 禁用Apps 39 | * 40 | * @param packageNames App包名列表 41 | * @return 42 | */ 43 | public ShellUtils.CommandResult disableApps(List packageNames); 44 | 45 | /** 46 | * 启动应用程序 47 | * 48 | * @param packageName 应用包名 49 | * @return 启动成功返回true,失败返回false 50 | */ 51 | public boolean startApp(String packageName); 52 | 53 | /** 54 | * 关闭正在运行的程序信息 55 | * 56 | * @param packageName 57 | * @return 58 | */ 59 | public ShellUtils.CommandResult killApp(String packageName); 60 | 61 | /** 62 | * 安装App 63 | * 64 | * @param file 安装包 65 | */ 66 | public void installApp(File file); 67 | 68 | /** 69 | * 卸载App 70 | * 71 | * @param packageName App包名 72 | */ 73 | public void uninstallApp(String packageName); 74 | } 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/ogaclejapan/smarttablayout/TintableImageView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Libit保留所有版权,如有疑问联系QQ:308062035 3 | * Copyright (c) 2016. 4 | */ 5 | package com.ogaclejapan.smarttablayout; 6 | 7 | import android.content.Context; 8 | import android.content.res.ColorStateList; 9 | import android.content.res.TypedArray; 10 | import android.util.AttributeSet; 11 | import android.widget.ImageView; 12 | 13 | import com.lrcall.appcall.R; 14 | 15 | /** 16 | * https://gist.github.com/tylerchesley/5d15d859be4f3ce31213 17 | */ 18 | public class TintableImageView extends ImageView 19 | { 20 | private ColorStateList tint; 21 | 22 | public TintableImageView(Context context) 23 | { 24 | super(context); 25 | } 26 | 27 | public TintableImageView(Context context, AttributeSet attrs) 28 | { 29 | super(context, attrs); 30 | init(context, attrs, 0); 31 | } 32 | 33 | public TintableImageView(Context context, AttributeSet attrs, int defStyle) 34 | { 35 | super(context, attrs, defStyle); 36 | init(context, attrs, defStyle); 37 | } 38 | 39 | private void init(Context context, AttributeSet attrs, int defStyle) 40 | { 41 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TintableImageView, defStyle, 0); 42 | tint = a.getColorStateList(R.styleable.TintableImageView_tint); 43 | a.recycle(); 44 | } 45 | 46 | @Override 47 | protected void drawableStateChanged() 48 | { 49 | super.drawableStateChanged(); 50 | if (tint != null && tint.isStateful()) 51 | { 52 | updateTintColor(); 53 | } 54 | } 55 | 56 | public void setColorFilter(ColorStateList tint) 57 | { 58 | this.tint = tint; 59 | super.setColorFilter(tint.getColorForState(getDrawableState(), 0)); 60 | } 61 | 62 | private void updateTintColor() 63 | { 64 | int color = tint.getColorForState(getDrawableState(), 0); 65 | setColorFilter(color); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/ogaclejapan/smarttablayout/utils/PagerItem.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 ogaclejapan 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 | package com.ogaclejapan.smarttablayout.utils; 17 | 18 | public abstract class PagerItem 19 | { 20 | protected static final float DEFAULT_WIDTH = 1.f; 21 | private final CharSequence title; 22 | private final float width; 23 | 24 | protected PagerItem(CharSequence title, float width) 25 | { 26 | this.title = title; 27 | this.width = width; 28 | } 29 | 30 | public CharSequence getTitle() 31 | { 32 | return title; 33 | } 34 | 35 | public float getWidth() 36 | { 37 | return width; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/com/ogaclejapan/smarttablayout/utils/PagerItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 ogaclejapan 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 | package com.ogaclejapan.smarttablayout.utils; 17 | 18 | import android.content.Context; 19 | 20 | import java.util.ArrayList; 21 | 22 | public abstract class PagerItems extends ArrayList 23 | { 24 | private final Context context; 25 | 26 | protected PagerItems(Context context) 27 | { 28 | this.context = context; 29 | } 30 | 31 | public Context getContext() 32 | { 33 | return context; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/ogaclejapan/smarttablayout/utils/ViewPagerItem.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 ogaclejapan 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 | package com.ogaclejapan.smarttablayout.utils; 17 | 18 | import android.support.annotation.LayoutRes; 19 | import android.view.LayoutInflater; 20 | import android.view.View; 21 | import android.view.ViewGroup; 22 | 23 | public class ViewPagerItem extends PagerItem 24 | { 25 | private final int resource; 26 | 27 | protected ViewPagerItem(CharSequence title, float width, @LayoutRes int resource) 28 | { 29 | super(title, width); 30 | this.resource = resource; 31 | } 32 | 33 | public static ViewPagerItem of(CharSequence title, @LayoutRes int resource) 34 | { 35 | return of(title, DEFAULT_WIDTH, resource); 36 | } 37 | 38 | public static ViewPagerItem of(CharSequence title, float width, @LayoutRes int resource) 39 | { 40 | return new ViewPagerItem(title, width, resource); 41 | } 42 | 43 | public View initiate(LayoutInflater inflater, ViewGroup container) 44 | { 45 | return inflater.inflate(resource, container, false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/ogaclejapan/smarttablayout/utils/ViewPagerItems.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 ogaclejapan 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 | package com.ogaclejapan.smarttablayout.utils; 17 | 18 | import android.content.Context; 19 | import android.support.annotation.LayoutRes; 20 | import android.support.annotation.StringRes; 21 | 22 | public class ViewPagerItems extends PagerItems 23 | { 24 | public ViewPagerItems(Context context) 25 | { 26 | super(context); 27 | } 28 | 29 | public static Creator with(Context context) 30 | { 31 | return new Creator(context); 32 | } 33 | 34 | public static class Creator 35 | { 36 | private final ViewPagerItems items; 37 | 38 | public Creator(Context context) 39 | { 40 | items = new ViewPagerItems(context); 41 | } 42 | 43 | public Creator add(@StringRes int title, @LayoutRes int resource) 44 | { 45 | return add(ViewPagerItem.of(items.getContext().getString(title), resource)); 46 | } 47 | 48 | public Creator add(@StringRes int title, float width, @LayoutRes int resource) 49 | { 50 | return add(ViewPagerItem.of(items.getContext().getString(title), width, resource)); 51 | } 52 | 53 | public Creator add(CharSequence title, @LayoutRes int resource) 54 | { 55 | return add(ViewPagerItem.of(title, resource)); 56 | } 57 | 58 | public Creator add(ViewPagerItem item) 59 | { 60 | items.add(item); 61 | return this; 62 | } 63 | 64 | public ViewPagerItems create() 65 | { 66 | return items; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivity.java: -------------------------------------------------------------------------------- 1 | 2 | package me.imid.swipebacklayout.lib.app; 3 | 4 | import android.os.Bundle; 5 | import android.support.v4.app.FragmentActivity; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | 9 | import me.imid.swipebacklayout.lib.SwipeBackLayout; 10 | import me.imid.swipebacklayout.lib.Utils; 11 | 12 | public class SwipeBackActivity extends AppCompatActivity implements SwipeBackActivityBase { 13 | private SwipeBackActivityHelper mHelper; 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | mHelper = new SwipeBackActivityHelper(this); 19 | mHelper.onActivityCreate(); 20 | } 21 | 22 | @Override 23 | protected void onPostCreate(Bundle savedInstanceState) { 24 | super.onPostCreate(savedInstanceState); 25 | mHelper.onPostCreate(); 26 | } 27 | 28 | @Override 29 | public View findViewById(int id) { 30 | View v = super.findViewById(id); 31 | if (v == null && mHelper != null) 32 | return mHelper.findViewById(id); 33 | return v; 34 | } 35 | 36 | @Override 37 | public SwipeBackLayout getSwipeBackLayout() { 38 | return mHelper.getSwipeBackLayout(); 39 | } 40 | 41 | @Override 42 | public void setSwipeBackEnable(boolean enable) { 43 | getSwipeBackLayout().setEnableGesture(enable); 44 | } 45 | 46 | @Override 47 | public void scrollToFinishActivity() { 48 | Utils.convertActivityToTranslucent(this); 49 | getSwipeBackLayout().scrollToFinishActivity(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivityBase.java: -------------------------------------------------------------------------------- 1 | package me.imid.swipebacklayout.lib.app; 2 | 3 | import me.imid.swipebacklayout.lib.SwipeBackLayout; 4 | /** 5 | * @author Yrom 6 | */ 7 | public interface SwipeBackActivityBase { 8 | /** 9 | * @return the SwipeBackLayout associated with this activity. 10 | */ 11 | public abstract SwipeBackLayout getSwipeBackLayout(); 12 | 13 | public abstract void setSwipeBackEnable(boolean enable); 14 | 15 | /** 16 | * Scroll out contentView and finish the activity 17 | */ 18 | public abstract void scrollToFinishActivity(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivityHelper.java: -------------------------------------------------------------------------------- 1 | package me.imid.swipebacklayout.lib.app; 2 | 3 | import android.app.Activity; 4 | import android.graphics.Color; 5 | import android.graphics.drawable.ColorDrawable; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | 9 | import com.lrcall.appcall.R; 10 | 11 | import me.imid.swipebacklayout.lib.SwipeBackLayout; 12 | import me.imid.swipebacklayout.lib.Utils; 13 | 14 | /** 15 | * @author Yrom 16 | */ 17 | public class SwipeBackActivityHelper { 18 | private Activity mActivity; 19 | 20 | private SwipeBackLayout mSwipeBackLayout; 21 | 22 | public SwipeBackActivityHelper(Activity activity) { 23 | mActivity = activity; 24 | } 25 | 26 | @SuppressWarnings("deprecation") 27 | public void onActivityCreate() { 28 | mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); 29 | mActivity.getWindow().getDecorView().setBackgroundDrawable(null); 30 | mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate( 31 | R.layout.swipeback_layout, null); 32 | mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() { 33 | @Override 34 | public void onScrollStateChange(int state, float scrollPercent) { 35 | } 36 | 37 | @Override 38 | public void onEdgeTouch(int edgeFlag) { 39 | Utils.convertActivityToTranslucent(mActivity); 40 | } 41 | 42 | @Override 43 | public void onScrollOverThreshold() { 44 | 45 | } 46 | }); 47 | } 48 | 49 | public void onPostCreate() { 50 | mSwipeBackLayout.attachToActivity(mActivity); 51 | } 52 | 53 | public View findViewById(int id) { 54 | if (mSwipeBackLayout != null) { 55 | return mSwipeBackLayout.findViewById(id); 56 | } 57 | return null; 58 | } 59 | 60 | public SwipeBackLayout getSwipeBackLayout() { 61 | return mSwipeBackLayout; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackPreferenceActivity.java: -------------------------------------------------------------------------------- 1 | 2 | package me.imid.swipebacklayout.lib.app; 3 | 4 | import me.imid.swipebacklayout.lib.SwipeBackLayout; 5 | import android.os.Bundle; 6 | import android.preference.PreferenceActivity; 7 | import android.view.View; 8 | 9 | public class SwipeBackPreferenceActivity extends PreferenceActivity implements SwipeBackActivityBase { 10 | private SwipeBackActivityHelper mHelper; 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | mHelper = new SwipeBackActivityHelper(this); 16 | mHelper.onActivityCreate(); 17 | } 18 | 19 | @Override 20 | protected void onPostCreate(Bundle savedInstanceState) { 21 | super.onPostCreate(savedInstanceState); 22 | mHelper.onPostCreate(); 23 | } 24 | 25 | @Override 26 | public View findViewById(int id) { 27 | View v = super.findViewById(id); 28 | if (v == null && mHelper != null) 29 | return mHelper.findViewById(id); 30 | return v; 31 | } 32 | 33 | @Override 34 | public SwipeBackLayout getSwipeBackLayout() { 35 | return mHelper.getSwipeBackLayout(); 36 | } 37 | @Override 38 | public void setSwipeBackEnable(boolean enable) { 39 | getSwipeBackLayout().setEnableGesture(enable); 40 | } 41 | 42 | @Override 43 | public void scrollToFinishActivity() { 44 | getSwipeBackLayout().scrollToFinishActivity(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/AsyncPoster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | 19 | /** 20 | * Posts events in background. 21 | * 22 | * @author Markus 23 | */ 24 | class AsyncPoster implements Runnable { 25 | 26 | private final PendingPostQueue queue; 27 | private final EventBus eventBus; 28 | 29 | AsyncPoster(EventBus eventBus) { 30 | this.eventBus = eventBus; 31 | queue = new PendingPostQueue(); 32 | } 33 | 34 | public void enqueue(Subscription subscription, Object event) { 35 | PendingPost pendingPost = PendingPost.obtainPendingPost(subscription, event); 36 | queue.enqueue(pendingPost); 37 | eventBus.getExecutorService().execute(this); 38 | } 39 | 40 | @Override 41 | public void run() { 42 | PendingPost pendingPost = queue.poll(); 43 | if(pendingPost == null) { 44 | throw new IllegalStateException("No pending post available"); 45 | } 46 | eventBus.invokeSubscriber(pendingPost); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/EventBusException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | /** 19 | * An {@link RuntimeException} thrown in cases something went wrong inside EventBus. 20 | * 21 | * @author Markus 22 | * 23 | */ 24 | public class EventBusException extends RuntimeException { 25 | 26 | private static final long serialVersionUID = -2912559384646531479L; 27 | 28 | public EventBusException(String detailMessage) { 29 | super(detailMessage); 30 | } 31 | 32 | public EventBusException(Throwable throwable) { 33 | super(throwable); 34 | } 35 | 36 | public EventBusException(String detailMessage, Throwable throwable) { 37 | super(detailMessage, throwable); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/NoSubscriberEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | /** 19 | * This Event is posted by EventBus when no subscriber is found for a posted event. 20 | * 21 | * @author Markus 22 | */ 23 | public final class NoSubscriberEvent { 24 | /** The {@link EventBus} instance to with the original event was posted to. */ 25 | public final EventBus eventBus; 26 | 27 | /** The original event that could not be delivered to any subscriber. */ 28 | public final Object originalEvent; 29 | 30 | public NoSubscriberEvent(EventBus eventBus, Object originalEvent) { 31 | this.eventBus = eventBus; 32 | this.originalEvent = originalEvent; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/PendingPost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | final class PendingPost { 22 | private final static List pendingPostPool = new ArrayList(); 23 | 24 | Object event; 25 | Subscription subscription; 26 | PendingPost next; 27 | 28 | private PendingPost(Object event, Subscription subscription) { 29 | this.event = event; 30 | this.subscription = subscription; 31 | } 32 | 33 | static PendingPost obtainPendingPost(Subscription subscription, Object event) { 34 | synchronized (pendingPostPool) { 35 | int size = pendingPostPool.size(); 36 | if (size > 0) { 37 | PendingPost pendingPost = pendingPostPool.remove(size - 1); 38 | pendingPost.event = event; 39 | pendingPost.subscription = subscription; 40 | pendingPost.next = null; 41 | return pendingPost; 42 | } 43 | } 44 | return new PendingPost(event, subscription); 45 | } 46 | 47 | static void releasePendingPost(PendingPost pendingPost) { 48 | pendingPost.event = null; 49 | pendingPost.subscription = null; 50 | pendingPost.next = null; 51 | synchronized (pendingPostPool) { 52 | // Don't let the pool grow indefinitely 53 | if (pendingPostPool.size() < 10000) { 54 | pendingPostPool.add(pendingPost); 55 | } 56 | } 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/PendingPostQueue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 org.greenrobot.eventbus; 18 | 19 | final class PendingPostQueue { 20 | private PendingPost head; 21 | private PendingPost tail; 22 | 23 | synchronized void enqueue(PendingPost pendingPost) { 24 | if (pendingPost == null) { 25 | throw new NullPointerException("null cannot be enqueued"); 26 | } 27 | if (tail != null) { 28 | tail.next = pendingPost; 29 | tail = pendingPost; 30 | } else if (head == null) { 31 | head = tail = pendingPost; 32 | } else { 33 | throw new IllegalStateException("Head present, but no tail"); 34 | } 35 | notifyAll(); 36 | } 37 | 38 | synchronized PendingPost poll() { 39 | PendingPost pendingPost = head; 40 | if (head != null) { 41 | head = head.next; 42 | if (head == null) { 43 | tail = null; 44 | } 45 | } 46 | return pendingPost; 47 | } 48 | 49 | synchronized PendingPost poll(int maxMillisToWait) throws InterruptedException { 50 | if (head == null) { 51 | wait(maxMillisToWait); 52 | } 53 | return poll(); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/Subscribe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 org.greenrobot.eventbus; 18 | 19 | 20 | import java.lang.annotation.Documented; 21 | import java.lang.annotation.ElementType; 22 | import java.lang.annotation.Retention; 23 | import java.lang.annotation.RetentionPolicy; 24 | import java.lang.annotation.Target; 25 | 26 | @Documented 27 | @Retention(RetentionPolicy.RUNTIME) 28 | @Target({ElementType.METHOD}) 29 | public @interface Subscribe { 30 | ThreadMode threadMode() default ThreadMode.POSTING; 31 | 32 | /** 33 | * If true, delivers the most recent sticky event (posted with 34 | * {@link EventBus#postSticky(Object)}) to this subscriber (if event available). 35 | */ 36 | boolean sticky() default false; 37 | 38 | /** Subscriber priority to influence the order of event delivery. 39 | * Within the same delivery thread ({@link ThreadMode}), higher priority subscribers will receive events before 40 | * others with a lower priority. The default priority is 0. Note: the priority does *NOT* affect the order of 41 | * delivery among subscribers with different {@link ThreadMode}s! */ 42 | int priority() default 0; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/SubscriberExceptionEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | /** 19 | * This Event is posted by EventBus when an exception occurs inside a subscriber's event handling method. 20 | * 21 | * @author Markus 22 | */ 23 | public final class SubscriberExceptionEvent { 24 | /** The {@link EventBus} instance to with the original event was posted to. */ 25 | public final EventBus eventBus; 26 | 27 | /** The Throwable thrown by a subscriber. */ 28 | public final Throwable throwable; 29 | 30 | /** The original event that could not be delivered to any subscriber. */ 31 | public final Object causingEvent; 32 | 33 | /** The subscriber that threw the Throwable. */ 34 | public final Object causingSubscriber; 35 | 36 | public SubscriberExceptionEvent(EventBus eventBus, Throwable throwable, Object causingEvent, 37 | Object causingSubscriber) { 38 | this.eventBus = eventBus; 39 | this.throwable = throwable; 40 | this.causingEvent = causingEvent; 41 | this.causingSubscriber = causingSubscriber; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/Subscription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus; 17 | 18 | final class Subscription { 19 | final Object subscriber; 20 | final SubscriberMethod subscriberMethod; 21 | /** 22 | * Becomes false as soon as {@link EventBus#unregister(Object)} is called, which is checked by queued event delivery 23 | * {@link EventBus#invokeSubscriber(PendingPost)} to prevent race conditions. 24 | */ 25 | volatile boolean active; 26 | 27 | Subscription(Object subscriber, SubscriberMethod subscriberMethod) { 28 | this.subscriber = subscriber; 29 | this.subscriberMethod = subscriberMethod; 30 | active = true; 31 | } 32 | 33 | @Override 34 | public boolean equals(Object other) { 35 | if (other instanceof Subscription) { 36 | Subscription otherSubscription = (Subscription) other; 37 | return subscriber == otherSubscription.subscriber 38 | && subscriberMethod.equals(otherSubscription.subscriberMethod); 39 | } else { 40 | return false; 41 | } 42 | } 43 | 44 | @Override 45 | public int hashCode() { 46 | return subscriber.hashCode() + subscriberMethod.methodString.hashCode(); 47 | } 48 | } -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/meta/SimpleSubscriberInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus.meta; 17 | 18 | import org.greenrobot.eventbus.SubscriberMethod; 19 | 20 | /** 21 | * Uses {@link SubscriberMethodInfo} objects to create {@link org.greenrobot.eventbus.SubscriberMethod} objects on demand. 22 | */ 23 | public class SimpleSubscriberInfo extends AbstractSubscriberInfo { 24 | 25 | private final SubscriberMethodInfo[] methodInfos; 26 | 27 | public SimpleSubscriberInfo(Class subscriberClass, boolean shouldCheckSuperclass, SubscriberMethodInfo[] methodInfos) { 28 | super(subscriberClass, null, shouldCheckSuperclass); 29 | this.methodInfos = methodInfos; 30 | } 31 | 32 | @Override 33 | public synchronized SubscriberMethod[] getSubscriberMethods() { 34 | int length = methodInfos.length; 35 | SubscriberMethod[] methods = new SubscriberMethod[length]; 36 | for (int i = 0; i < length; i++) { 37 | SubscriberMethodInfo info = methodInfos[i]; 38 | methods[i] = createSubscriberMethod(info.methodName, info.eventType, info.threadMode, 39 | info.priority, info.sticky); 40 | } 41 | return methods; 42 | } 43 | } -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/meta/SubscriberInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus.meta; 17 | 18 | import org.greenrobot.eventbus.SubscriberMethod; 19 | 20 | /** Base class for generated index classes created by annotation processing. */ 21 | public interface SubscriberInfo { 22 | Class getSubscriberClass(); 23 | 24 | SubscriberMethod[] getSubscriberMethods(); 25 | 26 | SubscriberInfo getSuperSubscriberInfo(); 27 | 28 | boolean shouldCheckSuperclass(); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/meta/SubscriberInfoIndex.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus.meta; 17 | 18 | /** 19 | * Interface for generated indexes. 20 | */ 21 | public interface SubscriberInfoIndex { 22 | SubscriberInfo getSubscriberInfo(Class subscriberClass); 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/meta/SubscriberMethodInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus.meta; 17 | 18 | import org.greenrobot.eventbus.ThreadMode; 19 | 20 | public class SubscriberMethodInfo { 21 | final String methodName; 22 | final ThreadMode threadMode; 23 | final Class eventType; 24 | final int priority; 25 | final boolean sticky; 26 | 27 | public SubscriberMethodInfo(String methodName, Class eventType, ThreadMode threadMode, 28 | int priority, boolean sticky) { 29 | this.methodName = methodName; 30 | this.threadMode = threadMode; 31 | this.eventType = eventType; 32 | this.priority = priority; 33 | this.sticky = sticky; 34 | } 35 | 36 | public SubscriberMethodInfo(String methodName, Class eventType) { 37 | this(methodName, eventType, ThreadMode.POSTING, 0, false); 38 | } 39 | 40 | public SubscriberMethodInfo(String methodName, Class eventType, ThreadMode threadMode) { 41 | this(methodName, eventType, threadMode, 0, false); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/util/HasExecutionScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 org.greenrobot.eventbus.util; 18 | 19 | public interface HasExecutionScope { 20 | Object getExecutionScope(); 21 | 22 | void setExecutionScope(Object executionScope); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/org/greenrobot/eventbus/util/ThrowableFailureEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Markus Junginger, greenrobot (http://greenrobot.org) 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 | package org.greenrobot.eventbus.util; 17 | 18 | /** 19 | * A generic failure event, which can be used by apps to propagate thrown exceptions. Also used in conjunction with 20 | * {@link ErrorDialogManager}. 21 | */ 22 | public class ThrowableFailureEvent implements HasExecutionScope { 23 | protected final Throwable throwable; 24 | protected final boolean suppressErrorUi; 25 | private Object executionContext; 26 | 27 | public ThrowableFailureEvent(Throwable throwable) { 28 | this.throwable = throwable; 29 | suppressErrorUi = false; 30 | } 31 | 32 | /** 33 | * @param suppressErrorUi 34 | * true indicates to the receiver that no error UI (e.g. dialog) should now displayed. 35 | */ 36 | public ThrowableFailureEvent(Throwable throwable, boolean suppressErrorUi) { 37 | this.throwable = throwable; 38 | this.suppressErrorUi = suppressErrorUi; 39 | } 40 | 41 | public Throwable getThrowable() { 42 | return throwable; 43 | } 44 | 45 | public boolean isSuppressErrorUi() { 46 | return suppressErrorUi; 47 | } 48 | 49 | public Object getExecutionScope() { 50 | return executionContext; 51 | } 52 | 53 | public void setExecutionScope(Object executionContext) { 54 | this.executionContext = executionContext; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog 6 | 7 | LOCAL_MODULE := appcallsdk 8 | LOCAL_SRC_FILES := \ 9 | utils.cpp \ 10 | main.cpp \ 11 | 12 | include $(BUILD_SHARED_LIBRARY) 13 | -------------------------------------------------------------------------------- /app/src/main/jni/Application.mk: -------------------------------------------------------------------------------- 1 | JNI_DIR := $(call my-dir) 2 | 3 | APP_OPTIM := release 4 | APP_ABI := armeabi armeabi-v7a 5 | -------------------------------------------------------------------------------- /app/src/main/jni/utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * JNI 辅助工具 3 | * 作者:Libit 4 | */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | #include "utils.h" 10 | 11 | #define THIS_FILE "utils.cpp" 12 | 13 | void showLog(JNIEnv* env, jstring str) 14 | { 15 | char* cStr = (char*) env->GetStringUTFChars(str, 0); 16 | //LOGD("str is:%s \n", cStr); 17 | env->ReleaseStringUTFChars(str, cStr); 18 | } 19 | 20 | char* getChars(JNIEnv* env, jstring str) 21 | { 22 | return (char*) env->GetStringUTFChars(str, 0); 23 | } 24 | 25 | jstring doGetJMethod(JNIEnv* env, jobject obj, jstring url) 26 | { 27 | jclass cls = env->GetObjectClass(obj); 28 | jmethodID doGet = env->GetStaticMethodID(cls, "doGet", "(Ljava/lang/String;)Ljava/lang/String;"); 29 | 30 | if (doGet == 0) 31 | { 32 | return env->NewStringUTF("Error,Method not Found!"); 33 | } 34 | 35 | jstring strResult = (jstring) env->CallStaticObjectMethod(cls, doGet, url); 36 | 37 | return strResult; 38 | } 39 | 40 | jstring doPostJMethod(JNIEnv* env, jobject obj, jstring url, jstring params) 41 | { 42 | jclass cls = env->GetObjectClass(obj); 43 | jmethodID doPost = env->GetStaticMethodID(cls, "doPost", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); 44 | 45 | if (doPost == 0) 46 | { 47 | return env->NewStringUTF("Error,Method not Found!"); 48 | } 49 | 50 | jstring strResult = (jstring) env->CallStaticObjectMethod(cls, doPost, url, params); 51 | 52 | return strResult; 53 | } 54 | 55 | bool compareJString(JNIEnv* env, jstring param1, jstring param2) 56 | { 57 | char* cParam1 = (char*) env->GetStringUTFChars(param1, 0); 58 | char* cParam2 = (char*) env->GetStringUTFChars(param2, 0); 59 | 60 | int index1 = 0; 61 | while (*(cParam1 + index1) != '\0' && *(cParam2 + index1)!= '\0') 62 | { 63 | if(*(cParam1 + index1) != *(cParam2 + index1)) 64 | { 65 | env->ReleaseStringUTFChars(param1, cParam1); 66 | env->ReleaseStringUTFChars(param2, cParam2); 67 | return false; 68 | } 69 | index1++; 70 | } 71 | 72 | if(*(cParam2 + index1)!= '\0'||*(cParam1 + index1) != '\0') 73 | { 74 | env->ReleaseStringUTFChars(param1, cParam1); 75 | env->ReleaseStringUTFChars(param2, cParam2); 76 | return false; 77 | } 78 | 79 | env->ReleaseStringUTFChars(param1, cParam1); 80 | env->ReleaseStringUTFChars(param2, cParam2); 81 | 82 | return true; 83 | } 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | -------------------------------------------------------------------------------- /app/src/main/jni/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * JNI 辅助工具 3 | * 作者:Libit 4 | */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | #include 10 | #include 11 | 12 | //#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "JNIMsg", __VA_ARGS__) 13 | 14 | void showLog(JNIEnv* env, jstring str); 15 | 16 | char* getChars(JNIEnv* env, jstring str); 17 | 18 | jstring doGetJMethod(JNIEnv* env, jobject obj, jstring url); 19 | 20 | jstring doPostJMethod(JNIEnv* env, jobject obj, jstring url, jstring params); 21 | 22 | bool compareJString(JNIEnv* env, jstring param1, jstring param2); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /app/src/main/res/anim/loading_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 | 33 | 36 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/color/custom_tab_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/avatar_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/avatar_frame.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_contact_search_edittext.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_contact_search_edittext.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_item_down_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_item_down_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_item_down_long_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_item_down_long_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_item_up_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_item_up_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_item_up_long_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_item_up_long_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_search_panel.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_search_panel.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bg_user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bg_user.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/body_cont.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/body_cont.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bottom_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/bottom_bar.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/btn_del_search_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/btn_del_search_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/btn_del_search_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/btn_del_search_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/btn_dial_call_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/btn_dial_call_normal.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/btn_dial_call_pre.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/btn_dial_call_pre.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/btn_edt_bak_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/btn_edt_bak_bg.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/camera.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/default_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/default_header.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/default_ptr_flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/default_ptr_flip.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_add_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_add_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_add_pres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_add_pres.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_callicon_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_callicon_press.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_husa_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_husa_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_0_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_0_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_1_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_1_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_2_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_2_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_3_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_3_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_4_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_4_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_5_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_5_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_6_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_6_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_7_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_7_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_8_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_8_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_9_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_9_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_num_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_num_phone.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dial_star_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/dial_star_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_character_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_delete_character_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_character_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_delete_character_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_digits_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_digits_normal.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_digits_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_digits_pressed.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_done_grey600_18dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_done_grey600_18dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_file.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_contacts_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_contacts_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_contacts_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_contacts_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_dialer_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_dialer_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_dialer_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_dialer_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_money_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_money_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_money_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_money_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_more_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_more_normal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_tab_more_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_tab_more_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_test_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_test_0.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_test_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_test_1.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_test_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_test_2.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_test_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/ic_test_3.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/icon_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/icon_search.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/incall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/incall.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/index_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/index_bg.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/item_grid_filter_bg_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/item_grid_filter_bg_line.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/line.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/line_bg00.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/line_bg00.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/loading.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/more.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_01.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_02.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_03.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_04.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_05.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_06.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_07.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_08.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_09.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_10.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_11.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/netload_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/netload_12.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/placeholder_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/placeholder_large.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/setting_right_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/setting_right_arrow.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/shadow_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/shadow_bottom.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/shadow_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/shadow_left.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/shadow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/shadow_right.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/slidetab_bg_press.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/slidetab_bg_press.9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/tocall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/tocall.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/web_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web_forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/web_forward.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/web_home.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/web_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/web_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/drawable-hdpi/web_stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_down.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_down_long.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_long.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_up.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_up_long.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_del_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/custom_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/delete_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_digits.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/image_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tab_addcontact_image_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/tab_call_image_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/toast_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main2.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 22 | 27 | 28 | 33 | 34 | 40 | 44 | 45 | 46 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_splash.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 16 | 20 | 24 | 29 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_web_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 13 | 14 | 18 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_web_view_head.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/custom_tab_circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_file_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 17 | 24 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 18 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_dialer.xml: -------------------------------------------------------------------------------- 1 | 5 | 12 | 16 | 28 | 29 | 34 | 35 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_image.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_more.xml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_sms.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_contact_number_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 12 | 18 | 31 | 40 | 41 | 47 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_file.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 19 | 23 | 31 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_func.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 36 | 47 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 24 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_custom_tab.xml: -------------------------------------------------------------------------------- 1 | 5 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/layout_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/layout/progress_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 12 | 17 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/swipeback_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/layout/toast_view.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 18 | 24 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/xlistview_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 15 | 22 | 26 | 31 | 32 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_activity_contact_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 |

8 | 14 | 20 | 26 | 32 | 38 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_activity_contact_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 13 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 14 | 20 | 26 | 32 | 38 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_activity_webview.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 16 | 22 | 29 | 36 | 43 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_calllog_list_context.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_fragment_more.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 14 | 20 | 26 | 32 | 38 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #66aa66 4 | #66aa66 5 | #FF4081 6 | #33008866 7 | #00000000 8 | #FFFFFFFF 9 | #FF000000 10 | #c4c4c4 11 | #ffeeebeb 12 | #ff000001 13 | #ffffffff 14 | #40C4FF 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 30dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LR电话 3 | Hello blank fragment 4 | 轻击搜索号码 5 | 下拉刷新 6 | 松开刷新数据 7 | 正在加载... 8 | 上次更新时间: 9 | 查看更多 10 | 松开载入更多 11 | 刷新成功 12 | 暂未更新过 13 | 上次更新于%1$s前 14 | 刚刚更新 15 | 时间有问题 16 | 打开 17 | 关闭 18 | %s位联系人 19 | 来电 20 | 去电 21 | 未接 22 | %s小时%s%s 23 | %s%s 24 | %s 25 | 已拨 26 | 联系人详情 27 | 编辑联系人 28 | 搜索 29 | 取消 30 | 确定 31 | 提示 32 | 浏览器 33 | 刷新 34 | 后退 35 | 关闭 36 | 前进 37 | 首页 38 | 用浏览器打开 39 | 用户登录 40 | 修改密码 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/values/sw_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/sw_styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/resources/com/androidquery/util/web_image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 65 | 66 |
67 | 68 | 69 | 70 |
71 | 72 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /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.1.2' 9 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 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 | -------------------------------------------------------------------------------- /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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | #设置可以使用旧版的NDK 20 | android.useDeprecatedNdk=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libit/lr_dialer/01fecf08d4fcce0eabf1ec049fb20bc6d3f1df40/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 05 10:30:58 CST 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.10-all.zip 7 | -------------------------------------------------------------------------------- /lr_dialer_v1.0.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /日志.log: -------------------------------------------------------------------------------- 1 | AppCall更新日志记录 2 | ================================================ 3 | V1.0.0 更新日志: 4 | 1,增加滑动返回(SwipeBackLayout,只要Activity继承SwipeBackActivity即可,setSwipeBackEnable(false); //禁止滑动返回); 5 | 2,增加下拉刷新,上拉加载更多(xlistView); 6 | 3, 7 | 8 | ================================================ 9 | 10 | 需完成的任务: 11 | 1,拨号界面输入号码搜索联系人和通话记录; 12 | 2,联系人详情显示号码和通话记录; 13 | 3,短信列表,短信会话界面,短信接收,彩信接收; 14 | 4,联系人、短信备份\还原功能; 15 | 5,全局搜索功能,主要搜索联系人、通话记录、短信内容; 16 | 6,账号管理功能; 17 | 7,集成回拨功能,此功能只需要提交需求,具体使用哪家的回拨服务器由服务器去处理; 18 | 8, 19 | --------------------------------------------------------------------------------