├── project ├── lint.xml ├── src │ └── main │ │ └── java │ │ ├── com │ │ ├── piglet │ │ │ ├── core │ │ │ │ ├── help.properties │ │ │ │ └── MysqlHelper.java │ │ │ ├── dao │ │ │ │ ├── pojo │ │ │ │ │ ├── Row.java │ │ │ │ │ ├── Cell.java │ │ │ │ │ ├── Table.java │ │ │ │ │ ├── Database.java │ │ │ │ │ ├── TableProperty.java │ │ │ │ │ └── ConnectionInfo.java │ │ │ │ └── impl │ │ │ │ │ └── ConnectionInfoDao.java │ │ │ ├── worker │ │ │ │ └── Worker.java │ │ │ ├── utils │ │ │ │ ├── MysqlUtils.java │ │ │ │ ├── Constant.java │ │ │ │ └── UnitConverter.java │ │ │ ├── widget │ │ │ │ ├── ResizeLayout.java │ │ │ │ └── SpaceTokenizer.java │ │ │ ├── adapter │ │ │ │ ├── TbAdapter.java │ │ │ │ ├── DbAdapter.java │ │ │ │ ├── PropAdapter.java │ │ │ │ └── ConnInfoAdapter.java │ │ │ └── ui │ │ │ │ └── PropActivity.java │ │ ├── ben │ │ │ └── data │ │ │ │ ├── DatabaseUtils.java │ │ │ │ ├── GenericDao.java │ │ │ │ ├── DatabaseHelper.java │ │ │ │ └── DbDao.java │ │ ├── MysqlCliApplication.java │ │ └── report1413634005175 │ │ └── net │ │ └── tsz │ │ └── afinal │ │ ├── db │ │ ├── table │ │ │ ├── Id.java │ │ │ ├── OneToMany.java │ │ │ ├── ManyToOne.java │ │ │ └── KeyValue.java │ │ └── sqlite │ │ │ ├── SqlInfo.java │ │ │ ├── OneToManyLazyLoader.java │ │ │ ├── ManyToOneLazyLoader.java │ │ │ └── DbModel.java │ │ ├── exception │ │ ├── HttpException.java │ │ ├── ViewException.java │ │ ├── DbException.java │ │ └── AfinalException.java │ │ ├── http │ │ ├── entityhandler │ │ │ ├── EntityCallBack.java │ │ │ ├── StringEntityHandler.java │ │ │ └── FileEntityHandler.java │ │ ├── AjaxCallBack.java │ │ ├── SyncRequestHandler.java │ │ └── RetryHandler.java │ │ ├── bitmap │ │ ├── download │ │ │ └── Downloader.java │ │ ├── core │ │ │ ├── IMemoryCache.java │ │ │ ├── BaseMemoryCacheImpl.java │ │ │ ├── SoftMemoryCacheImpl.java │ │ │ ├── BytesBufferPool.java │ │ │ ├── BitmapDisplayConfig.java │ │ │ └── BitmapProcess.java │ │ └── display │ │ │ ├── Displayer.java │ │ │ └── SimpleDisplayer.java │ │ ├── annotation │ │ ├── sqlite │ │ │ ├── Transient.java │ │ │ ├── Table.java │ │ │ ├── ManyToOne.java │ │ │ ├── OneToMany.java │ │ │ ├── Property.java │ │ │ └── Id.java │ │ └── view │ │ │ ├── Select.java │ │ │ └── ViewInject.java │ │ └── core │ │ └── FileNameGenerator.java ├── res │ ├── drawable-hdpi │ │ ├── pre.png │ │ ├── conn.png │ │ ├── first.png │ │ ├── last.png │ │ ├── logo1.png │ │ ├── logo2.png │ │ ├── next.png │ │ ├── table.png │ │ ├── dbicon.png │ │ ├── property.png │ │ ├── unconn.png │ │ ├── add_normal.png │ │ ├── add_pressed.png │ │ ├── conn_disabled.png │ │ ├── conn_enabled.png │ │ ├── first_pressed.png │ │ ├── ic_launcher.png │ │ ├── last_pressed.png │ │ ├── next_pressed.png │ │ ├── pre_pressed.png │ │ ├── purplecow_n.png │ │ ├── purplecow_p.png │ │ ├── umeng_update_close_bg_tap.png │ │ ├── umeng_update_close_bg_normal.png │ │ ├── umeng_update_btn_check_off_holo_light.png │ │ ├── umeng_update_btn_check_on_holo_light.png │ │ ├── umeng_update_btn_check_off_focused_holo_light.png │ │ ├── umeng_update_btn_check_off_pressed_holo_light.png │ │ ├── umeng_update_btn_check_on_focused_holo_light.png │ │ └── umeng_update_btn_check_on_pressed_holo_light.png │ ├── drawable │ │ ├── umeng_fb_logo.png │ │ ├── umeng_fb_bar_bg.9.png │ │ ├── umeng_fb_arrow_right.png │ │ ├── umeng_fb_back_normal.png │ │ ├── umeng_fb_list_item.9.png │ │ ├── umeng_fb_tick_normal.png │ │ ├── umeng_fb_back_selected.png │ │ ├── umeng_fb_statusbar_icon.png │ │ ├── umeng_fb_tick_selected.png │ │ ├── umeng_fb_user_bubble.9.png │ │ ├── umeng_fb_write_normal.png │ │ ├── umeng_fb_write_pressed.png │ │ ├── umeng_fb_conversation_bg.png │ │ ├── umeng_fb_reply_left_bg.9.png │ │ ├── umeng_fb_reply_right_bg.9.png │ │ ├── umeng_fb_see_list_normal.png │ │ ├── umeng_fb_see_list_pressed.png │ │ ├── umeng_update_wifi_disable.png │ │ ├── umeng_fb_list_item_pressed.9.png │ │ ├── fb_text.xml │ │ ├── umeng_update_dialog_bg.xml │ │ ├── logo.xml │ │ ├── sel_last.xml │ │ ├── sel_next.xml │ │ ├── sel_pre.xml │ │ ├── add.xml │ │ ├── sel_first.xml │ │ ├── purplecow.xml │ │ ├── rectbgbold.xml │ │ ├── rectbghead.xml │ │ ├── umeng_fb_top_banner.xml │ │ ├── rectbg.xml │ │ ├── umeng_update_button_ok_bg_tap.xml │ │ ├── umeng_update_button_cancel_bg_tap.xml │ │ ├── umeng_common_gradient_red.xml │ │ ├── umeng_fb_gradient_green.xml │ │ ├── umeng_fb_gradient_orange.xml │ │ ├── umeng_common_gradient_green.xml │ │ ├── umeng_common_gradient_orange.xml │ │ ├── umeng_fb_write_selector.xml │ │ ├── connection.xml │ │ ├── umeng_fb_point_new.xml │ │ ├── umeng_fb_point_normal.xml │ │ ├── umeng_fb_submit_selector.xml │ │ ├── umeng_fb_list_item_selector.xml │ │ ├── umeng_fb_see_list_selector.xml │ │ ├── umeng_update_button_ok_bg_focused.xml │ │ ├── umeng_update_button_cancel_bg_focused.xml │ │ ├── umeng_update_button_cancel_bg_normal.xml │ │ ├── umeng_update_button_ok_bg_normal.xml │ │ ├── umeng_fb_gray_frame.xml │ │ ├── umeng_update_title_bg.xml │ │ ├── umeng_fb_back_selector.xml │ │ ├── umeng_fb_tick_selector.xml │ │ ├── umeng_fb_btn_bg_selector.xml │ │ ├── bg_popup_item_selector.xml │ │ ├── umeng_update_button_close_bg_selector.xml │ │ ├── umeng_update_button_ok_bg_selector.xml │ │ ├── umeng_update_button_cancel_bg_selector.xml │ │ └── umeng_update_button_check_selector.xml │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ ├── bg_dialog.9.png │ │ ├── ic_launcher.png │ │ └── icon_prompt_s.png │ ├── anim │ │ ├── accelerate_interpolator.xml │ │ ├── decelerate_interpolator.xml │ │ ├── la_page_zoom.xml │ │ ├── la_pageturning_top.xml │ │ ├── la_pageturning_bottom.xml │ │ ├── dialer_hide.xml │ │ ├── dialer_show.xml │ │ ├── bottom_in.xml │ │ ├── bottom_out.xml │ │ ├── top_in.xml │ │ ├── top_out.xml │ │ ├── disappear.xml │ │ ├── renren_photo_bottom_in.xml │ │ ├── renren_photo_bottom_out.xml │ │ ├── umeng_fb_slide_in_from_left.xml │ │ ├── umeng_fb_slide_in_from_right.xml │ │ ├── umeng_fb_slide_out_from_left.xml │ │ ├── umeng_fb_slide_out_from_right.xml │ │ ├── dialog_exit.xml │ │ ├── match_sync_loading.xml │ │ ├── sync_progress.xml │ │ ├── cloud_sync_refresh.xml │ │ ├── grow_from_down_to_top.xml │ │ ├── zoom.xml │ │ ├── pump_top.xml │ │ ├── pump_bottom.xml │ │ ├── grow_from_top.xml │ │ ├── grow_from_bottom.xml │ │ ├── grow_from_bottomleft_to_topright.xml │ │ ├── grow_from_bottomright_to_topleft.xml │ │ ├── grow_from_topright_to_bottomleft.xml │ │ ├── pageturning_top.xml │ │ ├── shrink_from_bottom.xml │ │ ├── shrink_from_bottomleft_to_topright.xml │ │ ├── shrink_from_top.xml │ │ ├── grow_from_topleft_to_bottomright.xml │ │ ├── shrink_from_bottomright_to_topleft.xml │ │ ├── shrink_from_topleft_to_bottomright.xml │ │ ├── shrink_from_topright_to_bottomleft.xml │ │ ├── dialog_enter.xml │ │ ├── match_sync_enter.xml │ │ └── pageturning_bottom.xml │ ├── values-sw600dp │ │ └── dimens.xml │ ├── layout │ │ ├── umeng_fb_new_reply_alert_dialog.xml │ │ ├── popup_title.xml │ │ ├── umeng_fb_list_header.xml │ │ ├── db_item.xml │ │ ├── tb_item.xml │ │ ├── prop_item.xml │ │ ├── activity_about.xml │ │ ├── conn_item.xml │ │ ├── activity_db.xml │ │ ├── activity_tb.xml │ │ ├── activity_prop.xml │ │ ├── popup_item.xml │ │ ├── activity_main.xml │ │ ├── umeng_fb_list_item.xml │ │ └── umeng_fb_activity_contact.xml │ ├── menu │ │ ├── main.xml │ │ ├── tablelist.xml │ │ └── connlist.xml │ ├── color │ │ ├── deep_gray_green_text_return.xml │ │ ├── detail_gray_green_text_return.xml │ │ ├── heavy_black_to_green_text_return.xml │ │ ├── blue_text_return.xml │ │ ├── red_text_return.xml │ │ ├── black_to_green_text_return.xml │ │ ├── deepgray_text_return.xml │ │ ├── gray_black_text_return.xml │ │ ├── gray_text_return.xml │ │ ├── black_text_return.xml │ │ ├── match_sync_text_return.xml │ │ ├── popup_item_selector.xml │ │ ├── black_to_white_return.xml │ │ ├── gray_guide_login_text_selector.xml │ │ ├── green_to_black_return.xml │ │ ├── green_to_white_return.xml │ │ ├── white_text_orange_return.xml │ │ ├── gray_text_orange_return.xml │ │ ├── gray_text_white_return.xml │ │ ├── red_gray_text_selector.xml │ │ ├── white_text_blue_return.xml │ │ ├── green_gray_text_selector.xml │ │ ├── gray_blue_text_return.xml │ │ ├── gray_red_text_return.xml │ │ └── gray_green_text_return.xml │ ├── values-sw720dp-land │ │ └── dimens.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ ├── values │ │ ├── dimens.xml │ │ ├── umeng_update_string.xml │ │ ├── umeng_fb_strings.xml │ │ └── umeng_common_strings.xml │ ├── values-ja │ │ └── umeng_fb_strings.xml │ └── values-zh │ │ ├── umeng_update_string.xml │ │ ├── umeng_fb_strings.xml │ │ ├── umeng_common_strings.xml │ │ └── strings.xml ├── libs │ └── armeabi │ │ └── libbspatch.so ├── .settings │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── README.md └── AndroidManifest.xml ├── README.md └── release └── MysqlCli_20141120.apk /project/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aMysqlClient 2 | 一个类似于Navicat的Mysql Android客户端 3 | 4 | **如果你想要构建这个工程,请使用 Maven。** 5 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/core/help.properties: -------------------------------------------------------------------------------- 1 | OP=PRESS 'mysql>' 2 | USAGE=Show recent cmds. 3 | 4 | -------------------------------------------------------------------------------- /release/MysqlCli_20141120.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/release/MysqlCli_20141120.apk -------------------------------------------------------------------------------- /project/res/drawable-hdpi/pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/pre.png -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/pojo/Row.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.pojo; 2 | 3 | public class Row { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /project/libs/armeabi/libbspatch.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/libs/armeabi/libbspatch.so -------------------------------------------------------------------------------- /project/res/drawable-hdpi/conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/conn.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/first.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/last.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/logo1.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/logo2.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/next.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/table.png -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/pojo/Cell.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.pojo; 2 | 3 | public class Cell { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /project/res/drawable-hdpi/dbicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/dbicon.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/property.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/unconn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/unconn.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_logo.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/add_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/add_normal.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/add_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/add_pressed.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/conn_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/conn_disabled.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/conn_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/conn_enabled.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/first_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/first_pressed.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/last_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/last_pressed.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/next_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/next_pressed.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/pre_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/pre_pressed.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/purplecow_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/purplecow_n.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/purplecow_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/purplecow_p.png -------------------------------------------------------------------------------- /project/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /project/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /project/res/drawable-xxhdpi/bg_dialog.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-xxhdpi/bg_dialog.9.png -------------------------------------------------------------------------------- /project/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_bar_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_bar_bg.9.png -------------------------------------------------------------------------------- /project/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /project/res/drawable-xxhdpi/icon_prompt_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-xxhdpi/icon_prompt_s.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_arrow_right.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_back_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_back_normal.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_list_item.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_list_item.9.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_tick_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_tick_normal.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_back_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_back_selected.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_statusbar_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_statusbar_icon.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_tick_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_tick_selected.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_user_bubble.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_user_bubble.9.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_write_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_write_normal.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_write_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_write_pressed.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_conversation_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_conversation_bg.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_reply_left_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_reply_left_bg.9.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_reply_right_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_reply_right_bg.9.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_see_list_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_see_list_normal.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_see_list_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_see_list_pressed.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_wifi_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_update_wifi_disable.png -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_list_item_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable/umeng_fb_list_item_pressed.9.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_close_bg_tap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_close_bg_tap.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_close_bg_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_close_bg_normal.png -------------------------------------------------------------------------------- /project/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /project/res/anim/accelerate_interpolator.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_off_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_off_holo_light.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_on_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_on_holo_light.png -------------------------------------------------------------------------------- /project/res/anim/decelerate_interpolator.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/res/anim/la_page_zoom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_off_focused_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_off_focused_holo_light.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_off_pressed_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_off_pressed_holo_light.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_on_focused_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_on_focused_holo_light.png -------------------------------------------------------------------------------- /project/res/drawable-hdpi/umeng_update_btn_check_on_pressed_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bennyhuo/aMysqlClient/HEAD/project/res/drawable-hdpi/umeng_update_btn_check_on_pressed_holo_light.png -------------------------------------------------------------------------------- /project/res/anim/la_pageturning_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /project/res/anim/la_pageturning_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /project/res/anim/dialer_hide.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /project/res/anim/dialer_show.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /project/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/impl/ConnectionInfoDao.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.impl; 2 | 3 | import com.ben.data.DbDao; 4 | import com.piglet.dao.pojo.ConnectionInfo; 5 | 6 | public class ConnectionInfoDao extends DbDao { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /project/res/drawable/fb_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/src/main/java/com/ben/data/DatabaseUtils.java: -------------------------------------------------------------------------------- 1 | package com.ben.data; 2 | 3 | import net.tsz.afinal.FinalDb; 4 | 5 | public class DatabaseUtils { 6 | public static FinalDb getDatabase(){ 7 | return DatabaseHelper.getInstance().getDb(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /project/res/layout/umeng_fb_new_reply_alert_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/logo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/sel_last.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/sel_next.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/sel_pre.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/anim/bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/anim/bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/anim/top_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/anim/top_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/add.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/sel_first.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/drawable/purplecow.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/rectbgbold.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/rectbghead.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_top_banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /project/res/anim/disappear.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | -------------------------------------------------------------------------------- /project/res/drawable/rectbg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/anim/renren_photo_bottom_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/anim/renren_photo_bottom_out.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /project/res/color/deep_gray_green_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/color/detail_gray_green_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 128dp 8 | 9 | -------------------------------------------------------------------------------- /project/res/anim/umeng_fb_slide_in_from_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_ok_bg_tap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/anim/umeng_fb_slide_in_from_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /project/res/anim/umeng_fb_slide_out_from_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /project/res/anim/umeng_fb_slide_out_from_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_cancel_bg_tap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_common_gradient_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_gradient_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_gradient_orange.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_common_gradient_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_common_gradient_orange.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_write_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /project/src/main/java/com/MysqlCliApplication.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import android.app.Application; 4 | 5 | import com.ben.data.DatabaseHelper; 6 | 7 | public class MysqlCliApplication extends Application{ 8 | 9 | @Override 10 | public void onCreate() { 11 | DatabaseHelper.getInstance().init(this); 12 | super.onCreate(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /project/res/drawable/connection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_point_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_point_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_submit_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_list_item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_see_list_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_ok_bg_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_cancel_bg_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/color/heavy_black_to_green_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/anim/dialog_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_cancel_bg_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_ok_bg_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /project/res/anim/match_sync_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /project/res/anim/sync_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /project/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /project/res/anim/cloud_sync_refresh.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_gray_frame.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/color/blue_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/menu/tablelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /project/res/color/red_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_title_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/color/black_to_green_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/color/deepgray_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/color/gray_black_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/color/gray_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/color/black_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /project/README.md: -------------------------------------------------------------------------------- 1 | aMysqlClient 2 | ============ 3 | 4 | 一个类似于Navicat的Mysql Android客户端 5 | 6 | # 功能简介 # 7 | 8 | 1. 支持简易模式,可以直接查看Mysql数据库的表结构、表数据等等。 9 | 2. 支持命令行模式,命令模式有历史记录,有常用命令支持,还有常用词快捷输入,支持事务等功能等等。 10 | 11 | # 使用方法 # 12 | 这个应用是面向程序员的,我想这么简单的东西。。有问题还是直接发邮件吧,[enbandari@qq.com](enbandari@qq.com) 13 | 14 | # 鸣谢 # 15 | 1. 项目中使用到了Spring jdbc, Dbcp连接池这些web应用中常见的框架,也用到了国内杨福海大神开源的Afinal框架的db模块。感谢。 16 | 2. 感谢小伙伴在半夜两点还找我查Mysql服务器的数据,迫使我花了一个多星期写了个这么个app。 17 | 18 | -------------------------------------------------------------------------------- /project/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 48.33dp 7 | 17sp 8 | 14sp 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/match_sync_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/color/popup_item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/black_to_white_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/gray_guide_login_text_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /project/res/color/green_to_black_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/green_to_white_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/white_text_orange_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_back_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_tick_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_down_to_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/color/gray_text_orange_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/gray_text_white_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/red_gray_text_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/white_text_blue_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/green_gray_text_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_fb_btn_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/color/gray_blue_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/drawable/bg_popup_item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_close_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /project/res/anim/zoom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | -------------------------------------------------------------------------------- /project/res/color/gray_red_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/color/gray_green_text_return.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /project/res/anim/pump_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_ok_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /project/res/anim/pump_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_cancel_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_bottomleft_to_topright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_bottomright_to_topleft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_topright_to_bottomleft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/anim/pageturning_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_bottomleft_to_topright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/grow_from_topleft_to_bottomright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_bottomright_to_topleft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_topleft_to_bottomright.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | -------------------------------------------------------------------------------- /project/res/anim/shrink_from_topright_to_bottomleft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /project/src/main/java/com/ben/data/GenericDao.java: -------------------------------------------------------------------------------- 1 | package com.ben.data; 2 | 3 | import java.util.List; 4 | 5 | public interface GenericDao { 6 | 7 | public void save(T entity); 8 | 9 | public void update(T entity); 10 | 11 | public void delete(T entity); 12 | 13 | public T findById(Object id); 14 | 15 | //所有非单记录查询,都应该提供相应的分页接口。 16 | public List findAll(); 17 | 18 | public List findAll(int pageMax, int pageStart); 19 | 20 | public List findByKeys(String[] keys, Object[] values); 21 | 22 | public List findByKeys(String[] keys, Object[] values, int pageMax, int pageStart); 23 | } 24 | -------------------------------------------------------------------------------- /project/res/anim/dialog_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/anim/match_sync_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /project/res/values-ja/umeng_fb_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | メール、電話、その他の連絡先 5 | 更新 6 | 戻る 7 | お客様のご返答 8 | 連絡 9 | 10 | 送信 11 | 12 | 13 | 新しい回答を持っている 14 | 15 | -------------------------------------------------------------------------------- /project/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 12 | org.eclipse.jdt.core.compiler.source=1.6 13 | -------------------------------------------------------------------------------- /project/res/values-zh/umeng_update_string.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 未联网 4 | 发现新版本 5 | 最新版本: 6 | 更新内容 7 | 仅需要下载: 8 | 新版本大小: 9 | (提示:非WIFI环境) 10 | 立即更新 11 | 应用更新 12 | 以后再说 13 | 忽略该版 14 | 正在更新中.... 15 | 最新版本已下载,是否安装? 16 | 17 | -------------------------------------------------------------------------------- /project/res/menu/connlist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 12 | 17 | 22 | 23 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/pojo/Table.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.pojo; 2 | 3 | import net.tsz.afinal.annotation.sqlite.Id; 4 | 5 | public class Table { 6 | @Id 7 | private String name; 8 | 9 | private String content; 10 | 11 | public Table(){ 12 | 13 | } 14 | 15 | public Table(Table table){ 16 | this.name = table.name; 17 | this.content = table.content; 18 | } 19 | 20 | public Table(String name , String content){ 21 | this.name = name; 22 | this.content = content; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | 33 | public String getContent() { 34 | return content; 35 | } 36 | 37 | public void setContent(String content) { 38 | this.content = content; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/table/Id.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.db.table; 17 | 18 | public class Id extends Property{ 19 | 20 | } 21 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/pojo/Database.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.pojo; 2 | 3 | import net.tsz.afinal.annotation.sqlite.Id; 4 | 5 | public class Database { 6 | @Id 7 | private String name; 8 | 9 | private String content; 10 | 11 | public Database(){ 12 | 13 | } 14 | 15 | public Database(Database db){ 16 | this.name = db.name; 17 | this.content = db.content; 18 | } 19 | 20 | public Database(String name , String content){ 21 | this.name = name; 22 | this.content = content; 23 | } 24 | 25 | public String getName() { 26 | return name; 27 | } 28 | 29 | public void setName(String name) { 30 | this.name = name; 31 | } 32 | 33 | public String getContent() { 34 | return content; 35 | } 36 | 37 | public void setContent(String content) { 38 | this.content = content; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/worker/Worker.java: -------------------------------------------------------------------------------- 1 | package com.piglet.worker; 2 | 3 | import java.util.concurrent.LinkedBlockingQueue; 4 | import java.util.concurrent.ThreadPoolExecutor; 5 | import java.util.concurrent.TimeUnit; 6 | 7 | 8 | 9 | public class Worker { 10 | private ThreadPoolExecutor taskExecutor; 11 | private static Worker executor = new Worker(); 12 | 13 | private Worker() { 14 | this.taskExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, new LinkedBlockingQueue()); 15 | } 16 | 17 | public static Worker getInstance() { 18 | return executor; 19 | } 20 | 21 | public void addTask(Runnable task) { 22 | if (!this.taskExecutor.isShutdown()) { 23 | this.taskExecutor.execute(task); 24 | } 25 | } 26 | 27 | public void shutdown() { 28 | this.taskExecutor.shutdown(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/utils/MysqlUtils.java: -------------------------------------------------------------------------------- 1 | package com.piglet.utils; 2 | 3 | import android.text.TextUtils; 4 | 5 | public class MysqlUtils { 6 | public static boolean checkHost(String host) { 7 | if (TextUtils.isEmpty(host) || !host.matches("[a-zA-z\\d.-]+")) { 8 | return false; 9 | } 10 | return true; 11 | } 12 | 13 | public static boolean checkDbName(String dbname) { 14 | if (TextUtils.isEmpty(dbname) || !dbname.matches("[a-zA-z\\d_]+")) { 15 | return false; 16 | } 17 | return true; 18 | } 19 | 20 | public static boolean checkUserName(String username) { 21 | if (TextUtils.isEmpty(username)) { 22 | return false; 23 | } 24 | return true; 25 | } 26 | 27 | public static boolean checkPassword(String password) { 28 | if (TextUtils.isEmpty(password)) { 29 | return false; 30 | } 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /project/src/main/java/com/ben/data/DatabaseHelper.java: -------------------------------------------------------------------------------- 1 | package com.ben.data; 2 | 3 | import net.tsz.afinal.FinalDb; 4 | import android.content.Context; 5 | 6 | /** 7 | * 绑定到主线程了 8 | * @author Enbandari 9 | * 10 | */ 11 | public class DatabaseHelper{ 12 | private static DatabaseHelper instance; 13 | private Context context; 14 | private FinalDb db; 15 | private ThreadLocal dbHolder; 16 | 17 | private DatabaseHelper() { 18 | 19 | } 20 | 21 | public void init(Context context){ 22 | this.context = context; 23 | dbHolder = new ThreadLocal(); 24 | db = FinalDb.create(context); 25 | dbHolder.set(db); 26 | } 27 | 28 | public static DatabaseHelper getInstance(){ 29 | if(instance == null){ 30 | instance = new DatabaseHelper(); 31 | } 32 | return instance; 33 | } 34 | 35 | public FinalDb getDb(){ 36 | return db; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/exception/HttpException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.exception; 17 | 18 | public class HttpException extends AfinalException { 19 | private static final long serialVersionUID = 1L; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/http/entityhandler/EntityCallBack.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.http.entityhandler; 17 | 18 | public interface EntityCallBack { 19 | public void callBack(long count,long current,boolean mustNoticeUI); 20 | } 21 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/utils/Constant.java: -------------------------------------------------------------------------------- 1 | package com.piglet.utils; 2 | 3 | public class Constant { 4 | public class key { 5 | public static final String CONNECTION_INFO_NAME = "connection_info_name"; 6 | public static final String CONNECTION_INFO = "connection_info"; 7 | 8 | public static final String DATABASE = "Database"; 9 | public static final String TABLE = "table"; 10 | public static final String TABLE_IN_DB = "Tables_in_"; 11 | 12 | public static final String QUERY_TIME = "query_time"; 13 | public static final String QUERY_TYPE= "query_type"; 14 | public static final String QUERY_RESULT = "query_result"; 15 | } 16 | 17 | public class value{ 18 | public static final int WHAT_DATA_RETURNED = 0; 19 | public static final int WHAT_DATA_EMPTY = 1; 20 | public static final int WHAT_FAILED_TO_CONNECT = 2; 21 | public static final int WHAT_UPDATE_RETURNED= 3; 22 | public static final int WHAT_ERROR_OCCURRED = 4; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/widget/ResizeLayout.java: -------------------------------------------------------------------------------- 1 | package com.piglet.widget; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.RelativeLayout; 6 | 7 | public class ResizeLayout extends RelativeLayout{ 8 | private OnResizeListener mListener; 9 | 10 | public interface OnResizeListener { 11 | void OnResize(int w, int h, int oldw, int oldh); 12 | } 13 | 14 | public void setOnResizeListener(OnResizeListener l) { 15 | mListener = l; 16 | } 17 | 18 | public ResizeLayout(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | } 21 | 22 | @Override 23 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 24 | super.onSizeChanged(w, h, oldw, oldh); 25 | 26 | if (mListener != null) { 27 | mListener.OnResize(w, h, oldw, oldh); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /project/res/values/umeng_update_string.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Please make sure you are connected to internet,update failed 5 | New version found 6 | Latest version: 7 | Update Content 8 | Update size: 9 | Target size: 10 | (Warning: Not WIFI Condition) 11 | Update now 12 | App updating 13 | Not now 14 | Ingore this 15 | Updating.... 16 | The lastest version has been downloaded, install now ? 17 | 2.4.2.20140520 18 | 19 | 20 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/download/Downloader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.bitmap.download; 17 | 18 | 19 | public interface Downloader { 20 | 21 | /** 22 | * 请求网络的inputStream填充outputStream 23 | * @param urlString 24 | * @param outputStream 25 | * @return 26 | */ 27 | public byte[] download(String urlString); 28 | } 29 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/core/IMemoryCache.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.bitmap.core; 17 | 18 | import android.graphics.Bitmap; 19 | 20 | public interface IMemoryCache { 21 | 22 | public void put(String key,Bitmap bitmap); 23 | public Bitmap get(String key); 24 | public void evictAll(); 25 | public void remove(String key); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /project/res/values-zh/umeng_fb_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QQ, 电话等我们能联系您的联系方式 5 | 更新于 6 | 返回 7 | 用户反馈 8 | 填写联系信息 9 | 联系方式 10 | 我想说 11 | 发送 12 | 你好, 我是产品经理,欢迎您反馈使用产品的感受和建议 13 | 2013年3月12日 13:24:00 14 | 有新的回复 15 | 16 | 新回复: %s 17 | 收到来自开发者的 %d 条回复。 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/table/OneToMany.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.db.table; 17 | 18 | public class OneToMany extends Property{ 19 | 20 | private Class oneClass; 21 | 22 | public Class getOneClass() { 23 | return oneClass; 24 | } 25 | 26 | public void setOneClass(Class oneClass) { 27 | this.oneClass = oneClass; 28 | } 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/table/ManyToOne.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.db.table; 17 | 18 | public class ManyToOne extends Property{ 19 | 20 | private Class manyClass; 21 | 22 | public Class getManyClass() { 23 | return manyClass; 24 | } 25 | 26 | public void setManyClass(Class manyClass) { 27 | this.manyClass = manyClass; 28 | } 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /project/res/values-zh/umeng_common_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 正在下载中. 4 | 下载出错啦,请检查网络后继续。 5 | 暂停 6 | 继续 7 | 取消 8 | 正在下载: 9 | 暂停: 10 | 正在下载应用 11 | 正在更新安装包 12 | 请连接网络后再尝试! 13 | 下载失败 14 | 下载完成,请点击安装 15 | 更新完成,请点击安装 16 | 新版本已经准备好,请点击安装 17 | 18 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/Transient.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | 24 | @Target(ElementType.FIELD) 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Transient { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/Table.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.TYPE) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface Table { 26 | public String name(); 27 | } -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/ManyToOne.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.FIELD) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface ManyToOne { 26 | public String column() default ""; 27 | } 28 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/OneToMany.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.FIELD) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface OneToMany { 26 | 27 | public String manyColumn(); 28 | } 29 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/sqlite/SqlInfo.java: -------------------------------------------------------------------------------- 1 | package net.tsz.afinal.db.sqlite; 2 | 3 | import java.util.LinkedList; 4 | 5 | public class SqlInfo { 6 | 7 | private String sql; 8 | private LinkedList bindArgs; 9 | 10 | public String getSql() { 11 | return sql; 12 | } 13 | public void setSql(String sql) { 14 | this.sql = sql; 15 | } 16 | 17 | public LinkedList getBindArgs() { 18 | return bindArgs; 19 | } 20 | public void setBindArgs(LinkedList bindArgs) { 21 | this.bindArgs = bindArgs; 22 | } 23 | 24 | public Object[] getBindArgsAsArray() { 25 | if(bindArgs!=null) 26 | return bindArgs.toArray(); 27 | return null; 28 | } 29 | 30 | public String[] getBindArgsAsStringArray() { 31 | if(bindArgs!=null){ 32 | String[] strings = new String[bindArgs.size()]; 33 | for(int i = 0;i(); 44 | 45 | bindArgs.add(obj); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/exception/ViewException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.exception; 17 | 18 | 19 | public class ViewException extends AfinalException { 20 | private static final long serialVersionUID = 1L; 21 | private String strMsg = null; 22 | public ViewException(String strExce) { 23 | strMsg = strExce; 24 | } 25 | 26 | public void printStackTrace() { 27 | if(strMsg!=null) 28 | System.err.println(strMsg); 29 | 30 | super.printStackTrace(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/view/Select.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.view; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.FIELD) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface Select { 26 | 27 | public String selected(); 28 | public String noSelected() default ""; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/Property.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.FIELD) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface Property { 26 | public String column() default ""; 27 | public String defaultValue() default ""; 28 | } 29 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/exception/DbException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.exception; 17 | 18 | public class DbException extends AfinalException { 19 | private static final long serialVersionUID = 1L; 20 | 21 | public DbException() {} 22 | 23 | 24 | public DbException(String msg) { 25 | super(msg); 26 | } 27 | 28 | public DbException(Throwable ex) { 29 | super(ex); 30 | } 31 | 32 | public DbException(String msg,Throwable ex) { 33 | super(msg,ex); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /project/res/layout/popup_title.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/exception/AfinalException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.exception; 17 | 18 | public class AfinalException extends RuntimeException { 19 | private static final long serialVersionUID = 1L; 20 | 21 | public AfinalException() { 22 | super(); 23 | } 24 | 25 | public AfinalException(String msg) { 26 | super(msg); 27 | } 28 | 29 | public AfinalException(Throwable ex) { 30 | super(ex); 31 | } 32 | 33 | public AfinalException(String msg,Throwable ex) { 34 | super(msg,ex); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/sqlite/OneToManyLazyLoader.java: -------------------------------------------------------------------------------- 1 | package net.tsz.afinal.db.sqlite; 2 | 3 | import net.tsz.afinal.FinalDb; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * 10 | * 一对多延迟加载类 11 | * Created by pwy on 13-7-25. 12 | * @param 宿主实体的class 13 | * @param 多放实体class 14 | */ 15 | public class OneToManyLazyLoader { 16 | O ownerEntity; 17 | Class ownerClazz; 18 | Class listItemClazz; 19 | FinalDb db; 20 | public OneToManyLazyLoader(O ownerEntity,Class ownerClazz,Class listItemclazz,FinalDb db){ 21 | this.ownerEntity = ownerEntity; 22 | this.ownerClazz = ownerClazz; 23 | this.listItemClazz = listItemclazz; 24 | this.db = db; 25 | } 26 | List entities; 27 | 28 | /** 29 | * 如果数据未加载,则调用loadOneToMany填充数据 30 | * @return 31 | */ 32 | public List getList(){ 33 | if(entities==null){ 34 | this.db.loadOneToMany((O)this.ownerEntity,this.ownerClazz,this.listItemClazz); 35 | } 36 | if(entities==null){ 37 | entities =new ArrayList(); 38 | } 39 | return entities; 40 | } 41 | public void setList(List value){ 42 | entities = value; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/sqlite/Id.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.sqlite; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | /** 23 | * @title Id主键配置 24 | * @description 不配置的时候默认找类的id或_id字段作为主键,column不配置的是默认为字段名 25 | * @author michael Young (www.YangFuhai.com) 26 | * @version 1.0 27 | * @created 2012-10-31 28 | */ 29 | @Target(ElementType.FIELD) 30 | @Retention(RetentionPolicy.RUNTIME) 31 | public @interface Id { 32 | public String column() default ""; 33 | } 34 | -------------------------------------------------------------------------------- /project/res/values/umeng_fb_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Email, msn, gtalk, or whatever we can find you. 5 | Updated at 6 | Back 7 | Feedback 8 | Contact 9 | Contact Info 10 | I want to tell 11 | Send 12 | Your precious feedback are appriciated. 13 | 2013-3-12 13:24:00 14 | 15 | #1495F7 16 | #333333 17 | 18 | Powered by 19 | Got new reply 20 | New reply: %s 21 | You received %d new replies from the app developer. 22 | 23 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/display/Displayer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.bitmap.display; 17 | 18 | import net.tsz.afinal.bitmap.core.BitmapDisplayConfig; 19 | import android.graphics.Bitmap; 20 | import android.view.View; 21 | 22 | public interface Displayer { 23 | 24 | /** 25 | * 图片加载完成 回调的函数 26 | * @param imageView 27 | * @param bitmap 28 | * @param config 29 | */ 30 | public void loadCompletedisplay(View imageView,Bitmap bitmap,BitmapDisplayConfig config); 31 | 32 | /** 33 | * 图片加载失败回调的函数 34 | * @param imageView 35 | * @param bitmap 36 | */ 37 | public void loadFailDisplay(View imageView,Bitmap bitmap); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /project/res/values/umeng_common_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | The app is already in downloading list. 4 | dowload interrupted. 5 | Pause 6 | Continue 7 | Cancel 8 | Downloading: 9 | Pause: 10 | Download start. 11 | Patch start. 12 | Please make sure you are connected to internet, download failed 13 | Download Failed! 14 | Download finished,click to install it. 15 | Patch finished,click to install it. 16 | New version is ready,click to install it. 17 | icon 18 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/annotation/view/ViewInject.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.annotation.view; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | @Target(ElementType.FIELD) 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface ViewInject { 26 | public int id(); 27 | public String click() default ""; 28 | public String longClick() default ""; 29 | public String itemClick() default ""; 30 | public String itemLongClick() default ""; 31 | public Select select() default @Select(selected="") ; 32 | } 33 | -------------------------------------------------------------------------------- /project/res/anim/pageturning_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/table/KeyValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.db.table; 17 | 18 | import net.tsz.afinal.utils.FieldUtils; 19 | 20 | public class KeyValue { 21 | private String key; 22 | private Object value; 23 | 24 | public KeyValue(String key, Object value) { 25 | this.key = key; 26 | this.value = value; 27 | } 28 | 29 | 30 | public KeyValue() {} 31 | 32 | 33 | public String getKey() { 34 | return key; 35 | } 36 | public void setKey(String key) { 37 | this.key = key; 38 | } 39 | public Object getValue() { 40 | if(value instanceof java.util.Date || value instanceof java.sql.Date){ 41 | return FieldUtils.SDF.format(value); 42 | } 43 | return value; 44 | } 45 | public void setValue(Object value) { 46 | this.value = value; 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/sqlite/ManyToOneLazyLoader.java: -------------------------------------------------------------------------------- 1 | package net.tsz.afinal.db.sqlite; 2 | 3 | import net.tsz.afinal.FinalDb; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | /** 9 | * 10 | * 一对多延迟加载类 11 | * Created by pwy on 13-7-25. 12 | * @param 宿主实体的class 13 | * @param 多放实体class 14 | */ 15 | public class ManyToOneLazyLoader { 16 | M manyEntity; 17 | Class manyClazz; 18 | Class oneClazz; 19 | FinalDb db; 20 | /** 21 | * 用于 22 | */ 23 | private Object fieldValue; 24 | public ManyToOneLazyLoader(M manyEntity, Class manyClazz, Class oneClazz, FinalDb db){ 25 | this.manyEntity = manyEntity; 26 | this.manyClazz = manyClazz; 27 | this.oneClazz = oneClazz; 28 | this.db = db; 29 | } 30 | O oneEntity; 31 | boolean hasLoaded = false; 32 | 33 | /** 34 | * 如果数据未加载,则调用loadManyToOne填充数据 35 | * @return 36 | */ 37 | public O get(){ 38 | if(oneEntity==null && !hasLoaded){ 39 | this.db.loadManyToOne(null,this.manyEntity,this.manyClazz,this.oneClazz); 40 | hasLoaded = true; 41 | } 42 | return oneEntity; 43 | } 44 | public void set(O value){ 45 | oneEntity = value; 46 | } 47 | 48 | public Object getFieldValue() { 49 | return fieldValue; 50 | } 51 | 52 | public void setFieldValue(Object fieldValue) { 53 | this.fieldValue = fieldValue; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /project/res/layout/umeng_fb_list_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 21 | 22 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /project/res/layout/db_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 20 | 21 | 30 | 31 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /project/res/layout/tb_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 20 | 21 | 30 | 31 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /project/res/layout/prop_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 20 | 21 | 30 | 31 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /project/res/layout/activity_about.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 23 | 24 | 25 | 32 | 33 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /project/res/layout/conn_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 20 | 21 | 30 | 31 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/utils/UnitConverter.java: -------------------------------------------------------------------------------- 1 | package com.piglet.utils; 2 | 3 | import android.content.Context; 4 | 5 | public class UnitConverter { 6 | /** 7 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素) 8 | */ 9 | public static int dip2px(Context context, float dpValue) { 10 | final float scale = context.getResources().getDisplayMetrics().density; 11 | return (int) (dpValue * scale + 0.5f); 12 | } 13 | 14 | /** 15 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp 16 | */ 17 | public static int px2dip(Context context, float pxValue) { 18 | final float scale = context.getResources().getDisplayMetrics().density; 19 | return (int) (pxValue / scale + 0.5f); 20 | } 21 | 22 | /** 23 | * 将px值转换为sp值,保证文字大小不变 24 | * 25 | * @param pxValue 26 | * @param fontScale 27 | * (DisplayMetrics类中属性scaledDensity) 28 | * @return 29 | */ 30 | public static int px2sp(Context context, float pxValue) { 31 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 32 | return (int) (pxValue / fontScale + 0.5f); 33 | } 34 | 35 | /** 36 | * 将sp值转换为px值,保证文字大小不变 37 | * 38 | * @param spValue 39 | * @param fontScale 40 | * (DisplayMetrics类中属性scaledDensity) 41 | * @return 42 | */ 43 | public static int sp2px(Context context, float spValue) { 44 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 45 | return (int) (spValue * fontScale + 0.5f); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/widget/SpaceTokenizer.java: -------------------------------------------------------------------------------- 1 | package com.piglet.widget; 2 | 3 | import android.text.SpannableString; 4 | import android.text.Spanned; 5 | import android.text.TextUtils; 6 | import android.widget.MultiAutoCompleteTextView.Tokenizer; 7 | 8 | public class SpaceTokenizer implements Tokenizer{ 9 | public int findTokenStart(CharSequence text, int cursor) { 10 | int i = cursor; 11 | 12 | while (i > 0 && text.charAt(i - 1) != ' ') { 13 | i--; 14 | } 15 | while (i < cursor && text.charAt(i) == ' ') { 16 | i++; 17 | } 18 | 19 | return i; 20 | } 21 | 22 | public int findTokenEnd(CharSequence text, int cursor) { 23 | int i = cursor; 24 | int len = text.length(); 25 | 26 | while (i < len) { 27 | if (text.charAt(i) == ' ') { 28 | return i; 29 | } else { 30 | i++; 31 | } 32 | } 33 | 34 | return len; 35 | } 36 | 37 | public CharSequence terminateToken(CharSequence text) { 38 | int i = text.length(); 39 | 40 | while (i > 0 && text.charAt(i - 1) == ' ') { 41 | i--; 42 | } 43 | 44 | if (i > 0 && text.charAt(i - 1) == ' ') { 45 | return text; 46 | } else { 47 | if (text instanceof Spanned) { 48 | SpannableString sp = new SpannableString(text + " "); 49 | TextUtils.copySpansFrom((Spanned) text, 0, text.length(), 50 | Object.class, sp, 0); 51 | return sp; 52 | } else { 53 | return text + " "; 54 | } 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/core/MysqlHelper.java: -------------------------------------------------------------------------------- 1 | package com.piglet.core; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.LinkedHashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | import com.piglet.R; 10 | 11 | import android.content.Context; 12 | 13 | public class MysqlHelper { 14 | // private static List> helpList; 15 | private static Context context; 16 | 17 | public static void init(Context context) { 18 | MysqlHelper.context = context; 19 | } 20 | 21 | public static List> getHelpList() { 22 | String[] keys = { "OP", "USAGE" }; 23 | String[] ops = context.getResources().getStringArray(R.array.ops); 24 | String[] usages = context.getResources().getStringArray(R.array.usages); 25 | List> helpList = new ArrayList>(); 26 | for (int i = 0; i < ops.length; i++) { 27 | HashMap map = new HashMap(); 28 | map.put(keys[0], ops[i]); 29 | map.put(keys[1], usages[i]); 30 | helpList.add(map); 31 | } 32 | return helpList; 33 | } 34 | 35 | public static List> getAbout() { 36 | String[] keys = { "Title", "Content" }; 37 | String[] ops = context.getResources().getStringArray(R.array.about_title); 38 | String[] usages = context.getResources().getStringArray(R.array.about_content); 39 | List> helpList = new ArrayList>(); 40 | for (int i = 0; i < ops.length; i++) { 41 | LinkedHashMap map = new LinkedHashMap(); 42 | map.put(keys[0], ops[i]); 43 | map.put(keys[1], usages[i]); 44 | helpList.add(map); 45 | } 46 | return helpList; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/core/BaseMemoryCacheImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.bitmap.core; 17 | 18 | import net.tsz.afinal.utils.Utils; 19 | import android.graphics.Bitmap; 20 | 21 | public class BaseMemoryCacheImpl implements IMemoryCache { 22 | 23 | private final LruMemoryCache mMemoryCache; 24 | 25 | public BaseMemoryCacheImpl(int size) { 26 | mMemoryCache = new LruMemoryCache(size) { 27 | @Override 28 | protected int sizeOf(String key, Bitmap bitmap) { 29 | return Utils.getBitmapSize(bitmap); 30 | } 31 | }; 32 | } 33 | 34 | @Override 35 | public void put(String key, Bitmap bitmap) { 36 | mMemoryCache.put(key, bitmap); 37 | } 38 | 39 | @Override 40 | public Bitmap get(String key) { 41 | return mMemoryCache.get(key); 42 | } 43 | 44 | @Override 45 | public void evictAll() { 46 | mMemoryCache.evictAll(); 47 | } 48 | 49 | @Override 50 | public void remove(String key) { 51 | mMemoryCache.remove(key); 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /project/res/drawable/umeng_update_button_check_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | 13 | 16 | 17 | 20 | 23 | 24 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/core/SoftMemoryCacheImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.bitmap.core; 17 | 18 | import java.lang.ref.SoftReference; 19 | import java.util.HashMap; 20 | 21 | import android.graphics.Bitmap; 22 | 23 | public class SoftMemoryCacheImpl implements IMemoryCache { 24 | 25 | private final HashMap> mMemoryCache; 26 | 27 | public SoftMemoryCacheImpl(int size) { 28 | 29 | mMemoryCache = new HashMap>(); 30 | } 31 | 32 | @Override 33 | public void put(String key, Bitmap bitmap) { 34 | mMemoryCache.put(key, new SoftReference(bitmap)); 35 | } 36 | 37 | @Override 38 | public Bitmap get(String key) { 39 | SoftReference memBitmap = mMemoryCache.get(key); 40 | if(memBitmap!=null){ 41 | return memBitmap.get(); 42 | } 43 | return null; 44 | } 45 | 46 | @Override 47 | public void evictAll() { 48 | mMemoryCache.clear(); 49 | } 50 | 51 | @Override 52 | public void remove(String key) { 53 | mMemoryCache.remove(key); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/db/sqlite/DbModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.db.sqlite; 17 | 18 | import java.util.HashMap; 19 | 20 | public class DbModel { 21 | 22 | private HashMap dataMap = new HashMap(); 23 | 24 | public Object get(String column){ 25 | return dataMap.get(column); 26 | } 27 | 28 | public String getString(String column){ 29 | return String.valueOf(get(column)); 30 | } 31 | 32 | public int getInt(String column){ 33 | return Integer.valueOf(getString(column)); 34 | } 35 | 36 | public boolean getBoolean(String column){ 37 | return Boolean.valueOf(getString(column)); 38 | } 39 | 40 | public double getDouble(String column){ 41 | return Double.valueOf(getString(column)); 42 | } 43 | 44 | public float getFloat(String column){ 45 | return Float.valueOf(getString(column)); 46 | } 47 | 48 | public long getLong(String column){ 49 | return Long.valueOf(getString(column)); 50 | } 51 | 52 | public void set(String key,Object value){ 53 | dataMap.put(key, value); 54 | } 55 | 56 | public HashMap getDataMap(){ 57 | return dataMap; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /project/res/layout/activity_db.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | 16 | 21 | 22 | 29 | 30 | 31 | 37 | 38 | 39 | 46 | 47 | -------------------------------------------------------------------------------- /project/res/layout/activity_tb.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | 16 | 21 | 22 | 29 | 30 | 31 | 37 | 38 | 39 | 46 | 47 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/http/entityhandler/StringEntityHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.http.entityhandler; 17 | 18 | import java.io.ByteArrayOutputStream; 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | 22 | 23 | import org.apache.http.HttpEntity; 24 | 25 | public class StringEntityHandler { 26 | 27 | public Object handleEntity(HttpEntity entity, EntityCallBack callback,String charset)throws IOException { 28 | if (entity == null) 29 | return null; 30 | 31 | ByteArrayOutputStream outStream = new ByteArrayOutputStream(); 32 | byte[] buffer = new byte[1024]; 33 | 34 | long count = entity.getContentLength(); 35 | long curCount = 0; 36 | int len = -1; 37 | InputStream is = entity.getContent(); 38 | while ((len = is.read(buffer)) != -1) { 39 | outStream.write(buffer, 0, len); 40 | curCount += len; 41 | if(callback!=null) 42 | callback.callBack(count, curCount,false); 43 | } 44 | if(callback!=null) 45 | callback.callBack(count, curCount,true); 46 | byte[] data = outStream.toByteArray(); 47 | outStream.close(); 48 | is.close(); 49 | return new String(data,charset); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /project/res/layout/activity_prop.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | 16 | 21 | 22 | 29 | 30 | 31 | 37 | 38 | 39 | 46 | 47 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/core/FileNameGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.core; 17 | 18 | import java.security.MessageDigest; 19 | import java.security.NoSuchAlgorithmException; 20 | 21 | public class FileNameGenerator { 22 | 23 | 24 | public static String generator(String key) { 25 | String cacheKey; 26 | try { 27 | final MessageDigest mDigest = MessageDigest.getInstance("MD5"); 28 | mDigest.update(key.getBytes()); 29 | cacheKey = bytesToHexString(mDigest.digest()); 30 | } catch (NoSuchAlgorithmException e) { 31 | cacheKey = String.valueOf(key.hashCode()); 32 | } 33 | return cacheKey; 34 | } 35 | 36 | private static String bytesToHexString(byte[] bytes) { 37 | // http://stackoverflow.com/questions/332079 38 | StringBuilder sb = new StringBuilder(); 39 | for (int i = 0; i < bytes.length; i++) { 40 | String hex = Integer.toHexString(0xFF & bytes[i]); 41 | if (hex.length() == 1) { 42 | sb.append('0'); 43 | } 44 | sb.append(hex); 45 | } 46 | return sb.toString(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/http/AjaxCallBack.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012-2013, Michael Yang 杨福海 (www.yangfuhai.com). 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 net.tsz.afinal.http; 17 | /** 18 | * 19 | * @author michael 20 | * 21 | * @param 目前泛型支持 String,File, 以后扩展:JSONObject,Bitmap,byte[],XmlDom 22 | */ 23 | public abstract class AjaxCallBack { 24 | 25 | private boolean progress = true; 26 | private int rate = 1000 * 1;//每秒 27 | 28 | // private Class type; 29 | // 30 | // public AjaxCallBack(Class clazz) { 31 | // this.type = clazz; 32 | // } 33 | 34 | 35 | public boolean isProgress() { 36 | return progress; 37 | } 38 | 39 | public int getRate() { 40 | return rate; 41 | } 42 | 43 | /** 44 | * 设置进度,而且只有设置了这个了以后,onLoading才能有效。 45 | * @param progress 是否启用进度显示 46 | * @param rate 进度更新频率 47 | */ 48 | public AjaxCallBack progress(boolean progress , int rate) { 49 | this.progress = progress; 50 | this.rate = rate; 51 | return this; 52 | } 53 | 54 | public void onStart(){}; 55 | /** 56 | * onLoading方法有效progress 57 | * @param count 58 | * @param current 59 | */ 60 | public void onLoading(long count,long current){}; 61 | public void onSuccess(T t){}; 62 | public void onFailure(Throwable t,int errorNo ,String strMsg){}; 63 | } 64 | -------------------------------------------------------------------------------- /project/src/main/java/com/report1413634005175: -------------------------------------------------------------------------------- 1 | Path Type Lines WhiteSpace Notes Refs 2 | ******************************************************************** 3 | ben\data\GenericDao.java JAVA 12 10 1 0 4 | piglet\dao\impl\ConnectionInfoDao.java JAVA 5 3 0 0 5 | piglet\dao\pojo\Row.java JAVA 3 2 0 0 6 | piglet\utils\Constant.java JAVA 20 4 0 0 7 | piglet\utils\MysqlUtils.java JAVA 28 5 0 0 8 | piglet\ui\EditConnectionActivity.java JAVA 91 21 0 9 9 | piglet\widget\ResizeLayout.java JAVA 23 7 0 0 10 | piglet\ui\MainActivity.java JAVA 202 34 5 9 11 | piglet\dao\pojo\Table.java JAVA 29 12 0 0 12 | piglet\dao\pojo\Cell.java JAVA 3 2 0 0 13 | piglet\adapter\DbAdapter.java JAVA 78 19 0 0 14 | MysqlCliApplication.java JAVA 10 4 0 0 15 | piglet\worker\Worker.java JAVA 22 8 0 0 16 | ben\data\DatabaseUtils.java JAVA 7 2 0 0 17 | ben\data\DbDao.java JAVA 70 15 0 0 18 | piglet\adapter\ConnInfoAdapter.java JAVA 78 19 0 0 19 | ben\data\DatabaseHelper.java JAVA 26 7 0 5 20 | piglet\adapter\TbAdapter.java JAVA 78 19 0 0 21 | piglet\adapter\PropAdapter.java JAVA 78 19 0 0 22 | piglet\ui\AboutActivity.java JAVA 97 21 1 9 23 | piglet\dao\pojo\TableProperty.java JAVA 78 10 0 0 24 | piglet\ui\DataActivity.java JAVA 197 36 1 9 25 | piglet\ui\PropActivity.java JAVA 81 17 1 9 26 | piglet\ui\CmdActivity.java JAVA 381 60 14 9 27 | piglet\dao\pojo\Database.java JAVA 29 12 0 0 28 | piglet\ui\DbActivity.java JAVA 91 20 1 9 29 | piglet\dao\pojo\ConnectionInfo.java JAVA 95 25 0 3 30 | piglet\ui\AddConnectionActivity.java JAVA 102 19 0 9 31 | piglet\utils\UnitConverter.java JAVA 20 5 0 22 32 | piglet\App.java JAVA 166 21 12 4 33 | piglet\core\MysqlHelper.java JAVA 40 7 1 0 34 | piglet\ui\TbActivity.java JAVA 117 21 1 9 35 | piglet\widget\QuickWindow.java JAVA 176 60 8 68 36 | piglet\core\MysqlConnection.java JAVA 179 28 0 6 37 | piglet\widget\SpaceTokenizer.java JAVA 47 10 0 0 38 | piglet\widget\QuickAction.java JAVA 179 43 32 41 39 | piglet\widget\TwoDScrollView.java JAVA 702 95 155 209 40 | ******************************************************************** 41 | Total JAVA 3640 722 233 439 42 | -------------------------------------------------------------------------------- /project/src/main/java/net/tsz/afinal/bitmap/core/BytesBufferPool.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 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 net.tsz.afinal.bitmap.core; 17 | 18 | import java.util.ArrayList; 19 | 20 | public class BytesBufferPool { 21 | 22 | 23 | public static class BytesBuffer { 24 | public byte[] data; 25 | public int offset; 26 | public int length; 27 | 28 | private BytesBuffer(int capacity) { 29 | this.data = new byte[capacity]; 30 | } 31 | } 32 | 33 | private final int mPoolSize; 34 | private final int mBufferSize; 35 | private final ArrayList mList; 36 | 37 | public BytesBufferPool(int poolSize, int bufferSize) { 38 | mList = new ArrayList(poolSize); 39 | mPoolSize = poolSize; 40 | mBufferSize = bufferSize; 41 | } 42 | 43 | public synchronized BytesBuffer get() { 44 | int n = mList.size(); 45 | return n > 0 ? mList.remove(n - 1) : new BytesBuffer(mBufferSize); 46 | } 47 | 48 | public synchronized void recycle(BytesBuffer buffer) { 49 | if (buffer.data.length != mBufferSize) return; 50 | if (mList.size() < mPoolSize) { 51 | buffer.offset = 0; 52 | buffer.length = 0; 53 | mList.add(buffer); 54 | } 55 | } 56 | 57 | public synchronized void clear() { 58 | mList.clear(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /project/src/main/java/com/piglet/dao/pojo/TableProperty.java: -------------------------------------------------------------------------------- 1 | package com.piglet.dao.pojo; 2 | 3 | import android.text.TextUtils; 4 | 5 | public class TableProperty { 6 | private String field; 7 | private String type; 8 | private String _null; 9 | private String key; 10 | private String _default; 11 | private String extra; 12 | 13 | public TableProperty(){ 14 | 15 | } 16 | 17 | public TableProperty(TableProperty prop){ 18 | this.field = prop.field; 19 | this.type = prop.type; 20 | this._null = prop._null; 21 | this.key = prop.key; 22 | this._default = prop._default; 23 | this.extra = prop.extra; 24 | } 25 | 26 | public String getField() { 27 | return field; 28 | } 29 | public void setField(String field) { 30 | this.field = field; 31 | } 32 | public String getType() { 33 | return type; 34 | } 35 | public void setType(String type) { 36 | this.type = type; 37 | } 38 | public String get_null() { 39 | return _null; 40 | } 41 | public void set_null(String _null) { 42 | this._null = _null; 43 | } 44 | public String getKey() { 45 | return key; 46 | } 47 | public void setKey(String key) { 48 | this.key = key; 49 | } 50 | public String get_default() { 51 | return _default; 52 | } 53 | public void set_default(String _default) { 54 | this._default = _default; 55 | } 56 | public String getExtra() { 57 | return extra; 58 | } 59 | public void setExtra(String extra) { 60 | this.extra = extra; 61 | } 62 | 63 | public String getName(){ 64 | return field; 65 | } 66 | 67 | public String getContent(){ 68 | StringBuilder sb = new StringBuilder(); 69 | sb.append(type); 70 | if(!TextUtils.isEmpty(key)){ 71 | sb.append(", ").append(key); 72 | } 73 | if(_null.equals("YES")){ 74 | sb.append(", ").append("can be null"); 75 | }else{ 76 | sb.append(", ").append("not null"); 77 | } 78 | if(!TextUtils.isEmpty(_default)){ 79 | sb.append(", ").append("default for ").append(_default); 80 | } 81 | if(!TextUtils.isEmpty(extra)){ 82 | sb.append(", ").append(extra); 83 | } 84 | return sb.toString(); 85 | } 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /project/res/layout/popup_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 29 | 30 | 40 | 41 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /project/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 22 | 23 |