├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── dictionaries │ └── devil.xml ├── encodings.xml ├── findbugs-idea.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── rebel_project.xml ├── scopes │ └── scope_settings.xml └── vcs.xml ├── CNode.iml ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── iwhys │ │ └── cnode │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── assets │ ├── css │ │ └── topic_detail.css │ └── image │ │ └── common_divider.png │ ├── java │ └── com │ │ └── iwhys │ │ └── cnode │ │ ├── App.java │ │ ├── adapter │ │ ├── ColumnPagerAdapter.java │ │ ├── ReplyListAdapter.java │ │ ├── TopicListAdapter.java │ │ └── UserColumnPagerAdapter.java │ │ ├── entity │ │ ├── Author.java │ │ ├── Base.java │ │ ├── Content.java │ │ ├── Replies.java │ │ ├── Reply.java │ │ ├── Topic.java │ │ ├── Topics.java │ │ ├── User.java │ │ └── UserData.java │ │ ├── ui │ │ ├── activity │ │ │ ├── BaseActivity.java │ │ │ ├── BaseBackActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── SingleFragmentActivity.java │ │ │ └── SingleInstanceActivity.java │ │ └── fragment │ │ │ ├── AboutFragment.java │ │ │ ├── BaseFragment.java │ │ │ ├── CaptureFragment.java │ │ │ ├── LeftMenuFragment.java │ │ │ ├── NewTopicFragment.java │ │ │ ├── ReplyListFragment.java │ │ │ ├── SettingFragment.java │ │ │ ├── TopicDetailFragment.java │ │ │ ├── TopicListFragment.java │ │ │ ├── UserInfoFragment.java │ │ │ └── UserTopicListFragment.java │ │ ├── util │ │ ├── ActivitySwitcher.java │ │ ├── CommonUtils.java │ │ ├── DBHelper.java │ │ ├── DoubleClickExitHelper.java │ │ ├── LogUtil.java │ │ ├── OauthHelper.java │ │ ├── ShareUtils.java │ │ ├── SimpleFactory.java │ │ ├── constant │ │ │ ├── IntentAction.java │ │ │ └── Params.java │ │ └── volley │ │ │ ├── DateTypeAdapter.java │ │ │ ├── GsonRequest.java │ │ │ ├── UrlHelper.java │ │ │ ├── VolleyErrorHelper.java │ │ │ └── VolleyHelper.java │ │ └── widget │ │ ├── BaseDialog.java │ │ ├── ProgressDialog.java │ │ └── ScrollListenerWebView.java │ └── res │ ├── anim │ ├── anim_in.xml │ ├── anim_out.xml │ ├── rotate_loading.xml │ ├── slide_in_right.xml │ ├── slide_out_left.xml │ ├── static_in.xml │ ├── static_out.xml │ ├── translate_down.xml │ ├── translate_left.xml │ ├── translate_right.xml │ └── translate_up.xml │ ├── color │ ├── btn_common_color.xml │ ├── radio_text_color_switcher.xml │ ├── tab_btn_color.xml │ └── white_btn_color.xml │ ├── drawable-xhdpi │ ├── icon_about.png │ ├── icon_add.png │ ├── icon_app.png │ ├── icon_bad.png │ ├── icon_exit.png │ ├── icon_good.png │ ├── icon_loading_small.png │ ├── icon_person_default.png │ ├── icon_reply.png │ ├── icon_reply_small.png │ ├── icon_setting.png │ ├── icon_share.png │ ├── icon_top.png │ ├── icon_visit.png │ ├── left_menu_divider.png │ ├── loading_large_icon.png │ ├── radiobtn_checked.png │ └── radiobtn_unchecked.png │ ├── drawable │ ├── btn_common_bg.xml │ ├── dialog_loading_bg.xml │ ├── item_left_menu_bg.xml │ ├── item_topic_even_bg.xml │ ├── item_topic_odd_bg.xml │ ├── radio_button_switcher.xml │ ├── rect_border.xml │ └── round_corner_border.xml │ ├── layout │ ├── activity_main.xml │ ├── common_toolbar.xml │ ├── dialog_progress.xml │ ├── fragment_about.xml │ ├── fragment_left_menu.xml │ ├── fragment_new_topic.xml │ ├── fragment_reply_list.xml │ ├── fragment_setting.xml │ ├── fragment_topic_detail.xml │ ├── fragment_user_info.xml │ ├── input_line.xml │ ├── item_reply.xml │ ├── item_topic.xml │ └── tab_select_bar.xml │ ├── menu │ ├── add.xml │ ├── custom.xml │ ├── exit.xml │ └── share.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── attrs.xml │ ├── color.xml │ ├── dimens.xml │ ├── ids.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── library-mylistview ├── .gitignore ├── build.gradle ├── library-mylistview.iml ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── iwhys │ │ └── mylistview │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── iwhys │ │ └── mylistview │ │ ├── BaseListAdapter.java │ │ ├── CommonListView.java │ │ ├── CommonViewHolder.java │ │ ├── CompatOnItemClickListener.java │ │ ├── LoadMoreListView.java │ │ ├── ViewHolder.java │ │ └── jazzy │ │ ├── JazzyEffect.java │ │ └── JazzyHelper.java │ └── res │ ├── anim │ └── rotate_loading.xml │ ├── drawable-xhdpi │ ├── icon_bad.png │ └── icon_loading_small.png │ ├── layout │ └── view_listview.xml │ └── values │ ├── attrs.xml │ ├── dimens.xml │ └── strings.xml ├── library-qrcode ├── .gitignore ├── build.gradle ├── library-qrcode.iml ├── libs │ ├── armeabi-v7a │ │ └── libzbar.so │ ├── armeabi │ │ └── libzbar.so │ ├── mips │ │ └── libzbar.so │ └── x86 │ │ └── libzbar.so ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── zbar │ │ └── lib │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── zbar │ │ └── lib │ │ ├── CaptureView.java │ │ ├── ZbarManager.java │ │ ├── bitmap │ │ ├── InvertedLuminanceSource.java │ │ ├── LuminanceSource.java │ │ └── PlanarYUVLuminanceSource.java │ │ ├── camera │ │ ├── AutoFocusCallback.java │ │ ├── CameraConfigurationManager.java │ │ ├── CameraManager.java │ │ ├── FlashlightManager.java │ │ └── PreviewCallback.java │ │ └── decode │ │ ├── CaptureHandler.java │ │ ├── DecodeHandler.java │ │ ├── DecodeThread.java │ │ ├── FinishListener.java │ │ └── InactivityTimer.java │ └── res │ ├── drawable-xhdpi │ ├── camera_back.png │ ├── capture_frame.9.png │ ├── icon_flashlight_off.png │ ├── icon_flashlight_on.png │ ├── scan_line.png │ └── scan_mask.png │ ├── layout │ ├── inc_scanner.xml │ └── inc_scanner_title.xml │ ├── raw │ └── beep.ogg │ └── values │ ├── ids.xml │ └── strings.xml ├── library-swipeback ├── build.gradle ├── build │ ├── generated │ │ └── source │ │ │ ├── buildConfig │ │ │ ├── androidTest │ │ │ │ └── debug │ │ │ │ │ └── me │ │ │ │ │ └── imid │ │ │ │ │ └── swipebacklayout │ │ │ │ │ └── lib │ │ │ │ │ └── test │ │ │ │ │ └── BuildConfig.java │ │ │ ├── debug │ │ │ │ └── me │ │ │ │ │ └── imid │ │ │ │ │ └── swipebacklayout │ │ │ │ │ └── lib │ │ │ │ │ └── BuildConfig.java │ │ │ └── release │ │ │ │ └── me │ │ │ │ └── imid │ │ │ │ └── swipebacklayout │ │ │ │ └── lib │ │ │ │ └── BuildConfig.java │ │ │ └── r │ │ │ ├── androidTest │ │ │ └── debug │ │ │ │ ├── android │ │ │ │ └── support │ │ │ │ │ └── v7 │ │ │ │ │ └── appcompat │ │ │ │ │ └── R.java │ │ │ │ └── me │ │ │ │ └── imid │ │ │ │ └── swipebacklayout │ │ │ │ └── lib │ │ │ │ ├── R.java │ │ │ │ └── test │ │ │ │ └── R.java │ │ │ ├── debug │ │ │ └── me │ │ │ │ └── imid │ │ │ │ └── swipebacklayout │ │ │ │ └── lib │ │ │ │ └── R.java │ │ │ └── release │ │ │ └── me │ │ │ └── imid │ │ │ └── swipebacklayout │ │ │ └── lib │ │ │ └── R.java │ └── intermediates │ │ ├── exploded-aar │ │ └── com.android.support │ │ │ ├── appcompat-v7 │ │ │ └── 22.0.0 │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── R.txt │ │ │ │ ├── aapt │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── annotations.zip │ │ │ │ ├── classes.jar │ │ │ │ └── res │ │ │ │ ├── anim │ │ │ │ ├── abc_fade_in.xml │ │ │ │ ├── abc_fade_out.xml │ │ │ │ ├── abc_grow_fade_in_from_bottom.xml │ │ │ │ ├── abc_shrink_fade_out_from_bottom.xml │ │ │ │ ├── abc_slide_in_bottom.xml │ │ │ │ ├── abc_slide_in_top.xml │ │ │ │ ├── abc_slide_out_bottom.xml │ │ │ │ └── abc_slide_out_top.xml │ │ │ │ ├── color │ │ │ │ ├── abc_background_cache_hint_selector_material_dark.xml │ │ │ │ ├── abc_background_cache_hint_selector_material_light.xml │ │ │ │ ├── abc_primary_text_disable_only_material_dark.xml │ │ │ │ ├── abc_primary_text_disable_only_material_light.xml │ │ │ │ ├── abc_primary_text_material_dark.xml │ │ │ │ ├── abc_primary_text_material_light.xml │ │ │ │ ├── abc_search_url_text.xml │ │ │ │ ├── abc_secondary_text_material_dark.xml │ │ │ │ └── abc_secondary_text_material_light.xml │ │ │ │ ├── drawable-hdpi-v4 │ │ │ │ ├── abc_ab_share_pack_mtrl_alpha.9.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_rating_star_off_mtrl_alpha.png │ │ │ │ ├── abc_btn_rating_star_on_mtrl_alpha.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── abc_cab_background_top_mtrl_alpha.9.png │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_clear_mtrl_alpha.png │ │ │ │ ├── abc_ic_commit_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_go_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_moreoverflow_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_paste_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_selectall_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_share_mtrl_alpha.png │ │ │ │ ├── abc_ic_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_voice_search_api_mtrl_alpha.png │ │ │ │ ├── abc_list_divider_mtrl_alpha.9.png │ │ │ │ ├── abc_list_focused_holo.9.png │ │ │ │ ├── abc_list_longpressed_holo.9.png │ │ │ │ ├── abc_list_pressed_holo_dark.9.png │ │ │ │ ├── abc_list_pressed_holo_light.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_dark.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_light.9.png │ │ │ │ ├── abc_menu_hardkey_panel_mtrl_mult.9.png │ │ │ │ ├── abc_popup_background_mtrl_mult.9.png │ │ │ │ ├── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── abc_switch_track_mtrl_alpha.9.png │ │ │ │ ├── abc_tab_indicator_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_activated_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_default_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_search_activated_mtrl_alpha.9.png │ │ │ │ └── abc_textfield_search_default_mtrl_alpha.9.png │ │ │ │ ├── drawable-ldrtl-hdpi-v17 │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ └── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── drawable-ldrtl-mdpi-v17 │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ └── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── drawable-ldrtl-xhdpi-v17 │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ └── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── drawable-ldrtl-xxhdpi-v17 │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ └── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── drawable-ldrtl-xxxhdpi-v17 │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ └── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── drawable-mdpi-v4 │ │ │ │ ├── abc_ab_share_pack_mtrl_alpha.9.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_rating_star_off_mtrl_alpha.png │ │ │ │ ├── abc_btn_rating_star_on_mtrl_alpha.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── abc_cab_background_top_mtrl_alpha.9.png │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_clear_mtrl_alpha.png │ │ │ │ ├── abc_ic_commit_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_go_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_moreoverflow_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_paste_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_selectall_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_share_mtrl_alpha.png │ │ │ │ ├── abc_ic_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_voice_search_api_mtrl_alpha.png │ │ │ │ ├── abc_list_divider_mtrl_alpha.9.png │ │ │ │ ├── abc_list_focused_holo.9.png │ │ │ │ ├── abc_list_longpressed_holo.9.png │ │ │ │ ├── abc_list_pressed_holo_dark.9.png │ │ │ │ ├── abc_list_pressed_holo_light.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_dark.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_light.9.png │ │ │ │ ├── abc_menu_hardkey_panel_mtrl_mult.9.png │ │ │ │ ├── abc_popup_background_mtrl_mult.9.png │ │ │ │ ├── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── abc_switch_track_mtrl_alpha.9.png │ │ │ │ ├── abc_tab_indicator_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_activated_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_default_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_search_activated_mtrl_alpha.9.png │ │ │ │ └── abc_textfield_search_default_mtrl_alpha.9.png │ │ │ │ ├── drawable-tvdpi-v4 │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ └── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── drawable-xhdpi-v4 │ │ │ │ ├── abc_ab_share_pack_mtrl_alpha.9.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_rating_star_off_mtrl_alpha.png │ │ │ │ ├── abc_btn_rating_star_on_mtrl_alpha.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── abc_cab_background_top_mtrl_alpha.9.png │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_clear_mtrl_alpha.png │ │ │ │ ├── abc_ic_commit_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_go_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_moreoverflow_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_paste_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_selectall_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_share_mtrl_alpha.png │ │ │ │ ├── abc_ic_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_voice_search_api_mtrl_alpha.png │ │ │ │ ├── abc_list_divider_mtrl_alpha.9.png │ │ │ │ ├── abc_list_focused_holo.9.png │ │ │ │ ├── abc_list_longpressed_holo.9.png │ │ │ │ ├── abc_list_pressed_holo_dark.9.png │ │ │ │ ├── abc_list_pressed_holo_light.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_dark.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_light.9.png │ │ │ │ ├── abc_menu_hardkey_panel_mtrl_mult.9.png │ │ │ │ ├── abc_popup_background_mtrl_mult.9.png │ │ │ │ ├── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── abc_switch_track_mtrl_alpha.9.png │ │ │ │ ├── abc_tab_indicator_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_activated_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_default_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_search_activated_mtrl_alpha.9.png │ │ │ │ └── abc_textfield_search_default_mtrl_alpha.9.png │ │ │ │ ├── drawable-xxhdpi-v4 │ │ │ │ ├── abc_ab_share_pack_mtrl_alpha.9.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_rating_star_off_mtrl_alpha.png │ │ │ │ ├── abc_btn_rating_star_on_mtrl_alpha.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── abc_cab_background_top_mtrl_alpha.9.png │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_clear_mtrl_alpha.png │ │ │ │ ├── abc_ic_commit_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_go_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_moreoverflow_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_paste_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_selectall_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_share_mtrl_alpha.png │ │ │ │ ├── abc_ic_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_voice_search_api_mtrl_alpha.png │ │ │ │ ├── abc_list_divider_mtrl_alpha.9.png │ │ │ │ ├── abc_list_focused_holo.9.png │ │ │ │ ├── abc_list_longpressed_holo.9.png │ │ │ │ ├── abc_list_pressed_holo_dark.9.png │ │ │ │ ├── abc_list_pressed_holo_light.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_dark.9.png │ │ │ │ ├── abc_list_selector_disabled_holo_light.9.png │ │ │ │ ├── abc_menu_hardkey_panel_mtrl_mult.9.png │ │ │ │ ├── abc_popup_background_mtrl_mult.9.png │ │ │ │ ├── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── abc_switch_track_mtrl_alpha.9.png │ │ │ │ ├── abc_tab_indicator_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_activated_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_default_mtrl_alpha.9.png │ │ │ │ ├── abc_textfield_search_activated_mtrl_alpha.9.png │ │ │ │ └── abc_textfield_search_default_mtrl_alpha.9.png │ │ │ │ ├── drawable-xxxhdpi-v4 │ │ │ │ ├── abc_btn_check_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_check_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_000.png │ │ │ │ ├── abc_btn_radio_to_on_mtrl_015.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00001.9.png │ │ │ │ ├── abc_btn_switch_to_on_mtrl_00012.9.png │ │ │ │ ├── abc_ic_ab_back_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_clear_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_copy_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_cut_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_moreoverflow_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_paste_mtrl_am_alpha.png │ │ │ │ ├── abc_ic_menu_selectall_mtrl_alpha.png │ │ │ │ ├── abc_ic_menu_share_mtrl_alpha.png │ │ │ │ ├── abc_ic_search_api_mtrl_alpha.png │ │ │ │ ├── abc_ic_voice_search_api_mtrl_alpha.png │ │ │ │ ├── abc_spinner_mtrl_am_alpha.9.png │ │ │ │ ├── abc_switch_track_mtrl_alpha.9.png │ │ │ │ └── abc_tab_indicator_mtrl_alpha.9.png │ │ │ │ ├── drawable │ │ │ │ ├── abc_btn_check_material.xml │ │ │ │ ├── abc_btn_default_mtrl_shape.xml │ │ │ │ ├── abc_btn_radio_material.xml │ │ │ │ ├── abc_cab_background_internal_bg.xml │ │ │ │ ├── abc_cab_background_top_material.xml │ │ │ │ ├── abc_edit_text_material.xml │ │ │ │ ├── abc_item_background_holo_dark.xml │ │ │ │ ├── abc_item_background_holo_light.xml │ │ │ │ ├── abc_list_selector_background_transition_holo_dark.xml │ │ │ │ ├── abc_list_selector_background_transition_holo_light.xml │ │ │ │ ├── abc_list_selector_holo_dark.xml │ │ │ │ ├── abc_list_selector_holo_light.xml │ │ │ │ ├── abc_ratingbar_full_material.xml │ │ │ │ ├── abc_spinner_textfield_background_material.xml │ │ │ │ ├── abc_switch_thumb_material.xml │ │ │ │ ├── abc_tab_indicator_material.xml │ │ │ │ └── abc_textfield_search_material.xml │ │ │ │ ├── layout-v11 │ │ │ │ └── abc_screen_content_include.xml │ │ │ │ ├── layout │ │ │ │ ├── abc_action_bar_title_item.xml │ │ │ │ ├── abc_action_bar_up_container.xml │ │ │ │ ├── abc_action_bar_view_list_nav_layout.xml │ │ │ │ ├── abc_action_menu_item_layout.xml │ │ │ │ ├── abc_action_menu_layout.xml │ │ │ │ ├── abc_action_mode_bar.xml │ │ │ │ ├── abc_action_mode_close_item_material.xml │ │ │ │ ├── abc_activity_chooser_view.xml │ │ │ │ ├── abc_activity_chooser_view_list_item.xml │ │ │ │ ├── abc_expanded_menu_layout.xml │ │ │ │ ├── abc_list_menu_item_checkbox.xml │ │ │ │ ├── abc_list_menu_item_icon.xml │ │ │ │ ├── abc_list_menu_item_layout.xml │ │ │ │ ├── abc_list_menu_item_radio.xml │ │ │ │ ├── abc_popup_menu_item_layout.xml │ │ │ │ ├── abc_screen_content_include.xml │ │ │ │ ├── abc_screen_simple.xml │ │ │ │ ├── abc_screen_simple_overlay_action_mode.xml │ │ │ │ ├── abc_screen_toolbar.xml │ │ │ │ ├── abc_search_dropdown_item_icons_2line.xml │ │ │ │ ├── abc_search_view.xml │ │ │ │ ├── abc_simple_dropdown_hint.xml │ │ │ │ └── support_simple_spinner_dropdown_item.xml │ │ │ │ ├── values-af │ │ │ │ └── values.xml │ │ │ │ ├── values-am │ │ │ │ └── values.xml │ │ │ │ ├── values-ar │ │ │ │ └── values.xml │ │ │ │ ├── values-bg │ │ │ │ └── values.xml │ │ │ │ ├── values-bn-rBD │ │ │ │ └── values.xml │ │ │ │ ├── values-ca │ │ │ │ └── values.xml │ │ │ │ ├── values-cs │ │ │ │ └── values.xml │ │ │ │ ├── values-da │ │ │ │ └── values.xml │ │ │ │ ├── values-de │ │ │ │ └── values.xml │ │ │ │ ├── values-el │ │ │ │ └── values.xml │ │ │ │ ├── values-en-rGB │ │ │ │ └── values.xml │ │ │ │ ├── values-en-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-es-rUS │ │ │ │ └── values.xml │ │ │ │ ├── values-es │ │ │ │ └── values.xml │ │ │ │ ├── values-et-rEE │ │ │ │ └── values.xml │ │ │ │ ├── values-eu-rES │ │ │ │ └── values.xml │ │ │ │ ├── values-fa │ │ │ │ └── values.xml │ │ │ │ ├── values-fi │ │ │ │ └── values.xml │ │ │ │ ├── values-fr-rCA │ │ │ │ └── values.xml │ │ │ │ ├── values-fr │ │ │ │ └── values.xml │ │ │ │ ├── values-gl-rES │ │ │ │ └── values.xml │ │ │ │ ├── values-hdpi-v4 │ │ │ │ └── values.xml │ │ │ │ ├── values-hi │ │ │ │ └── values.xml │ │ │ │ ├── values-hr │ │ │ │ └── values.xml │ │ │ │ ├── values-hu │ │ │ │ └── values.xml │ │ │ │ ├── values-hy-rAM │ │ │ │ └── values.xml │ │ │ │ ├── values-in │ │ │ │ └── values.xml │ │ │ │ ├── values-is-rIS │ │ │ │ └── values.xml │ │ │ │ ├── values-it │ │ │ │ └── values.xml │ │ │ │ ├── values-iw │ │ │ │ └── values.xml │ │ │ │ ├── values-ja │ │ │ │ └── values.xml │ │ │ │ ├── values-ka-rGE │ │ │ │ └── values.xml │ │ │ │ ├── values-kk-rKZ │ │ │ │ └── values.xml │ │ │ │ ├── values-km-rKH │ │ │ │ └── values.xml │ │ │ │ ├── values-kn-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-ko │ │ │ │ └── values.xml │ │ │ │ ├── values-ky-rKG │ │ │ │ └── values.xml │ │ │ │ ├── values-land │ │ │ │ └── values.xml │ │ │ │ ├── values-large-v4 │ │ │ │ └── values.xml │ │ │ │ ├── values-lo-rLA │ │ │ │ └── values.xml │ │ │ │ ├── values-lt │ │ │ │ └── values.xml │ │ │ │ ├── values-lv │ │ │ │ └── values.xml │ │ │ │ ├── values-mk-rMK │ │ │ │ └── values.xml │ │ │ │ ├── values-ml-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-mn-rMN │ │ │ │ └── values.xml │ │ │ │ ├── values-mr-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-ms-rMY │ │ │ │ └── values.xml │ │ │ │ ├── values-my-rMM │ │ │ │ └── values.xml │ │ │ │ ├── values-nb │ │ │ │ └── values.xml │ │ │ │ ├── values-ne-rNP │ │ │ │ └── values.xml │ │ │ │ ├── values-nl │ │ │ │ └── values.xml │ │ │ │ ├── values-pl │ │ │ │ └── values.xml │ │ │ │ ├── values-port │ │ │ │ └── values.xml │ │ │ │ ├── values-pt-rPT │ │ │ │ └── values.xml │ │ │ │ ├── values-pt │ │ │ │ └── values.xml │ │ │ │ ├── values-ro │ │ │ │ └── values.xml │ │ │ │ ├── values-ru │ │ │ │ └── values.xml │ │ │ │ ├── values-si-rLK │ │ │ │ └── values.xml │ │ │ │ ├── values-sk │ │ │ │ └── values.xml │ │ │ │ ├── values-sl │ │ │ │ └── values.xml │ │ │ │ ├── values-sr │ │ │ │ └── values.xml │ │ │ │ ├── values-sv │ │ │ │ └── values.xml │ │ │ │ ├── values-sw │ │ │ │ └── values.xml │ │ │ │ ├── values-sw600dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-ta-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-te-rIN │ │ │ │ └── values.xml │ │ │ │ ├── values-th │ │ │ │ └── values.xml │ │ │ │ ├── values-tl │ │ │ │ └── values.xml │ │ │ │ ├── values-tr │ │ │ │ └── values.xml │ │ │ │ ├── values-uk │ │ │ │ └── values.xml │ │ │ │ ├── values-ur-rPK │ │ │ │ └── values.xml │ │ │ │ ├── values-uz-rUZ │ │ │ │ └── values.xml │ │ │ │ ├── values-v11 │ │ │ │ └── values.xml │ │ │ │ ├── values-v14 │ │ │ │ └── values.xml │ │ │ │ ├── values-v17 │ │ │ │ └── values.xml │ │ │ │ ├── values-v21 │ │ │ │ └── values.xml │ │ │ │ ├── values-vi │ │ │ │ └── values.xml │ │ │ │ ├── values-w360dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-w480dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-w500dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-w600dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-w720dp-v13 │ │ │ │ └── values.xml │ │ │ │ ├── values-xlarge-land-v4 │ │ │ │ └── values.xml │ │ │ │ ├── values-xlarge-v4 │ │ │ │ └── values.xml │ │ │ │ ├── values-zh-rCN │ │ │ │ └── values.xml │ │ │ │ ├── values-zh-rHK │ │ │ │ └── values.xml │ │ │ │ ├── values-zh-rTW │ │ │ │ └── values.xml │ │ │ │ ├── values-zu │ │ │ │ └── values.xml │ │ │ │ └── values │ │ │ │ └── values.xml │ │ │ └── support-v4 │ │ │ └── 22.0.0 │ │ │ ├── AndroidManifest.xml │ │ │ ├── aapt │ │ │ └── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── android │ │ │ │ └── support │ │ │ │ └── v4 │ │ │ │ └── media │ │ │ │ ├── MediaMetadataCompat.aidl │ │ │ │ ├── RatingCompat.aidl │ │ │ │ └── session │ │ │ │ ├── MediaSessionCompat.aidl │ │ │ │ ├── ParcelableVolumeInfo.aidl │ │ │ │ └── PlaybackStateCompat.aidl │ │ │ ├── classes.jar │ │ │ └── libs │ │ │ └── internal_impl-22.0.0.jar │ │ └── resources │ │ └── resources-debug-androidTest.ap_ ├── library-swipeback.iml ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── me │ │ │ └── imid │ │ │ └── swipebacklayout │ │ │ └── lib │ │ │ ├── SwipeBackLayout.java │ │ │ ├── Utils.java │ │ │ ├── ViewDragHelper.java │ │ │ └── app │ │ │ ├── SwipeBackActivity.java │ │ │ ├── SwipeBackActivityBase.java │ │ │ ├── SwipeBackActivityHelper.java │ │ │ └── SwipeBackPreferenceActivity.java │ │ └── res │ │ ├── drawable-xhdpi │ │ ├── shadow_bottom.png │ │ ├── shadow_left.png │ │ └── shadow_right.png │ │ ├── layout │ │ └── swipeback_layout.xml │ │ └── values │ │ ├── attrs.xml │ │ └── styles.xml └── swipeback-library.iml ├── screenshot ├── 01.png ├── 02.png ├── 03.png └── 04.png └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | CNode -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/devil.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CNode-android 2 | 这是为CNodejs社区(https://cnodejs.org/) 开发的原生Android版客户端。适用于Android4.0及以上。 3 | 4 | ## 应用截图 5 | ![image](https://github.com/iwhys/CNode-android/blob/master/screenshot/01.png) 6 | ![image](https://github.com/iwhys/CNode-android/blob/master/screenshot/02.png) 7 | ![image](https://github.com/iwhys/CNode-android/blob/master/screenshot/03.png) 8 | ![image](https://github.com/iwhys/CNode-android/blob/master/screenshot/04.png) 9 | 10 | ## 主要功能 11 | * 各栏目列表页展示,下拉刷新,上拉加载更多 12 | * 内容页展示 13 | * 回复主题,包括@特定用户 14 | * 发表新话题 15 | * 扫码登录 16 | 17 | ## 开发编译环境 18 | * Android Studio 1.1.0 19 | * JDK 1.7 20 | * CompileSdkVersion 22 21 | * BuildToolsVersion "22.0.1" 22 | 23 | ## 感谢以下开源库作者 24 | * 大名鼎鼎的Facebook图片加载库
25 | https://github.com/facebook/fresco 26 | * Activity滑动返回
27 | https://github.com/ikew0ng/SwipeBackLayout 28 | * Listview动画
29 | https://github.com/twotoasters/JazzyListView 30 | * Viewpager指示器
31 | https://github.com/astuetz/PagerSlidingTabStrip 32 | * 国人整合的ZXing和ZBar的结合体
33 | https://github.com/SkillCollege/QrCodeScan 34 | * Google家的Volley和Gson
35 | 36 | ## License 37 | 38 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /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/devil/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/iwhys/cnode/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/assets/css/topic_detail.css: -------------------------------------------------------------------------------- 1 | .title { display:block; margin:0; padding:5px; font-size:22px; font-weight:400; color:#000; } 2 | .from { display:block; font-size:14px; line-height:2.5; color:#bbb; text-align:center; background: url(../image/common_divider.png) repeat-x bottom;} 3 | div{line-height: 1.6; word-break:break-all; white-space:pre-wrap;} 4 | img{ max-width:99%; height:auto;} 5 | pre, .prettyprint{ font-size: 14px; border-radius: 5; padding: 15px; border: 1px solid #ccc; background: #f7f7f7;word-break:break-all; white-space:pre-wrap;} -------------------------------------------------------------------------------- /app/src/main/assets/image/common_divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/assets/image/common_divider.png -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Author.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | /** 4 | * 作者类 5 | * Created by devil on 15/4/1. 6 | */ 7 | public class Author { 8 | private String id; 9 | private String loginname; 10 | private String avatar_url; 11 | 12 | public String getId() { 13 | return id; 14 | } 15 | 16 | public void setId(String id) { 17 | this.id = id; 18 | } 19 | 20 | public String getAvatar_url() { 21 | return avatar_url; 22 | } 23 | 24 | public void setAvatar_url(String avatar_url) { 25 | this.avatar_url = avatar_url; 26 | } 27 | 28 | public String getLoginname() { 29 | return loginname; 30 | } 31 | 32 | public void setLoginname(String loginname) { 33 | this.loginname = loginname; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Base.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | /** 4 | * 实体基类 5 | * Created by devil on 15/4/1. 6 | */ 7 | public class Base { 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Content.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | /** 4 | * Created by devil on 15/4/10. 5 | */ 6 | public class Content extends Base { 7 | private Replies data; 8 | 9 | public Replies getData() { 10 | return data; 11 | } 12 | 13 | public void setData(Replies data) { 14 | this.data = data; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Replies.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by devil on 15/4/10. 7 | */ 8 | public class Replies extends Topic { 9 | 10 | private List replies; 11 | 12 | public List getReplies() { 13 | return replies; 14 | } 15 | 16 | public void setReplies(List replies) { 17 | this.replies = replies; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Reply.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * 回复 7 | * Created by devil on 15/4/10. 8 | */ 9 | public class Reply extends Base { 10 | private String id; 11 | private Author author; 12 | private String content; 13 | private String ups[]; 14 | private Date create_at; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public void setId(String id) { 21 | this.id = id; 22 | } 23 | 24 | public Author getAuthor() { 25 | return author; 26 | } 27 | 28 | public void setAuthor(Author author) { 29 | this.author = author; 30 | } 31 | 32 | public String getContent() { 33 | return content; 34 | } 35 | 36 | public void setContent(String content) { 37 | this.content = content; 38 | } 39 | 40 | public String[] getUps() { 41 | return ups; 42 | } 43 | 44 | public void setUps(String[] ups) { 45 | this.ups = ups; 46 | } 47 | 48 | public Date getCreate_at() { 49 | return create_at; 50 | } 51 | 52 | public void setCreate_at(Date create_at) { 53 | this.create_at = create_at; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/Topics.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 主题列表 7 | * Created by devil on 15/4/2. 8 | */ 9 | public class Topics { 10 | private List data; 11 | 12 | public List getData() { 13 | return data; 14 | } 15 | 16 | public void setData(List data) { 17 | this.data = data; 18 | } 19 | 20 | @Override 21 | public String toString() { 22 | return "Topics{" + 23 | "data=" + data + 24 | '}'; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/entity/UserData.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.entity; 2 | 3 | /** 4 | * Created by devil on 15/4/28. 5 | */ 6 | public class UserData { 7 | 8 | private User data; 9 | 10 | public User getData() { 11 | return data; 12 | } 13 | 14 | public void setData(User data) { 15 | this.data = data; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/ui/activity/SingleFragmentActivity.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.ui.activity; 2 | 3 | import android.os.Bundle; 4 | import android.widget.FrameLayout; 5 | 6 | import com.iwhys.cnode.R; 7 | import com.iwhys.cnode.util.SimpleFactory; 8 | import com.iwhys.cnode.util.constant.Params; 9 | 10 | /** 11 | * 单个fragment的Activity 12 | * Created by devil on 15/3/5. 13 | */ 14 | public class SingleFragmentActivity extends BaseBackActivity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | try { 20 | Bundle bundle = getIntent().getExtras(); 21 | String fragmentName = bundle.getString(Params.FRAGMENT_NAME); 22 | Bundle arguments = bundle.getBundle(Params.ARGUMENTS); 23 | FrameLayout container = new FrameLayout(this); 24 | container.setId(R.id.wrap_content); 25 | setContentView(container); 26 | getSupportFragmentManager().beginTransaction().add(R.id.wrap_content, SimpleFactory.createFragment(fragmentName, arguments)).commit(); 27 | } catch (Exception e){ 28 | e.printStackTrace(); 29 | finish(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/ui/activity/SingleInstanceActivity.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.ui.activity; 2 | 3 | /** 4 | * launchMode为单例 5 | * Created by devil on 15/4/13. 6 | */ 7 | public class SingleInstanceActivity extends SingleFragmentActivity { 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/ui/fragment/AboutFragment.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.ui.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v7.widget.Toolbar; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import com.iwhys.cnode.R; 11 | 12 | /** 13 | * 关于页 14 | * Created by devil on 15/4/12. 15 | */ 16 | public class AboutFragment extends BaseFragment { 17 | 18 | @Override 19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 20 | View view = inflater.inflate(R.layout.fragment_about, container, false); 21 | Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar); 22 | toolbar.setTitle(R.string.about); 23 | return view; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/ui/fragment/SettingFragment.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.ui.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v7.widget.Toolbar; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import com.iwhys.cnode.R; 11 | 12 | /** 13 | * 设置 14 | * Created by devil on 15/4/10. 15 | */ 16 | public class SettingFragment extends BaseFragment { 17 | 18 | @Override 19 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 20 | View view = inflater.inflate(R.layout.fragment_setting, container, false); 21 | Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar); 22 | toolbar.setTitle(R.string.setting); 23 | return view; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/util/constant/IntentAction.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.util.constant; 2 | 3 | /** 4 | * 所有的IntentAction常量 5 | * Created by devil on 15/4/13. 6 | */ 7 | public class IntentAction { 8 | 9 | public final static String LOGIN = "com.iwhys.cnode.login"; 10 | public final static String NEW_TOPIC = "com.iwhys.cnode.new_topic"; 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/java/com/iwhys/cnode/util/constant/Params.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.cnode.util.constant; 2 | 3 | /** 4 | * 参数常量 5 | * Created by devil on 15/4/13. 6 | */ 7 | public class Params { 8 | 9 | public final static String FRAGMENT_NAME = "fragment_name"; 10 | public final static String ARGUMENTS = "arguments"; 11 | public final static String TITLE = "title"; 12 | public final static String TAB = "tab"; 13 | public final static String LIMIT = "limit"; 14 | public final static String PAGE = "page"; 15 | public final static String CONTENT = "content"; 16 | public final static String ACCESS_TOKEN = "accesstoken"; 17 | public final static String LOGIN_NAME = "loginname"; 18 | public final static String AVATAR_URL = "avatar_url"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/anim/anim_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/anim/rotate_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_out_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/anim/static_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/static_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/anim/translate_down.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/anim/translate_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/translate_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/res/anim/translate_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/color/btn_common_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/color/radio_text_color_switcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/color/tab_btn_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/color/white_btn_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_add.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_app.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_bad.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_exit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_good.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_loading_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_loading_small.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_person_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_person_default.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_reply.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_reply_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_reply_small.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_setting.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_share.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_top.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/icon_visit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/icon_visit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/left_menu_divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/left_menu_divider.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/loading_large_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/loading_large_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/radiobtn_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/radiobtn_checked.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/radiobtn_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/app/src/main/res/drawable-xhdpi/radiobtn_unchecked.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/btn_common_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dialog_loading_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_left_menu_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_topic_even_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/item_topic_odd_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/radio_button_switcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rect_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/round_corner_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/common_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_setting.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_topic_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 14 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/input_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/menu/add.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/menu/exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/share.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #222 4 | @android:color/white 5 | #82bb22 6 | #fff 7 | #ffc8eac9 8 | #6d9d1d 9 | #4b4b4b 10 | #444 11 | #aaa 12 | #fff 13 | #eee 14 | #bbb 15 | 16 | #fafbff 17 | #e5e8ef 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /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:1.1.0' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 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.2.1-all.zip 7 | -------------------------------------------------------------------------------- /library-mylistview/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library-mylistview/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 22 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | compile 'com.android.support:appcompat-v7:22.0.0' 24 | } 25 | -------------------------------------------------------------------------------- /library-mylistview/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/devil/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library-mylistview/src/androidTest/java/com/iwhys/mylistview/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.mylistview; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /library-mylistview/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /library-mylistview/src/main/java/com/iwhys/mylistview/BaseListAdapter.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.mylistview; 2 | 3 | import android.widget.BaseAdapter; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * 列表基类 10 | * Created by devil on 15/4/9. 11 | */ 12 | public abstract class BaseListAdapter extends BaseAdapter { 13 | 14 | private List dataList; 15 | 16 | public BaseListAdapter(){ 17 | dataList = new ArrayList<>(); 18 | } 19 | 20 | /** 21 | * 刷新列表 22 | * 23 | * @param datas 新获取到得数据列表 24 | * @param isLoadMore 是否加载更多 25 | */ 26 | public void refresh(List datas, boolean isLoadMore) { 27 | if (datas.isEmpty()) return; 28 | if (!isLoadMore){ 29 | dataList.clear(); 30 | } 31 | dataList.addAll(datas); 32 | notifyDataSetChanged(); 33 | } 34 | 35 | @Override 36 | public long getItemId(int position) { 37 | return position; 38 | } 39 | 40 | @Override 41 | public Object getItem(int position) { 42 | return dataList.get(position); 43 | } 44 | 45 | @Override 46 | public int getCount() { 47 | return dataList.size(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /library-mylistview/src/main/java/com/iwhys/mylistview/CompatOnItemClickListener.java: -------------------------------------------------------------------------------- 1 | package com.iwhys.mylistview; 2 | 3 | import android.view.View; 4 | import android.widget.AdapterView; 5 | 6 | /** 7 | * 列表条目单击事件辅助类 8 | * 屏蔽短时间内多次点击时间 9 | * Created by devil on 15/4/9. 10 | */ 11 | public abstract class CompatOnItemClickListener implements AdapterView.OnItemClickListener{ 12 | 13 | private final static long TIME_INTERVAL = 500; 14 | 15 | private long lastClickTime = 0; 16 | 17 | private boolean isFastDoubleClick() { 18 | long time = System.currentTimeMillis(); 19 | long timeD = time - lastClickTime; 20 | if (0 < timeD && timeD < TIME_INTERVAL) { 21 | return true; 22 | } 23 | lastClickTime = time; 24 | return false; 25 | } 26 | 27 | 28 | @Override 29 | public void onItemClick(AdapterView parent, View view, int position, long id) { 30 | if (isFastDoubleClick()) return; 31 | onItemClick(view, position); 32 | } 33 | 34 | /** 35 | * 列表单击事件 36 | * @param view view 37 | * @param position 位置 38 | */ 39 | public abstract void onItemClick(View view, int position); 40 | } 41 | -------------------------------------------------------------------------------- /library-mylistview/src/main/res/anim/rotate_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /library-mylistview/src/main/res/drawable-xhdpi/icon_bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-mylistview/src/main/res/drawable-xhdpi/icon_bad.png -------------------------------------------------------------------------------- /library-mylistview/src/main/res/drawable-xhdpi/icon_loading_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-mylistview/src/main/res/drawable-xhdpi/icon_loading_small.png -------------------------------------------------------------------------------- /library-mylistview/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /library-mylistview/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /library-mylistview/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 网络超时 3 | 网络链接已断开 4 | 访问异常 5 | 6 | 正在载入 7 | 点击加载更多 8 | 加载失败,点击重试 9 | 当前没有数据 10 | 11 | -------------------------------------------------------------------------------- /library-qrcode/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library-qrcode/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 22 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | 20 | sourceSets { 21 | main { 22 | jniLibs.srcDirs = ['libs'] 23 | } 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | compile 'com.android.support:appcompat-v7:22.0.0' 30 | } 31 | -------------------------------------------------------------------------------- /library-qrcode/libs/armeabi-v7a/libzbar.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/libs/armeabi-v7a/libzbar.so -------------------------------------------------------------------------------- /library-qrcode/libs/armeabi/libzbar.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/libs/armeabi/libzbar.so -------------------------------------------------------------------------------- /library-qrcode/libs/mips/libzbar.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/libs/mips/libzbar.so -------------------------------------------------------------------------------- /library-qrcode/libs/x86/libzbar.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/libs/x86/libzbar.so -------------------------------------------------------------------------------- /library-qrcode/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/devil/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library-qrcode/src/androidTest/java/com/zbar/lib/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.zbar.lib; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /library-qrcode/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /library-qrcode/src/main/java/com/zbar/lib/ZbarManager.java: -------------------------------------------------------------------------------- 1 | package com.zbar.lib; 2 | 3 | /** 4 | * 作者: 陈涛(1076559197@qq.com) 5 | * 6 | * 时间: 2014年5月9日 下午12:25:46 7 | * 8 | * 版本: V_1.0.0 9 | * 10 | * 描述: zbar调用类 11 | */ 12 | public class ZbarManager { 13 | 14 | static { 15 | System.loadLibrary("zbar"); 16 | } 17 | 18 | public native String decode(byte[] data, int width, int height, boolean isCrop, int x, int y, int cwidth, int cheight); 19 | } 20 | -------------------------------------------------------------------------------- /library-qrcode/src/main/java/com/zbar/lib/camera/AutoFocusCallback.java: -------------------------------------------------------------------------------- 1 | package com.zbar.lib.camera; 2 | 3 | import android.hardware.Camera; 4 | import android.os.Handler; 5 | import android.os.Message; 6 | import android.util.Log; 7 | 8 | /** 9 | * 作者: 陈涛(1076559197@qq.com) 10 | * 11 | * 时间: 2014年5月9日 下午12:21:30 12 | * 13 | * 版本: V_1.0.0 14 | * 15 | * 描述: 相机自动对焦 16 | */ 17 | final class AutoFocusCallback implements Camera.AutoFocusCallback { 18 | 19 | private static final String TAG = AutoFocusCallback.class.getSimpleName(); 20 | 21 | private static final long AUTOFOCUS_INTERVAL_MS = 1500L; 22 | 23 | private Handler autoFocusHandler; 24 | private int autoFocusMessage; 25 | 26 | void setHandler(Handler autoFocusHandler, int autoFocusMessage) { 27 | this.autoFocusHandler = autoFocusHandler; 28 | this.autoFocusMessage = autoFocusMessage; 29 | } 30 | 31 | public void onAutoFocus(boolean success, Camera camera) { 32 | if (autoFocusHandler != null) { 33 | Message message = autoFocusHandler.obtainMessage(autoFocusMessage, success); 34 | autoFocusHandler.sendMessageDelayed(message, AUTOFOCUS_INTERVAL_MS); 35 | autoFocusHandler = null; 36 | } else { 37 | Log.d(TAG, "Got auto-focus callback, but no handler for it"); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /library-qrcode/src/main/java/com/zbar/lib/decode/DecodeThread.java: -------------------------------------------------------------------------------- 1 | package com.zbar.lib.decode; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.zbar.lib.CaptureView; 7 | 8 | import java.util.concurrent.CountDownLatch; 9 | 10 | /** 11 | * 作者: 陈涛(1076559197@qq.com) 12 | * 13 | * 时间: 2014年5月9日 下午12:24:34 14 | * 15 | * 版本: V_1.0.0 16 | * 17 | * 描述: 解码线程 18 | */ 19 | final class DecodeThread extends Thread { 20 | 21 | CaptureView captureView; 22 | private Handler handler; 23 | private final CountDownLatch handlerInitLatch; 24 | 25 | DecodeThread(CaptureView captureView) { 26 | this.captureView = captureView; 27 | handlerInitLatch = new CountDownLatch(1); 28 | } 29 | 30 | Handler getHandler() { 31 | try { 32 | handlerInitLatch.await(); 33 | } catch (InterruptedException ie) { 34 | // continue? 35 | } 36 | return handler; 37 | } 38 | 39 | @Override 40 | public void run() { 41 | Looper.prepare(); 42 | handler = new DecodeHandler(captureView); 43 | handlerInitLatch.countDown(); 44 | Looper.loop(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /library-qrcode/src/main/java/com/zbar/lib/decode/FinishListener.java: -------------------------------------------------------------------------------- 1 | package com.zbar.lib.decode; 2 | 3 | import android.app.Activity; 4 | import android.content.DialogInterface; 5 | 6 | /** 7 | * 作者: 陈涛(1076559197@qq.com) 8 | * 9 | * 时间: 2014年5月9日 下午12:24:51 10 | * 11 | * 版本: V_1.0.0 12 | * 13 | */ 14 | public final class FinishListener 15 | implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener, Runnable { 16 | 17 | private final Activity activityToFinish; 18 | 19 | public FinishListener(Activity activityToFinish) { 20 | this.activityToFinish = activityToFinish; 21 | } 22 | 23 | public void onCancel(DialogInterface dialogInterface) { 24 | run(); 25 | } 26 | 27 | public void onClick(DialogInterface dialogInterface, int i) { 28 | run(); 29 | } 30 | 31 | public void run() { 32 | activityToFinish.finish(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/camera_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/camera_back.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/capture_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/capture_frame.9.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/icon_flashlight_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/icon_flashlight_off.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/icon_flashlight_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/icon_flashlight_on.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/scan_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/scan_line.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/drawable-xhdpi/scan_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iwhys/CNode-android/9c841fe98d3c2c94cbf14441591719426e100fb2/library-qrcode/src/main/res/drawable-xhdpi/scan_mask.png -------------------------------------------------------------------------------- /library-qrcode/src/main/res/layout/inc_scanner_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 |