├── MyWeChat
├── app
│ ├── .gitignore
│ ├── libs
│ │ └── Volley.jar
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── add.png
│ │ │ │ │ ├── addp.png
│ │ │ │ │ ├── ball.png
│ │ │ │ │ ├── book.png
│ │ │ │ │ ├── erji.png
│ │ │ │ │ ├── home.png
│ │ │ │ │ ├── lamp.png
│ │ │ │ │ ├── mine.png
│ │ │ │ │ ├── net.png
│ │ │ │ │ ├── pic2.png
│ │ │ │ │ ├── shop.png
│ │ │ │ │ ├── type.png
│ │ │ │ │ ├── user.png
│ │ │ │ │ ├── bicycle.png
│ │ │ │ │ ├── circle.png
│ │ │ │ │ ├── homep.png
│ │ │ │ │ ├── login.png
│ │ │ │ │ ├── minep.png
│ │ │ │ │ ├── phone.png
│ │ │ │ │ ├── picture.png
│ │ │ │ │ ├── shopp.png
│ │ │ │ │ ├── typep.png
│ │ │ │ │ ├── userpic.png
│ │ │ │ │ ├── bicycle1.png
│ │ │ │ │ ├── computer.png
│ │ │ │ │ ├── ic_arrow.png
│ │ │ │ │ ├── register.png
│ │ │ │ │ ├── xiaoyuan.jpg
│ │ │ │ │ ├── loading_dialog_1.png
│ │ │ │ │ ├── loading_dialog_2.png
│ │ │ │ │ ├── loading_dialog_3.png
│ │ │ │ │ ├── loginshape.xml
│ │ │ │ │ ├── trade_bottom_text.xml
│ │ │ │ │ ├── trade_bottom_add.xml
│ │ │ │ │ ├── trade_bottom_cart.xml
│ │ │ │ │ ├── trade_bottom_home.xml
│ │ │ │ │ ├── trade_bottom_mine.xml
│ │ │ │ │ ├── trade_bottom_classify.xml
│ │ │ │ │ ├── shape.xml
│ │ │ │ │ ├── shape_radius.xml
│ │ │ │ │ ├── anim_loading.xml
│ │ │ │ │ ├── selector_tc_common.xml
│ │ │ │ │ ├── selector_radio_button.xml
│ │ │ │ │ ├── selector_br_radius.xml
│ │ │ │ │ ├── selector_bl_radius.xml
│ │ │ │ │ ├── selector_btn_common.xml
│ │ │ │ │ └── selector_b_radius.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── add1.png
│ │ │ │ │ ├── add2.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── home1.png
│ │ │ │ │ ├── home2.png
│ │ │ │ │ ├── mine1.png
│ │ │ │ │ ├── mine2.png
│ │ │ │ │ ├── shop1.png
│ │ │ │ │ ├── shop2.png
│ │ │ │ │ ├── type1.png
│ │ │ │ │ ├── type2.png
│ │ │ │ │ ├── ic_add_gray.png
│ │ │ │ │ ├── ic_add_red.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_mine_red.png
│ │ │ │ │ ├── ic_mine_gray.png
│ │ │ │ │ ├── ic_classify_gray.png
│ │ │ │ │ ├── ic_classify_red.png
│ │ │ │ │ ├── ic_home_page_red.png
│ │ │ │ │ ├── ic_home_page_gray.png
│ │ │ │ │ ├── ic_shopping_cart_gray.png
│ │ │ │ │ └── ic_shopping_cart_red.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── add1.png
│ │ │ │ │ ├── add2.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── home1.png
│ │ │ │ │ ├── home2.png
│ │ │ │ │ ├── mine1.png
│ │ │ │ │ ├── mine2.png
│ │ │ │ │ ├── shop1.png
│ │ │ │ │ ├── shop2.png
│ │ │ │ │ ├── type1.png
│ │ │ │ │ ├── type2.png
│ │ │ │ │ ├── ic_add_gray.png
│ │ │ │ │ ├── ic_add_red.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_mine_red.png
│ │ │ │ │ ├── ic_mine_gray.png
│ │ │ │ │ ├── ic_classify_gray.png
│ │ │ │ │ ├── ic_classify_red.png
│ │ │ │ │ ├── ic_home_page_red.png
│ │ │ │ │ ├── ic_home_page_gray.png
│ │ │ │ │ ├── ic_shopping_cart_gray.png
│ │ │ │ │ └── ic_shopping_cart_red.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── add1.png
│ │ │ │ │ ├── add2.png
│ │ │ │ │ ├── home1.png
│ │ │ │ │ ├── home2.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── mine1.png
│ │ │ │ │ ├── mine2.png
│ │ │ │ │ ├── shop1.png
│ │ │ │ │ ├── shop2.png
│ │ │ │ │ ├── type1.png
│ │ │ │ │ ├── type2.png
│ │ │ │ │ ├── ic_add_red.png
│ │ │ │ │ ├── ic_add_gray.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_mine_gray.png
│ │ │ │ │ ├── ic_mine_red.png
│ │ │ │ │ ├── ic_classify_red.png
│ │ │ │ │ ├── ic_classify_gray.png
│ │ │ │ │ ├── ic_home_page_gray.png
│ │ │ │ │ ├── ic_home_page_red.png
│ │ │ │ │ ├── ic_shopping_cart_red.png
│ │ │ │ │ └── ic_shopping_cart_gray.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── add1.png
│ │ │ │ │ ├── add2.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── home1.png
│ │ │ │ │ ├── home2.png
│ │ │ │ │ ├── mine1.png
│ │ │ │ │ ├── mine2.png
│ │ │ │ │ ├── shop1.png
│ │ │ │ │ ├── shop2.png
│ │ │ │ │ ├── type1.png
│ │ │ │ │ ├── type2.png
│ │ │ │ │ ├── ic_add_gray.png
│ │ │ │ │ ├── ic_add_red.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_mine_gray.png
│ │ │ │ │ ├── ic_mine_red.png
│ │ │ │ │ ├── ic_classify_gray.png
│ │ │ │ │ ├── ic_classify_red.png
│ │ │ │ │ ├── ic_home_page_gray.png
│ │ │ │ │ ├── ic_home_page_red.png
│ │ │ │ │ ├── ic_shopping_cart_gray.png
│ │ │ │ │ └── ic_shopping_cart_red.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── add1.png
│ │ │ │ │ ├── add2.png
│ │ │ │ │ ├── home1.png
│ │ │ │ │ ├── home2.png
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── mine1.png
│ │ │ │ │ ├── mine2.png
│ │ │ │ │ ├── shop1.png
│ │ │ │ │ ├── shop2.png
│ │ │ │ │ ├── type1.png
│ │ │ │ │ ├── type2.png
│ │ │ │ │ ├── ic_add_gray.png
│ │ │ │ │ ├── ic_add_red.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_mine_red.png
│ │ │ │ │ ├── ic_mine_gray.png
│ │ │ │ │ ├── ic_classify_gray.png
│ │ │ │ │ ├── ic_classify_red.png
│ │ │ │ │ ├── ic_home_page_red.png
│ │ │ │ │ ├── ic_home_page_gray.png
│ │ │ │ │ ├── ic_shopping_cart_gray.png
│ │ │ │ │ └── ic_shopping_cart_red.png
│ │ │ │ ├── values-en
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── values-w820dp
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── styles.xml
│ │ │ │ │ └── colors.xml
│ │ │ │ └── layout
│ │ │ │ │ ├── main_activity.xml
│ │ │ │ │ ├── shopping_cart_activity.xml
│ │ │ │ │ ├── mygoods.xml
│ │ │ │ │ ├── home_page_activity.xml
│ │ │ │ │ ├── goods_listview.xml
│ │ │ │ │ ├── dialog_loading.xml
│ │ │ │ │ ├── dialog_hint.xml
│ │ │ │ │ ├── personal_information_activity.xml
│ │ │ │ │ ├── dialog_decide.xml
│ │ │ │ │ ├── updateuser.xml
│ │ │ │ │ ├── goods_view.xml
│ │ │ │ │ ├── register_activity.xml
│ │ │ │ │ ├── mymain_activity.xml
│ │ │ │ │ ├── login_activity.xml
│ │ │ │ │ └── add_activity.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── tm
│ │ │ │ │ └── mywechat
│ │ │ │ │ ├── util
│ │ │ │ │ ├── Constant.java
│ │ │ │ │ ├── LoadingDialogUtil.java
│ │ │ │ │ └── LogUtil.java
│ │ │ │ │ ├── http
│ │ │ │ │ ├── interf
│ │ │ │ │ │ └── ResponseHandler.java
│ │ │ │ │ ├── Constant.java
│ │ │ │ │ ├── bean
│ │ │ │ │ │ ├── CommonRequest.java
│ │ │ │ │ │ └── CommonResponse.java
│ │ │ │ │ └── HttpPostTask.java
│ │ │ │ │ ├── main_page
│ │ │ │ │ ├── ShoppingCartFragment.java
│ │ │ │ │ ├── MyAsyncTask.java
│ │ │ │ │ ├── MyMainActivity.java
│ │ │ │ │ ├── MineFragment.java
│ │ │ │ │ ├── HomePageFragment.java
│ │ │ │ │ └── ClassifyFragment.java
│ │ │ │ │ ├── BitmaptostringUtils.java
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ ├── BaseActivity.java
│ │ │ │ │ ├── FragmentUtils.java
│ │ │ │ │ ├── Login.java
│ │ │ │ │ ├── MyGoods.java
│ │ │ │ │ ├── ListActivity.java
│ │ │ │ │ ├── Register.java
│ │ │ │ │ └── UpdateUser.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── tm
│ │ │ │ └── mywechat
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── tm
│ │ │ └── mywechat
│ │ │ └── ApplicationTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── .idea
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── modules.xml
│ ├── runConfigurations.xml
│ ├── compiler.xml
│ ├── gradle.xml
│ └── misc.xml
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── MyWorld_Service
├── .settings
│ ├── org.eclipse.wst.jsdt.ui.superType.name
│ ├── org.eclipse.wst.jsdt.ui.superType.container
│ ├── org.eclipse.jdt.core.prefs
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.wst.common.component
│ └── .jsdtscope
├── WebContent
│ ├── META-INF
│ │ └── MANIFEST.MF
│ └── WEB-INF
│ │ ├── lib
│ │ ├── ezmorph-1.0.6.jar
│ │ ├── bcprov-jdk15on-156.jar
│ │ ├── commons-lang-2.3.jar
│ │ ├── json-lib-2.4-jdk15.jar
│ │ ├── commons-logging-1.2.jar
│ │ ├── commons-beanutils-1.9.3.jar
│ │ ├── commons-collections-3.2.1.jar
│ │ └── mysql-connector-java-5.1.40-bin.jar
│ │ └── web.xml
├── src
│ ├── encrypt
│ │ ├── DES.java
│ │ ├── DecryptUtil.java
│ │ └── EncryptUtil.java
│ ├── constants
│ │ └── DBNames.java
│ ├── util
│ │ ├── DatabaseUtil.java
│ │ ├── LogUtil.java
│ │ └── ParseUtil.java
│ ├── filter
│ │ └── EncodeFilter.java
│ ├── servlet
│ │ ├── LoginServlet.java
│ │ ├── ProductServlet.java
│ │ └── RegisterServlet.java
│ └── beans
│ │ ├── CommonRequest.java
│ │ └── CommonResponse.java
├── build
│ └── classes
│ │ ├── encrypt
│ │ ├── DES.class
│ │ ├── DecryptUtil.class
│ │ └── EncryptUtil.class
│ │ ├── util
│ │ ├── LogUtil.class
│ │ ├── ParseUtil.class
│ │ └── DatabaseUtil.class
│ │ ├── constants
│ │ └── DBNames.class
│ │ ├── beans
│ │ ├── CommonRequest.class
│ │ └── CommonResponse.class
│ │ ├── filter
│ │ └── EncodeFilter.class
│ │ └── servlet
│ │ ├── LoginServlet.class
│ │ ├── ProductServlet.class
│ │ └── RegisterServlet.class
├── .project
└── .classpath
└── README.md
/MyWeChat/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/MyWeChat/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/MyWorld_Service/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/MyWeChat/app/libs/Volley.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/libs/Volley.jar
--------------------------------------------------------------------------------
/MyWorld_Service/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 二手交易
3 |
4 |
--------------------------------------------------------------------------------
/MyWorld_Service/src/encrypt/DES.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/encrypt/DES.java
--------------------------------------------------------------------------------
/MyWeChat/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/add.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/addp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/addp.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/ball.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/ball.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/book.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/erji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/erji.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/home.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/lamp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/lamp.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/mine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/mine.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/net.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/net.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/pic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/pic2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/shop.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/type.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/user.png
--------------------------------------------------------------------------------
/MyWeChat/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/MyWorld_Service/src/constants/DBNames.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/constants/DBNames.java
--------------------------------------------------------------------------------
/MyWorld_Service/src/util/DatabaseUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/util/DatabaseUtil.java
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/bicycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/bicycle.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/circle.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/homep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/homep.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/login.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/minep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/minep.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/phone.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/picture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/picture.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/shopp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/shopp.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/typep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/typep.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/userpic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/userpic.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/add1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/add2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/add1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/add2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/MyWorld_Service/src/encrypt/DecryptUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/encrypt/DecryptUtil.java
--------------------------------------------------------------------------------
/MyWorld_Service/src/encrypt/EncryptUtil.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/encrypt/EncryptUtil.java
--------------------------------------------------------------------------------
/MyWorld_Service/src/filter/EncodeFilter.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/filter/EncodeFilter.java
--------------------------------------------------------------------------------
/MyWorld_Service/src/servlet/LoginServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/servlet/LoginServlet.java
--------------------------------------------------------------------------------
/MyWeChat/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/bicycle1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/bicycle1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/computer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/computer.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/ic_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/ic_arrow.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/register.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/register.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/xiaoyuan.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/xiaoyuan.jpg
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/home1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/home2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/mine1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/mine1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/mine2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/mine2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/shop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/shop1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/shop2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/shop2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/type1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/type1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/type2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/type2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/home1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/home2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/mine1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/mine1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/mine2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/mine2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/shop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/shop1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/shop2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/shop2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/type1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/type1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/type2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/type2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/add1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/add2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/home1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/home2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/mine1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/mine1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/mine2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/mine2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/shop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/shop1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/shop2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/shop2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/type1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/type1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/type2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/type2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/add1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/add2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/encrypt/DES.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/encrypt/DES.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/util/LogUtil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/util/LogUtil.class
--------------------------------------------------------------------------------
/MyWorld_Service/src/servlet/ProductServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/servlet/ProductServlet.java
--------------------------------------------------------------------------------
/MyWorld_Service/src/servlet/RegisterServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/src/servlet/RegisterServlet.java
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/home1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/home2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/mine1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/mine1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/mine2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/mine2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/shop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/shop1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/shop2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/shop2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/type1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/type1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/type2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/type2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/add1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/add1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/add2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/add2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/home1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/home2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/mine1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/mine1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/mine2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/mine2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/shop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/shop1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/shop2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/shop2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/type1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/type1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/type2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/type2.png
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/util/ParseUtil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/util/ParseUtil.class
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_add_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_add_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_add_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_add_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_mine_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_mine_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_add_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_add_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_add_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_add_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_mine_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_mine_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_add_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_add_red.png
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/constants/DBNames.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/constants/DBNames.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/util/DatabaseUtil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/util/DatabaseUtil.class
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/loading_dialog_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/loading_dialog_1.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/loading_dialog_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/loading_dialog_2.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/loading_dialog_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/drawable/loading_dialog_3.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_mine_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_mine_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_mine_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_mine_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_add_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_add_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_mine_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_mine_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_mine_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_mine_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_add_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_add_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_add_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_add_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_mine_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_mine_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_mine_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_mine_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_add_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_add_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_add_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_add_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_mine_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_mine_red.png
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/ezmorph-1.0.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/ezmorph-1.0.6.jar
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/beans/CommonRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/beans/CommonRequest.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/beans/CommonResponse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/beans/CommonResponse.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/encrypt/DecryptUtil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/encrypt/DecryptUtil.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/encrypt/EncryptUtil.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/encrypt/EncryptUtil.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/filter/EncodeFilter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/filter/EncodeFilter.class
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/servlet/LoginServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/servlet/LoginServlet.class
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_classify_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_classify_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_classify_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_classify_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_home_page_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_home_page_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_classify_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_classify_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_classify_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_classify_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_home_page_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_home_page_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_classify_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_classify_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_mine_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_mine_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values-en/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MyWeChat
4 |
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/servlet/ProductServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/servlet/ProductServlet.class
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_home_page_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_home_page_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_home_page_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_home_page_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_classify_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_classify_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_home_page_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_home_page_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_home_page_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_home_page_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_classify_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_classify_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_classify_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_classify_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_home_page_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_home_page_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_home_page_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_home_page_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_classify_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_classify_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_classify_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_classify_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_home_page_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_home_page_red.png
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/bcprov-jdk15on-156.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/bcprov-jdk15on-156.jar
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/commons-lang-2.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/commons-lang-2.3.jar
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/json-lib-2.4-jdk15.jar
--------------------------------------------------------------------------------
/MyWorld_Service/build/classes/servlet/RegisterServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/build/classes/servlet/RegisterServlet.class
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_shopping_cart_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_shopping_cart_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-hdpi/ic_shopping_cart_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-hdpi/ic_shopping_cart_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_shopping_cart_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_shopping_cart_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-mdpi/ic_shopping_cart_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-mdpi/ic_shopping_cart_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_shopping_cart_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_shopping_cart_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_home_page_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_home_page_gray.png
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/commons-logging-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/commons-logging-1.2.jar
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_shopping_cart_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xhdpi/ic_shopping_cart_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_shopping_cart_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_shopping_cart_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_shopping_cart_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxhdpi/ic_shopping_cart_red.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_shopping_cart_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_shopping_cart_gray.png
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_shopping_cart_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWeChat/app/src/main/res/mipmap-xxxhdpi/ic_shopping_cart_red.png
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/commons-beanutils-1.9.3.jar
--------------------------------------------------------------------------------
/MyWorld_Service/src/util/LogUtil.java:
--------------------------------------------------------------------------------
1 | package util;
2 |
3 | public class LogUtil {
4 | public static void log(String message){
5 | System.out.println(message);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/commons-collections-3.2.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/commons-collections-3.2.1.jar
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/lib/mysql-connector-java-5.1.40-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tonyaha/Android/HEAD/MyWorld_Service/WebContent/WEB-INF/lib/mysql-connector-java-5.1.40-bin.jar
--------------------------------------------------------------------------------
/MyWeChat/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values-w820dp/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BaseLibrary
3 |
4 | 确定
5 | 取消
6 |
7 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/loginshape.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jun 12 13:08:13 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_add.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_cart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_mine.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/trade_bottom_classify.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 1、服务器端:eclipse + tomcat9(将工程部署到tomcat里面启动服务器) ,数据库MySql
2 | 2、android:Android Studio
3 | 注意:1、事先启动tomcat服务器,然后在浏览器中输入服务器地址看是否能访问
4 | 2、手机和服务器在一个局域网类(连同一个wifi,或者手机连服务器所在电脑的wifi),手机访问服务器,若是不能正常访问,在防火墙中设置允许对应服务器访问的端口信息,具体方法如下:
5 | win10
6 | 网络和internet设置--windows防火墙--高级设置--入站规则--新建规则--端口--TCP和所有本地端口--允许连接--下一步--直到取名字完成
7 |
--------------------------------------------------------------------------------
/MyWeChat/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/shape_radius.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
9 |
10 |
12 |
13 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/util/Constant.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.util;
2 |
3 | /**
4 | * Created by TM on 2017/6/7.
5 | */
6 |
7 | public class Constant {
8 | public static String URL = "http://192.168.137.1:8080/ServletTest/"; // IP地址请改为你自己的IP
9 |
10 | public static String URL_Register = URL + "RegisterServlet";
11 | public static String URL_Login = URL + "LoginServlet";
12 | }
13 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/MyWorld_Service/.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.7
4 | org.eclipse.jdt.core.compiler.compliance=1.7
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.7
8 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/test/java/com/tm/mywechat/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/MyWorld_Service/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/androidTest/java/com/tm/mywechat/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/anim_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/http/interf/ResponseHandler.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.http.interf;
2 |
3 |
4 | import com.tm.mywechat.http.bean.CommonResponse;
5 |
6 | public interface ResponseHandler {
7 |
8 | /**
9 | * 交易成功的处理
10 | * @param response 格式化报文
11 | */
12 | void success(CommonResponse response);
13 |
14 | /**
15 | * 报文通信正常,但交易内容失败的处理
16 | * @param failCode 返回的交易状态码
17 | * @param failMsg 返回的交易失败说明
18 | */
19 | void fail(String failCode, String failMsg);
20 | }
21 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/shopping_cart_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/MyWorld_Service/src/util/ParseUtil.java:
--------------------------------------------------------------------------------
1 | package util;
2 |
3 | import java.util.HashMap;
4 |
5 | public class ParseUtil {
6 | public static HashMap strToMap(String str) {
7 |
8 | str = str.substring(1, str.length() - 2);
9 | HashMap resultMap = new HashMap<>();
10 | String[] items = str.split(",");
11 | String[] itemStrs = new String[2];
12 | for (String item : items) {
13 | itemStrs = item.split(":");
14 | resultMap.put(itemStrs[0], itemStrs[1]);
15 | }
16 | return resultMap;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/MyWorld_Service/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/http/Constant.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.http;
2 |
3 | public class Constant {
4 |
5 | public static final int HANDLER_HTTP_SEND_FAIL = 1001;
6 | public static final int HANDLER_HTTP_RECEIVE_FAIL = 1002;
7 |
8 | /*
9 | * Activity跳转用RequestCode
10 | */
11 | public static int REQUEST_CODE_ = 0;
12 |
13 | /*
14 | * Activity跳转用ResponseCode
15 | */
16 | public static int RESPONSE_CODE_SUCCESS = 100;
17 | public static int RESPONSE_CODE_FAIL = 101;
18 | public static int RESPONSE_CODE_NO_RESULT = 102;
19 | }
20 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/mygoods.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
13 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_tc_common.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
5 |
6 |
7 | -
10 |
11 |
12 | -
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/MyWeChat/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.3.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
21 | task clean(type: Delete) {
22 | delete rootProject.buildDir
23 | }
24 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_radio_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/MyWorld_Service/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/MyWeChat/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/MyWorld_Service/src/beans/CommonRequest.java:
--------------------------------------------------------------------------------
1 | package beans;
2 |
3 | import java.util.HashMap;
4 |
5 | public class CommonRequest {
6 |
7 | private String requestCode;
8 | private HashMap requestParam;
9 |
10 | public String getRequestCode() {
11 | return requestCode;
12 | }
13 | public void setRequestCode(String requestCode) {
14 | this.requestCode = requestCode;
15 | }
16 | public HashMap getRequestParam() {
17 | return requestParam;
18 | }
19 | public void setRequestParam(HashMap requestParam) {
20 | this.requestParam = requestParam;
21 | }
22 |
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/MyWorld_Service/WebContent/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MyWorld_Service
4 |
5 | index.html
6 | index.htm
7 | index.jsp
8 | default.html
9 | default.htm
10 | default.jsp
11 |
12 |
--------------------------------------------------------------------------------
/MyWeChat/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/MyWeChat/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/main_page/ShoppingCartFragment.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.main_page;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.tm.mywechat.R;
11 |
12 | /**
13 | * Created by Administrator on 2017/1/10.
14 | */
15 | public class ShoppingCartFragment extends Fragment {
16 | @Nullable
17 | @Override
18 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
19 | View view = inflater.inflate(R.layout.shopping_cart_activity,container,false);
20 | return null;
21 | }
22 | }
--------------------------------------------------------------------------------
/MyWeChat/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values-w820dp/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/home_page_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
12 |
13 |
14 |
23 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/goods_listview.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
15 |
16 |
17 |
25 |
--------------------------------------------------------------------------------
/MyWeChat/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/MyWeChat/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.3"
6 | defaultConfig {
7 | applicationId "com.tm.mywechat"
8 | minSdkVersion 15
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:25.3.1'
28 | testCompile 'junit:junit:4.12'
29 | }
30 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/dialog_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/BitmaptostringUtils.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.drawable.BitmapDrawable;
6 | import android.util.Base64;
7 |
8 | import java.io.ByteArrayOutputStream;
9 |
10 | /**
11 | * Created by SJL on 2017/6/11.
12 | */
13 |
14 | public class BitmaptostringUtils {
15 |
16 | public static String bitmapToString(Context context, BitmapDrawable drawble) {
17 | // 保存
18 | // BitmapDrawable drawble = (BitmapDrawable) cv_head.getDrawable();
19 | Bitmap bitmap = drawble.getBitmap();
20 |
21 | // 第一步 将bitmap 转换成字节数组输出流
22 | ByteArrayOutputStream byStream = new ByteArrayOutputStream();
23 | bitmap.compress(Bitmap.CompressFormat.PNG, 80, byStream);
24 |
25 | // 利用base64将字节数组转换成字符串
26 | byte[] byteArray = byStream.toByteArray();
27 | String imgString = new String(Base64.encodeToString(byteArray, Base64.DEFAULT));
28 | return imgString;
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_br_radius.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
5 |
6 |
7 |
9 |
10 |
11 | -
13 |
14 |
15 |
17 |
18 |
19 | -
21 |
22 |
23 |
24 |
25 |
26 | -
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_bl_radius.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
5 |
6 |
7 |
9 |
10 |
11 | -
13 |
14 |
15 |
17 |
18 |
19 | -
21 |
22 |
23 |
25 |
26 |
27 | -
28 |
29 |
30 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/MyWorld_Service/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MyWorld_Service
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 |
30 | org.eclipse.jem.workbench.JavaEMFNature
31 | org.eclipse.wst.common.modulecore.ModuleCoreNature
32 | org.eclipse.wst.common.project.facet.core.nature
33 | org.eclipse.jdt.core.javanature
34 | org.eclipse.wst.jsdt.core.jsNature
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_btn_common.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 | -
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 | -
29 |
30 |
31 |
32 |
33 |
34 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/drawable/selector_b_radius.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
5 |
6 |
7 |
10 |
11 |
12 | -
14 |
15 |
16 |
17 |
18 |
19 | -
21 |
22 |
23 |
26 |
27 |
28 | -
29 |
30 |
31 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MyWorld_Service/src/beans/CommonResponse.java:
--------------------------------------------------------------------------------
1 | package beans;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 |
6 | public class CommonResponse {
7 |
8 | private String resCode;
9 | private String resMsg;
10 |
11 |
12 |
13 | private HashMap property;
14 |
15 | private ArrayList> list;
16 |
17 | public CommonResponse() {
18 | super();
19 |
20 | resCode = "";
21 | resMsg = "";
22 | property = new HashMap();
23 | list = new ArrayList>();
24 |
25 | }
26 |
27 | public void setResult(String resCode, String resMsg) {
28 | this.resCode = resCode;
29 | this.resMsg = resMsg;
30 | }
31 |
32 |
33 |
34 | public String getResCode() {
35 | return resCode;
36 | }
37 |
38 | public void setResCode(String resCode) {
39 | this.resCode = resCode;
40 | }
41 |
42 | public String getResMsg() {
43 | return resMsg;
44 | }
45 |
46 | public void setResMsg(String resMsg) {
47 | this.resMsg = resMsg;
48 | }
49 |
50 | public HashMap getProperty() {
51 | return property;
52 | }
53 |
54 |
55 | public void addListItem(HashMap map) {
56 | list.add(map);
57 | }
58 |
59 | public ArrayList> getList() {
60 | return list;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/dialog_hint.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
28 |
29 |
38 |
39 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/values-w820dp/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
8 | #00FFFFFF
9 | #FEFDFD
10 | #F5F5F5
11 |
12 |
13 |
14 |
15 | #E5E5EA
16 | #C6C9CB
17 | #A7AAAD
18 |
19 |
20 |
21 |
22 | #FFFFFF
23 | #4B4B4B
24 | #859090
25 | #201f20
26 | #e09e5e
27 |
28 |
29 |
30 | #FAB724
31 | #E71B64
32 | #efefef
33 | #C1B9B9
34 | #C1B9B9
35 | #90F2B8
36 |
37 |
38 |
39 | #FFBF04
40 | #C4BFC4
41 | #74E598
42 | #C46FE8
43 | #ED6F7C
44 |
45 |
--------------------------------------------------------------------------------
/MyWorld_Service/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/personal_information_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
21 |
22 |
31 |
32 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 | import android.content.res.Resources;
3 | import android.graphics.Bitmap;
4 | import android.graphics.drawable.BitmapDrawable;
5 | import android.graphics.drawable.Drawable;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.support.v4.app.FragmentManager;
8 | import android.support.v4.app.FragmentTransaction;
9 | import android.os.Bundle;
10 | import android.widget.FrameLayout;
11 | import com.tm.mywechat.main_page.MyMainActivity;
12 |
13 | import static com.tm.mywechat.FragmentUtils.bitmapToString;
14 |
15 | public class MainActivity extends FragmentActivity {
16 | private FrameLayout frameLayout;
17 | private FragmentManager fragmentManager;
18 | private FragmentTransaction fragmentTransaction;
19 |
20 | private MyMainActivity myMainActivity;
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | setContentView(R.layout.main_activity);
25 |
26 | Resources res=this.getResources();
27 |
28 | initview();
29 | myfragmentmanager();
30 |
31 |
32 |
33 | }
34 |
35 |
36 |
37 |
38 |
39 | private void myfragmentmanager() {
40 | fragmentManager = this.getSupportFragmentManager();
41 | fragmentTransaction = fragmentManager.beginTransaction();//获取一个事务, 该事务可以管理 fragment对象的添加、删除等操作
42 |
43 | /* 默认布局 */
44 | myMainActivity = new MyMainActivity();
45 | fragmentTransaction.add(R.id.trade_framlayout, myMainActivity);
46 | fragmentTransaction.commit();
47 | }
48 |
49 | private void initview() {
50 | frameLayout = (FrameLayout) findViewById(R.id.trade_framlayout);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.os.Message;
6 | import android.support.v7.app.AppCompatActivity;
7 |
8 | import com.tm.mywechat.http.Constant;
9 | import com.tm.mywechat.http.HttpPostTask;
10 | import com.tm.mywechat.http.bean.CommonRequest;
11 | import com.tm.mywechat.http.interf.ResponseHandler;
12 |
13 |
14 | /**
15 | * 基类
16 | *
17 | * Created by WangJie on 2017-03-14.
18 | */
19 | public class BaseActivity extends AppCompatActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | }
26 |
27 | protected void sendHttpPostRequest(String url, CommonRequest request, ResponseHandler responseHandler, boolean showLoadingDialog) {
28 | new HttpPostTask(request, mHandler, responseHandler).execute(url);
29 | if(showLoadingDialog) {
30 | // LoadingDialogUtil.showLoadingDialog(BaseActivity.this);
31 | }
32 | }
33 |
34 | protected Handler mHandler = new Handler(){
35 | @Override
36 | public void handleMessage(Message msg) {
37 | super.handleMessage(msg);
38 |
39 | if(msg.what == Constant.HANDLER_HTTP_SEND_FAIL) {
40 | // LogUtil.logErr(msg.obj.toString());
41 |
42 | // LoadingDialogUtil.cancelLoading();
43 | // DialogUtil.showHintDialog(BaseActivity.this, "请求发送失败,请重试", true);
44 | } else if (msg.what == Constant.HANDLER_HTTP_RECEIVE_FAIL) {
45 | // LogUtil.logErr(msg.obj.toString());
46 |
47 | //LoadingDialogUtil.cancelLoading();
48 | // DialogUtil.showHintDialog(BaseActivity.this, "请求接受失败,请重试", true);
49 | }
50 | }
51 | };
52 | }
53 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/util/LoadingDialogUtil.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.util;
2 |
3 | import android.app.Dialog;
4 | import android.content.Context;
5 | import android.graphics.drawable.AnimationDrawable;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import com.tm.mywechat.R;
12 |
13 |
14 | /**
15 | * 加载对话框控制类
16 | * Created by WangJie on 2017-03-15.
17 | */
18 |
19 | public class LoadingDialogUtil {
20 |
21 | private static Dialog loadDialog;
22 | private static View loadingView;
23 |
24 | public static void showLoadingDialog(Context context) {
25 | if(loadDialog == null) {
26 | //prepareLoadingView(context, true, "正在为您加载,请稍候...");
27 | loadDialog = new Dialog(context, R.style.MyDialogStyle);
28 | loadDialog.setContentView(loadingView);
29 | loadDialog.setCancelable(false);
30 | loadDialog.show();
31 | }
32 | }
33 |
34 | public static void cancelLoading() {
35 | if(loadDialog != null
36 | && loadDialog.isShowing()) {
37 | loadDialog.dismiss();
38 | }
39 | }
40 |
41 | /**
42 | * 准备进度对话框
43 | */
44 | /*private static void prepareLoadingView(final Context context,
45 | boolean showLoadingStr, String loadingStr) {
46 | loadingView = LayoutInflater.from(context).inflate(
47 | R.layout.dialog_loading, null);
48 | ImageView img = (ImageView) loadingView.findViewById(R.id.img_loading);
49 | AnimationDrawable anim = (AnimationDrawable) img.getDrawable();
50 | anim.start();
51 |
52 | TextView tvTitle = (TextView) loadingView.findViewById(R.id.tv_loading);
53 | tvTitle.setText(loadingStr);
54 | tvTitle.setVisibility(showLoadingStr ? View.VISIBLE : View.INVISIBLE);
55 | }*/
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/dialog_decide.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
23 |
24 |
28 |
29 |
33 |
34 |
44 |
45 |
49 |
50 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/MyWeChat/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/updateuser.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
14 |
19 |
23 |
27 |
28 |
33 |
37 |
41 |
42 |
48 |
52 |
56 |
57 |
58 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/http/bean/CommonRequest.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.http.bean;
2 |
3 |
4 |
5 | import android.util.Log;
6 |
7 | import com.tm.mywechat.util.LogUtil;
8 |
9 | import org.json.JSONException;
10 | import org.json.JSONObject;
11 |
12 | import java.io.UnsupportedEncodingException;
13 | import java.util.HashMap;
14 |
15 | /**
16 | * 基本请求体封装类
17 | * Created by WangJie on 2017-05-03.
18 | */
19 | public class CommonRequest {
20 | /**
21 | * 请求码,类似于接口号(在本文中用Servlet做服务器时暂时用不到)
22 | */
23 | private String requestCode;
24 | /**
25 | * 请求参数
26 | * (说明:这里只用一个简单map类封装请求参数,对于请求报文需要上送一个数组的复杂情况需要自己再加一个ArrayList类型的成员变量来实现)
27 | */
28 | private HashMap requestParam;
29 |
30 | public CommonRequest() {
31 | requestCode = "";
32 | requestParam = new HashMap<>();
33 | }
34 |
35 | /**
36 | * 设置请求代码,即接口号,在本例中暂时未用到
37 | */
38 | public void setRequestCode(String requestCode) {
39 | this.requestCode = requestCode;
40 | }
41 |
42 |
43 | public static String encodeStr(String str) {
44 | //Log.d("ffffffffff",str);
45 | try {
46 | return new String(str.getBytes("UTF-8"), "ISO-8859-1");
47 | } catch (UnsupportedEncodingException e) {
48 | e.printStackTrace();
49 | return null;
50 | }
51 | }
52 |
53 | /**
54 | * 为请求报文设置参数
55 | * @param paramKey 参数名
56 | * @param paramValue 参数值
57 | */
58 |
59 |
60 | public void addRequestParam(String paramKey, String paramValue) {
61 |
62 | requestParam.put(paramKey, encodeStr(paramValue));
63 | }
64 |
65 | /**
66 | * 将请求报文体组装成json形式的字符串,以便进行网络发送
67 | * @return 请求报文的json字符串
68 | */
69 | public String getJsonStr() {
70 | // 由于Android源码自带的JSon功能不够强大(没有直接从Bean转到JSonObject的API),为了不引入第三方资源这里我们只能手动拼装一下啦
71 | JSONObject object = new JSONObject();
72 | JSONObject param = new JSONObject(requestParam);
73 | try {
74 | // 下边2个"requestCode"、"requestParam"是和服务器约定好的请求体字段名称,在本文接下来的服务端代码会说到
75 | object.put("requestCode", requestCode);
76 | object.put("requestParam", param);
77 | } catch (JSONException e) {
78 | LogUtil.logErr("请求报文组装异常:" + e.getMessage());
79 | }
80 | // 打印原始请求报文
81 | LogUtil.logRequest(object.toString());
82 | return object.toString();
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/util/LogUtil.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.util;
2 |
3 | import android.util.Log;
4 |
5 | import java.util.HashMap;
6 |
7 | /**
8 | * 日志打印工具类
9 | *
10 | * Created by WangJie on 2017-03-15.
11 | */
12 |
13 | public class LogUtil {
14 |
15 | public static boolean showRunningLog;
16 |
17 | public static boolean showHttpDataLog;
18 |
19 | private static String TAG = "WangJ";
20 |
21 | /**
22 | * 日志输出单个字符串
23 | *
24 | * @param value 日志内容
25 | */
26 | public static void log(String value){
27 | if(showRunningLog){
28 | Log.i(TAG, value);
29 | }
30 | }
31 |
32 | /**
33 | * 日志输出单个字符串
34 | *
35 | * @param key 待输出字符串含义的标注
36 | * @param value 日志内容
37 | */
38 | public static void log(String key, String value){
39 | if(showRunningLog){
40 | Log.i(TAG, key + ": " + value);
41 | }
42 | }
43 |
44 | /**
45 | * 日志输出字符串数组
46 | *
47 | * @param key 待输出字符串含义的标注
48 | * @param strArray 要查看的数组
49 | */
50 | public static void log(String key, String[] strArray){
51 | if(showRunningLog){
52 | Log.i(TAG, key + ":");
53 | for (int i = 0; i < strArray.length; i++) {
54 | Log.i(TAG, "item[" + i + "] : " + strArray[i]);
55 | }
56 | }
57 | }
58 |
59 | /**
60 | * 日志输出HashMap
61 | *
62 | * @param key 待输出字符串含义的标注
63 | * @param map 要查看的map
64 | */
65 | public static void log(String key, HashMap map){
66 | if(showRunningLog){
67 | Log.i(TAG, key + ":");
68 | for (HashMap.Entry entry : map.entrySet()) {
69 | Log.i(TAG, entry.getKey() + " : " + entry.getValue());
70 | }
71 | }
72 | }
73 |
74 | /**
75 | * 打印请求参数
76 | * @param requestStr 请求内容
77 | */
78 | public static void logRequest(String requestStr){
79 | if(showHttpDataLog){
80 | Log.i(TAG, "The RequestStr:\n" + requestStr);
81 | }
82 | }
83 |
84 | /**
85 | * 打印服务器返回结果字符串
86 | * @param responseStr 报文返回字符串
87 | */
88 | public static void logResponse(String responseStr){
89 | if(showHttpDataLog){
90 | Log.i(TAG, "The ResponseStr:\n" + responseStr);
91 | }
92 | }
93 |
94 | /**
95 | * Error 错误记录
96 | * @param errMsg 错误信息
97 | */
98 | public static void logErr(String errMsg){
99 | Log.e(TAG, errMsg);
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/MyWeChat/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/main_page/MyAsyncTask.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.main_page;
2 |
3 | import android.os.AsyncTask;
4 | import android.util.Log;
5 | import android.widget.TextView;
6 |
7 | import java.io.BufferedReader;
8 | import java.io.IOException;
9 | import java.io.InputStream;
10 | import java.io.InputStreamReader;
11 | import java.net.HttpURLConnection;
12 | import java.net.MalformedURLException;
13 | import java.net.URL;
14 |
15 | /**
16 | * Created by TM on 2017/6/7.
17 | */
18 | /**
19 | * AsyncTask类的三个泛型参数:
20 | * (1)Param 在执行AsyncTask是需要传入的参数,可用于后台任务中使用
21 | * (2)后台任务执行过程中,如果需要在UI上先是当前任务进度,则使用这里指定的泛型作为进度单位
22 | * (3)任务执行完毕后,如果需要对结果进行返回,则这里指定返回的数据类型
23 | */
24 | class MyAsyncTask extends AsyncTask {
25 |
26 | private TextView tv; // 举例一个UI元素,后边会用到
27 |
28 | public MyAsyncTask(TextView v) {
29 | tv = v;
30 | }
31 |
32 | @Override
33 | protected void onPreExecute() {
34 | Log.w("WangJ", "task onPreExecute()");
35 | }
36 |
37 | /**
38 | * @param params 这里的params是一个数组,即AsyncTask在激活运行是调用execute()方法传入的参数
39 | */
40 | @Override
41 | protected String doInBackground(String... params) {
42 | Log.w("WangJ", "task doInBackground()");
43 | HttpURLConnection connection = null;
44 | StringBuilder response = new StringBuilder();
45 | try {
46 | URL url = new URL(params[0]); // 声明一个URL,注意如果用百度首页实验,请使用https开头,否则获取不到返回报文
47 | connection = (HttpURLConnection) url.openConnection(); // 打开该URL连接
48 | connection.setRequestMethod("GET"); // 设置请求方法,“POST或GET”,我们这里用GET,在说到POST的时候再用POST
49 | connection.setConnectTimeout(80000); // 设置连接建立的超时时间
50 | connection.setReadTimeout(80000); // 设置网络报文收发超时时间
51 | InputStream in = connection.getInputStream(); // 通过连接的输入流获取下发报文,然后就是Java的流处理
52 | BufferedReader reader = new BufferedReader(new InputStreamReader(in));
53 | String line;
54 | while ((line = reader.readLine()) != null) {
55 | response.append(line);
56 | }
57 | } catch (MalformedURLException e) {
58 | e.printStackTrace();
59 | } catch (IOException e) {
60 | e.printStackTrace();
61 | }
62 | return response.toString(); // 这里返回的结果就作为onPostExecute方法的入参
63 | }
64 |
65 | @Override
66 | protected void onProgressUpdate(Integer... values) {
67 | // 如果在doInBackground方法,那么就会立刻执行本方法
68 | // 本方法在UI线程中执行,可以更新UI元素,典型的就是更新进度条进度,一般是在下载时候使用
69 | }
70 |
71 | /**
72 | * 运行在UI线程中,所以可以直接操作UI元素
73 | * @param s
74 | */
75 | @Override
76 | protected void onPostExecute(String s) {
77 | Log.w("WangJ", "task onPostExecute()");
78 | tv.setText(s);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/goods_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
18 |
26 |
27 |
35 |
41 |
47 |
53 |
59 |
60 |
61 |
67 |
72 |
73 |
74 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/register_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
13 |
18 |
23 |
27 |
28 |
33 |
37 |
42 |
43 |
48 |
52 |
56 |
57 |
62 |
66 |
70 |
71 |
77 |
81 |
85 |
86 |
87 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/http/HttpPostTask.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.http;
2 |
3 | import android.os.AsyncTask;
4 | import android.os.Handler;
5 |
6 |
7 | import com.tm.mywechat.http.bean.CommonRequest;
8 | import com.tm.mywechat.http.bean.CommonResponse;
9 | import com.tm.mywechat.http.interf.ResponseHandler;
10 |
11 | import java.io.BufferedReader;
12 | import java.io.DataOutputStream;
13 | import java.io.IOException;
14 | import java.io.InputStream;
15 | import java.io.InputStreamReader;
16 | import java.net.HttpURLConnection;
17 | import java.net.URL;
18 |
19 | /**
20 | * 网络通信异步任务类
21 | *
22 | * @author WangJ
23 | */
24 | public class HttpPostTask extends AsyncTask {
25 |
26 | /** BaseActivity 中基础问题的处理 handler */
27 | private Handler mHandler;
28 |
29 | /** 返回信息处理回调接口 */
30 | private ResponseHandler rHandler;
31 |
32 | /** 请求类对象 */
33 | private CommonRequest request;
34 |
35 | public HttpPostTask(CommonRequest request,
36 | Handler mHandler,
37 | ResponseHandler rHandler) {
38 | this.request = request;
39 | this.mHandler = mHandler;
40 | this.rHandler = rHandler;
41 | }
42 |
43 | @Override
44 | protected String doInBackground(String... params) {
45 | StringBuilder resultBuf = new StringBuilder();
46 | try {
47 | URL url = new URL(params[0]);
48 |
49 | // 第一步:使用URL打开一个HttpURLConnection连接
50 | HttpURLConnection connection = (HttpURLConnection) url.openConnection();
51 |
52 | // 第二步:设置HttpURLConnection连接相关属性
53 | connection.setRequestProperty("Content-Type", "application/json;charset=utf-8");
54 | connection.setRequestMethod("POST"); // 设置请求方法,“POST或GET”
55 | connection.setConnectTimeout(8000); // 设置连接建立的超时时间
56 | connection.setReadTimeout(8000); // 设置网络报文收发超时时间
57 | connection.setDoOutput(true);
58 | connection.setDoInput(true);
59 |
60 | // 如果是POST方法,需要在第3步获取输入流之前向连接写入POST参数
61 | DataOutputStream out = new DataOutputStream(connection.getOutputStream());
62 | out.writeBytes(request.getJsonStr());
63 | out.flush();
64 |
65 | // 第三步:打开连接输入流读取返回报文 -> *注意*在此步骤才真正开始网络请求
66 | int responseCode = connection.getResponseCode();
67 | if (responseCode == HttpURLConnection.HTTP_OK) {
68 | // 通过连接的输入流获取下发报文,然后就是Java的流处理
69 | InputStream in = connection.getInputStream();
70 | BufferedReader read = new BufferedReader(new InputStreamReader(in));
71 | String line;
72 | while((line = read.readLine()) != null) {
73 | resultBuf.append(line);
74 | }
75 | return resultBuf.toString();
76 | } else {
77 | // 异常情况,如404/500...
78 | mHandler.obtainMessage(Constant.HANDLER_HTTP_RECEIVE_FAIL,
79 | "[" + responseCode + "]" + connection.getResponseMessage()).sendToTarget();
80 | }
81 | } catch (IOException e) {
82 | // 网络请求过程中发生IO异常
83 | mHandler.obtainMessage(Constant.HANDLER_HTTP_SEND_FAIL,
84 | e.getClass().getName() + " : " + e.getMessage()).sendToTarget();
85 | }
86 | return resultBuf.toString();
87 | }
88 |
89 | @Override
90 | protected void onPostExecute(String result) {
91 | if (rHandler != null) {
92 | if (!"".equals(result)) {
93 | /* 交易成功时需要在处理返回结果时手动关闭Loading对话框,可以灵活处理连续请求多个接口时Loading框不断弹出、关闭的情况 */
94 |
95 | CommonResponse response = new CommonResponse(result);
96 | // 这里response.getResCode()为多少表示业务完成也是和服务器约定好的
97 | if ("0".equals(response.getResCode())) { // 正确
98 | rHandler.success(response);
99 | } else {
100 | rHandler.fail(response.getResCode(), response.getResMsg());
101 | }
102 | }
103 | }
104 | }
105 |
106 | }
107 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/http/bean/CommonResponse.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.http.bean;
2 |
3 |
4 | import org.json.JSONArray;
5 | import org.json.JSONException;
6 | import org.json.JSONObject;
7 |
8 | import java.util.ArrayList;
9 | import java.util.HashMap;
10 | import java.util.Iterator;
11 |
12 | /**
13 | * 常规返回报文格式化(如果有数组只能是单层数组,业务逻辑复杂时请服务端优化逻辑,或者分开请求不同的接口)
14 | *
15 | * @author WangJ 2016.06.02
16 | */
17 | public class CommonResponse {
18 |
19 | /**
20 | * 交易状态代码
21 | */
22 | private String resCode = "";
23 |
24 | /**
25 | * 交易失败说明
26 | */
27 | private String resMsg = "";
28 | private String jsonString;
29 |
30 | /**
31 | * 简单信息
32 | */
33 | private HashMap propertyMap;
34 |
35 | /**
36 | * 列表类信息
37 | */
38 | private ArrayList> mapList;
39 |
40 | /**
41 | * 通用报文返回构造函数
42 | *
43 | * @param responseString Json格式的返回字符串
44 | */
45 |
46 |
47 |
48 | public CommonResponse(String responseString) {
49 |
50 | // 日志输出原始应答报文
51 | // LogUtil.logResponse(responseString);
52 |
53 | jsonString=responseString;
54 | propertyMap = new HashMap<>();
55 | mapList = new ArrayList<>();
56 |
57 | try {
58 | JSONObject root = new JSONObject(responseString);
59 |
60 | /* 说明:
61 | 以下名称"resCode"、"resMsg"、"property"、"list"
62 | 和请求体中提到的字段名称一样,都是和服务器程序开发者约定好的字段名字,在本文接下来的服务端代码会说到
63 | */
64 | resCode = root.getString("resCode");
65 | resMsg = root.optString("resMsg");
66 |
67 | JSONObject property = root.optJSONObject("property");
68 | if (property != null) {
69 | parseProperty(property, propertyMap);
70 | }
71 |
72 | JSONArray list = root.optJSONArray("list");
73 | if (list != null) {
74 | parseList(list);
75 | }
76 | } catch (JSONException e) {
77 | e.printStackTrace();
78 | }
79 |
80 | }
81 |
82 | /**
83 | * 简单信息部分的解析到{@link CommonResponse#propertyMap}
84 | *
85 | * @param property 信息部分
86 | * @param targetMap 解析后保存目标
87 | */
88 | private void parseProperty(JSONObject property, HashMap targetMap) {
89 | Iterator> it = property.keys();
90 | while (it.hasNext()) {
91 | String key = it.next().toString();
92 | Object value = property.opt(key);
93 | targetMap.put(key, value.toString());
94 | }
95 | }
96 |
97 | /**
98 | * 解析列表部分信息到{@link CommonResponse#mapList}
99 | *
100 | * @param list 列表信息部分
101 | */
102 | private void parseList(JSONArray list) {
103 | int i = 0;
104 | while (i < list.length()) {
105 | HashMap map = new HashMap<>();
106 | try {
107 | parseProperty(list.getJSONObject(i++), map);
108 | } catch (JSONException e) {
109 | e.printStackTrace();
110 | }
111 | mapList.add(map);
112 | }
113 | }
114 |
115 | public String getResCode() {
116 | return resCode;
117 | }
118 |
119 | public String getResMsg() {
120 | return resMsg;
121 | }
122 |
123 | public HashMap getPropertyMap() {
124 | return propertyMap;
125 | }
126 |
127 | public ArrayList> getDataList() {
128 | return mapList;
129 | }
130 |
131 |
132 | public String getjsonString()
133 | {
134 | return jsonString;
135 | }
136 |
137 | }
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/mymain_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
18 |
19 |
26 |
27 |
33 |
34 |
45 |
46 |
56 |
57 |
67 |
68 |
78 |
79 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/FragmentUtils.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.app.Fragment;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.graphics.drawable.BitmapDrawable;
9 | import android.util.Base64;
10 | import android.util.Log;
11 |
12 | import com.tm.mywechat.main_page.AddFragment;
13 |
14 | import java.io.ByteArrayOutputStream;
15 | import java.io.InputStream;
16 |
17 | /**
18 | * Created by SJL on 2017/6/11.
19 | */
20 |
21 | public class FragmentUtils {
22 |
23 | public static void pickAlbum(AddFragment fragment, int reqCode) {
24 |
25 | Intent intent = new Intent(Intent.ACTION_PICK,
26 |
27 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
28 |
29 | fragment.startActivityForResult(intent, reqCode);
30 |
31 | }
32 |
33 | public static byte[] readStream(InputStream inStream) throws Exception {
34 | byte[] buffer = new byte[1024];
35 | int len = -1;
36 | ByteArrayOutputStream outStream = new ByteArrayOutputStream();
37 | while ((len = inStream.read(buffer)) != -1) {
38 | outStream.write(buffer, 0, len);
39 | }
40 | byte[] data = outStream.toByteArray();
41 | outStream.close();
42 | inStream.close();
43 | return data;
44 | }
45 |
46 |
47 | public static Bitmap decodeFileAndCompressBy(String imgpath, int reqWidth,
48 | int reqHeight) {
49 | BitmapFactory.Options options = new BitmapFactory.Options();
50 | options.inJustDecodeBounds = true;
51 | BitmapFactory.decodeFile(imgpath, options);
52 | int imageHeight = options.outHeight;
53 | int imageWidth = options.outWidth;
54 | String imageType = options.outMimeType;
55 | options.inSampleSize = calculateInSampleSize(options, reqWidth,
56 | reqHeight);
57 | options.inJustDecodeBounds = false;
58 | return BitmapFactory.decodeFile(imgpath, options);
59 |
60 | }
61 |
62 | public static int calculateInSampleSize(BitmapFactory.Options options,
63 | int reqWidth, int reqHeight) {
64 | final int height = options.outHeight;
65 | final int width = options.outWidth;
66 | int inSampleSize = 1;
67 | if (height > reqHeight || width > reqWidth) {
68 | final int heightRatio = Math.round((float) height
69 | / (float) reqHeight);
70 | final int widthRatio = Math.round((float) width / (float) reqWidth);
71 | inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
72 | }
73 | return inSampleSize;
74 | }
75 |
76 |
77 | public static String bitmapToString(Bitmap bitmap) {
78 | // 保存
79 | // BitmapDrawable drawble = (BitmapDrawable) cv_head.getDrawable();
80 |
81 | // 第一步 将bitmap 转换成字节数组输出流
82 | ByteArrayOutputStream byStream = new ByteArrayOutputStream();
83 | bitmap.compress(Bitmap.CompressFormat.PNG, 80, byStream);
84 |
85 | // 利用base64将字节数组转换成字符串
86 | byte[] byteArray = byStream.toByteArray();
87 | String imgString = new String(Base64.encodeToString(byteArray, Base64.DEFAULT));
88 | Log.d("aaaaaaaaa",imgString);
89 | return imgString;
90 |
91 | }
92 | public static Bitmap stringToImage(String imgStr) {
93 | //Log.d("aaaaaaaaa",imgStr);
94 | byte[] b = Base64.decode(imgStr, Base64.DEFAULT);
95 | for (int i = 0; i < b.length; ++i) {
96 | if (b[i] < 0) {// 调整异常数据
97 | b[i] += 256;
98 | }
99 | }
100 | Bitmap bitmap = BitmapFactory.decodeByteArray(b, 0, b.length);
101 | // 生成jpeg图片
102 | return bitmap;
103 |
104 | }
105 |
106 |
107 | }
108 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/res/layout/login_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
16 |
17 |
26 |
30 |
39 |
40 |
41 |
50 |
54 |
64 |
65 |
66 |
67 |
78 |
79 |
88 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/main_page/MyMainActivity.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.main_page;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 | import android.support.v4.app.FragmentPagerAdapter;
7 | import android.support.v4.view.ViewPager;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.RadioButton;
12 | import android.widget.RadioGroup;
13 | import android.widget.Toast;
14 |
15 | import com.tm.mywechat.R;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | /**
21 | * Created by Administrator on 2017/1/10.
22 | */
23 | public class MyMainActivity extends Fragment {
24 | private List fragment;
25 | private View view;
26 | private RadioGroup radioGroup;
27 | private ViewPager viewPager;
28 |
29 | @Nullable
30 | @Override
31 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
32 | view = inflater.inflate(R.layout.mymain_activity, container, false);
33 | fragment = new ArrayList();
34 |
35 | HomePageFragment messageFragment = new HomePageFragment(); // 顺序对界面有影响
36 | ClassifyFragment maillistFragment = new ClassifyFragment();
37 | AddFragment addFragment = new AddFragment();
38 | //ShoppingCartFragment foundFragment =new ShoppingCartFragment();
39 | MineFragment mineFragment = new MineFragment();
40 |
41 | fragment.add(messageFragment);
42 | fragment.add(maillistFragment);
43 | fragment.add(addFragment);
44 | //fragment.add(foundFragment);
45 | fragment.add(mineFragment);
46 |
47 |
48 | viewPager = (ViewPager) view.findViewById(R.id.viewPage);
49 |
50 | viewPager.setAdapter(new FragmentPagerAdapter(getChildFragmentManager()) {
51 | @Override
52 | public Fragment getItem(int position) {
53 | return fragment.get(position);
54 | }
55 |
56 | @Override
57 | public int getCount() {
58 | return fragment.size();
59 | }
60 | });
61 | viewPager.setCurrentItem(0);
62 |
63 | initMenuItem();
64 |
65 | /* 将每个page与底部的menu绑定 */
66 | viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
67 | @Override
68 | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
69 |
70 | }
71 |
72 |
73 | /* position是在界面滑动到的页面的 下标 编号 */
74 | @Override
75 | public void onPageSelected(int position) {
76 | RadioButton radioButton = (RadioButton) radioGroup.getChildAt(position);
77 | // Toast.makeText(getActivity(),""+position,Toast.LENGTH_LONG).show();
78 | radioButton.setChecked(true);
79 | }
80 |
81 | @Override
82 | public void onPageScrollStateChanged(int state) {
83 |
84 | }
85 | });
86 | return view;
87 | }
88 |
89 | private void initMenuItem() {
90 | radioGroup = (RadioGroup) view.findViewById(R.id.qs_top_radioGroup);
91 | radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
92 | @Override
93 | public void onCheckedChanged(RadioGroup group, int checkedId) {
94 | int index = group.getCheckedRadioButtonId(); //通过 group 找对应按钮 id
95 | RadioButton rb = (RadioButton) view.findViewById(index);
96 | rb.setChecked(true);
97 |
98 | for(int i=0;i
2 |
8 |
9 |
15 |
24 |
30 |
35 |
36 |
37 |
45 |
52 |
53 |
60 |
61 |
62 |
63 |
72 |
78 |
84 |
91 |
97 |
98 |
99 |
107 |
113 |
119 |
120 |
121 |
122 |
123 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/MyGoods.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.BaseAdapter;
9 | import android.widget.ImageView;
10 | import android.widget.ListView;
11 | import android.widget.TextView;
12 |
13 | import com.tm.mywechat.http.bean.CommonRequest;
14 | import com.tm.mywechat.http.bean.CommonResponse;
15 | import com.tm.mywechat.http.interf.ResponseHandler;
16 | import com.tm.mywechat.util.LoadingDialogUtil;
17 |
18 | import java.util.ArrayList;
19 | import java.util.HashMap;
20 |
21 | /**
22 | * Created by SJL on 2017/6/11.
23 | */
24 |
25 | public class MyGoods extends BaseActivity{
26 | private String URL_PRODUCT = "http://192.168.43.165:8080/MyWorld_Service/ProductServlet";
27 | ListView lvProduct;
28 | private String paramKey;
29 | private String account=Login.account;
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.mygoods);
34 | lvProduct = (ListView) findViewById(R.id.lv3);
35 | getListData();
36 | }
37 |
38 | private void getListData() {
39 | CommonRequest request = new CommonRequest();
40 | request.addRequestParam("account",account);
41 | request.addRequestParam("opt","2");
42 | request.addRequestParam("opt2","1");
43 | sendHttpPostRequest(URL_PRODUCT, request, new ResponseHandler() {
44 | @Override
45 | public void success(CommonResponse response) {
46 | LoadingDialogUtil.cancelLoading();
47 |
48 | if (response.getDataList().size() > 0) {
49 | ListActivity.ProductAdapter adapter = new ListActivity.ProductAdapter(MyGoods.this, response.getDataList());
50 | lvProduct.setAdapter(adapter);
51 | } else {
52 | //DialogUtil.showHintDialog(ListActivity.this, "列表数据为空", true);
53 | }
54 | }
55 |
56 | @Override
57 | public void fail(String failCode, String failMsg) {
58 | LoadingDialogUtil.cancelLoading();
59 | }
60 | }, true);
61 | }
62 |
63 | static class ProductAdapter extends BaseAdapter {
64 | private Context context;
65 | private ArrayList> list;
66 |
67 | public ProductAdapter(Context context, ArrayList> list) {
68 | this.context = context;
69 | this.list = list;
70 | }
71 |
72 | @Override
73 | public int getCount() {
74 | return list.size();
75 | }
76 |
77 | @Override
78 | public Object getItem(int position) {
79 | return list.get(position);
80 | }
81 |
82 | @Override
83 | public long getItemId(int position) {
84 | return position;
85 | }
86 |
87 | @Override
88 | public View getView(int position, View convertView, ViewGroup parent) {
89 | MyGoods.ProductAdapter.ViewHolder holder;
90 | if (convertView == null) {
91 | convertView = LayoutInflater.from(context).inflate(R.layout.goods_view, parent, false);
92 | holder = new MyGoods.ProductAdapter.ViewHolder();
93 | holder.gName = (TextView) convertView.findViewById(R.id.g_name);
94 | holder.tvDescribe = (TextView) convertView.findViewById(R.id.desc);
95 | holder.tvPrice = (TextView) convertView.findViewById(R.id.price);
96 | holder.oldPrice=(TextView) convertView.findViewById(R.id.oldprice);
97 | holder.username=(TextView) convertView.findViewById(R.id.user_name);
98 | holder.phone=(TextView) convertView.findViewById(R.id.phone);
99 | holder.imageView=(ImageView)convertView.findViewById(R.id.g_pic);
100 | holder.imageView2=(ImageView)convertView.findViewById(R.id.user_icon);
101 |
102 | convertView.setTag(holder);
103 | } else {
104 | holder = (MyGoods.ProductAdapter.ViewHolder) convertView.getTag();
105 | }
106 |
107 | HashMap map = list.get(position);
108 | holder.gName.setText(map.get("name"));
109 | holder.tvDescribe.setText(map.get("describle"));
110 | holder.tvPrice.setText("价格:"+map.get("price"));
111 | holder.oldPrice.setText("原价:"+map.get("oldprice"));
112 | holder.username.setText(map.get("account"));
113 | holder.phone.setText("联系 :"+map.get("phone"));
114 | holder.imageView2.setImageBitmap(FragmentUtils.stringToImage(map.get("usericon")));
115 | holder.imageView.setImageBitmap(FragmentUtils.stringToImage(map.get("image")));
116 | return convertView;
117 | }
118 |
119 | private static class ViewHolder {
120 | private TextView gName;
121 | private TextView tvDescribe;
122 | private TextView tvPrice;
123 | private TextView oldPrice;
124 | private TextView username;
125 | private TextView phone;
126 | private ImageView imageView;
127 | private ImageView imageView2;
128 |
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/MyWeChat/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/ListActivity.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.os.Bundle;
6 | import android.provider.ContactsContract;
7 | import android.util.Log;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.BaseAdapter;
12 | import android.widget.ImageView;
13 | import android.widget.ListView;
14 | import android.widget.TextView;
15 | import android.widget.Toast;
16 |
17 | import com.tm.mywechat.http.bean.CommonRequest;
18 | import com.tm.mywechat.http.bean.CommonResponse;
19 | import com.tm.mywechat.http.interf.ResponseHandler;
20 | //import com.tm.mywechat.util.DialogUtil;
21 | import com.tm.mywechat.util.LoadingDialogUtil;
22 |
23 | import java.util.ArrayList;
24 | import java.util.HashMap;
25 |
26 | public class ListActivity extends BaseActivity {
27 | private String URL_PRODUCT = "http://192.168.43.165:8080/MyWorld_Service/ProductServlet";
28 | ListView lvProduct;
29 | TextView textView;
30 | private String paramKey;
31 | private String paramValue;
32 | @Override
33 | protected void onCreate(Bundle savedInstanceState) {
34 | super.onCreate(savedInstanceState);
35 | setContentView(R.layout.goods_listview);
36 |
37 | Bundle bundle = this.getIntent().getExtras();
38 | paramKey=bundle.getString("分类名");
39 | paramValue=bundle.getString("分类ID");
40 |
41 | lvProduct = (ListView) findViewById(R.id.lv);
42 | textView = (TextView)findViewById(R.id.type);
43 | textView.setText(paramKey);
44 | getListData();
45 | }
46 |
47 | public void senHTTP(CommonRequest request)
48 | {
49 |
50 | sendHttpPostRequest(URL_PRODUCT, request, new ResponseHandler() {
51 | @Override
52 | public void success(CommonResponse response) {
53 | LoadingDialogUtil.cancelLoading();
54 | Toast.makeText(ListActivity.this,"发布成功",Toast.LENGTH_LONG).show();
55 |
56 | }
57 |
58 | @Override
59 | public void fail(String failCode, String failMsg) {
60 | Toast.makeText(ListActivity.this,"发布失败",Toast.LENGTH_LONG).show();
61 | //LoadingDialogUtil.cancelLoading();
62 | }
63 | }, true);
64 | }
65 |
66 |
67 |
68 |
69 | private void getListData() {
70 | CommonRequest request = new CommonRequest();
71 | request.addRequestParam("type",paramValue);
72 | request.addRequestParam("opt","2");
73 | request.addRequestParam("opt2","2");
74 | sendHttpPostRequest(URL_PRODUCT, request, new ResponseHandler() {
75 | @Override
76 | public void success(CommonResponse response) {
77 | LoadingDialogUtil.cancelLoading();
78 |
79 | if (response.getDataList().size() > 0) {
80 | ProductAdapter adapter = new ProductAdapter(ListActivity.this, response.getDataList());
81 | lvProduct.setAdapter(adapter);
82 | } else {
83 | //DialogUtil.showHintDialog(ListActivity.this, "列表数据为空", true);
84 | }
85 | }
86 |
87 | @Override
88 | public void fail(String failCode, String failMsg) {
89 | LoadingDialogUtil.cancelLoading();
90 | }
91 | }, true);
92 | }
93 |
94 | static class ProductAdapter extends BaseAdapter {
95 | private Context context;
96 | private ArrayList> list;
97 |
98 | public ProductAdapter(Context context, ArrayList> list) {
99 | this.context = context;
100 | this.list = list;
101 | }
102 |
103 | @Override
104 | public int getCount() {
105 | return list.size();
106 | }
107 |
108 | @Override
109 | public Object getItem(int position) {
110 | return list.get(position);
111 | }
112 |
113 | @Override
114 | public long getItemId(int position) {
115 | return position;
116 | }
117 |
118 | @Override
119 | public View getView(int position, View convertView, ViewGroup parent) {
120 | ViewHolder holder;
121 | if (convertView == null) {
122 | convertView = LayoutInflater.from(context).inflate(R.layout.goods_view, parent, false);
123 | holder = new ViewHolder();
124 | holder.gName = (TextView) convertView.findViewById(R.id.g_name);
125 | holder.tvDescribe = (TextView) convertView.findViewById(R.id.desc);
126 | holder.tvPrice = (TextView) convertView.findViewById(R.id.price);
127 | holder.oldPrice=(TextView) convertView.findViewById(R.id.oldprice);
128 | holder.username=(TextView) convertView.findViewById(R.id.user_name);
129 | holder.phone=(TextView) convertView.findViewById(R.id.phone);
130 | holder.imageView=(ImageView)convertView.findViewById(R.id.g_pic);
131 | holder.imageView2=(ImageView)convertView.findViewById(R.id.user_icon);
132 |
133 | convertView.setTag(holder);
134 | } else {
135 | holder = (ViewHolder) convertView.getTag();
136 | }
137 |
138 | HashMap map = list.get(position);
139 | holder.gName.setText(map.get("name"));
140 | holder.tvDescribe.setText(map.get("describle"));
141 | holder.tvPrice.setText("价格:"+map.get("price"));
142 | holder.oldPrice.setText("原价:"+map.get("oldprice"));
143 | holder.username.setText(map.get("account"));
144 | holder.phone.setText("联系 :"+map.get("phone"));
145 | holder.imageView2.setImageBitmap(FragmentUtils.stringToImage(map.get("usericon")));
146 | holder.imageView.setImageBitmap(FragmentUtils.stringToImage(map.get("image")));
147 | return convertView;
148 | }
149 |
150 | private static class ViewHolder {
151 | private TextView gName;
152 | private TextView tvDescribe;
153 | private TextView tvPrice;
154 | private TextView oldPrice;
155 | private TextView username;
156 | private TextView phone;
157 | private ImageView imageView;
158 | private ImageView imageView2;
159 |
160 | }
161 | }
162 | }
163 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/main_page/HomePageFragment.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.main_page;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 | import android.os.Message;
7 | import android.support.annotation.Nullable;
8 | import android.support.v4.app.Fragment;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 | import android.widget.BaseAdapter;
13 | import android.widget.ImageView;
14 | import android.widget.ListView;
15 | import android.widget.TextView;
16 |
17 | import com.tm.mywechat.FragmentUtils;
18 | import com.tm.mywechat.ListActivity;
19 | import com.tm.mywechat.R;
20 | import com.tm.mywechat.http.Constant;
21 | import com.tm.mywechat.http.HttpPostTask;
22 | import com.tm.mywechat.http.bean.CommonRequest;
23 | import com.tm.mywechat.http.bean.CommonResponse;
24 | import com.tm.mywechat.http.interf.ResponseHandler;
25 | import com.tm.mywechat.util.LoadingDialogUtil;
26 |
27 | import java.util.ArrayList;
28 | import java.util.HashMap;
29 |
30 | /**
31 | * Created by Administrator on 2017/1/10.
32 | */
33 | public class HomePageFragment extends Fragment {
34 | private String URL_PRODUCT = "http://192.168.43.165:8080/MyWorld_Service/ProductServlet";
35 | private ListView lvProduct;
36 |
37 | @Nullable
38 | @Override
39 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
40 | View view = inflater.inflate(R.layout.home_page_activity,container,false);
41 | lvProduct = (ListView)view.findViewById(R.id.lv1);
42 |
43 |
44 | getListData();
45 | return view;
46 | }
47 |
48 | protected void sendHttpPostRequest(String url, CommonRequest request, ResponseHandler responseHandler, boolean showLoadingDialog) {
49 | new HttpPostTask(request, mHandler, responseHandler).execute(url);
50 | if(showLoadingDialog) {
51 | // LoadingDialogUtil.showLoadingDialog(BaseActivity.this);
52 | }
53 | }
54 |
55 | protected Handler mHandler = new Handler(){
56 | @Override
57 | public void handleMessage(Message msg) {
58 | super.handleMessage(msg);
59 |
60 | if(msg.what == Constant.HANDLER_HTTP_SEND_FAIL) {
61 | // LogUtil.logErr(msg.obj.toString());
62 |
63 | // LoadingDialogUtil.cancelLoading();
64 | // DialogUtil.showHintDialog(BaseActivity.this, "请求发送失败,请重试", true);
65 | } else if (msg.what == Constant.HANDLER_HTTP_RECEIVE_FAIL) {
66 | // LogUtil.logErr(msg.obj.toString());
67 |
68 | //LoadingDialogUtil.cancelLoading();
69 | // DialogUtil.showHintDialog(BaseActivity.this, "请求接受失败,请重试", true);
70 | }
71 | }
72 | };
73 |
74 | /* private void getListData() {
75 | CommonRequest request = new CommonRequest();
76 | request.addRequestParam("opt2","3");
77 | request.addRequestParam("opt","2");
78 | ListActivity listActivity= new ListActivity();
79 | listActivity.senHTTP2(request,lvProduct);
80 | }*/
81 |
82 | private void getListData() {
83 | CommonRequest request = new CommonRequest();
84 | request.addRequestParam("opt2","3");
85 | request.addRequestParam("opt","2");
86 | sendHttpPostRequest(URL_PRODUCT, request, new ResponseHandler() {
87 | @Override
88 | public void success(CommonResponse response) {
89 | LoadingDialogUtil.cancelLoading();
90 |
91 | if (response.getDataList().size() > 0) {
92 | ProductAdapter adapter = new ProductAdapter(getContext(), response.getDataList());
93 | lvProduct.setAdapter(adapter);
94 | } else {
95 | //DialogUtil.showHintDialog(ListActivity.this, "列表数据为空", true);
96 | }
97 | }
98 |
99 | @Override
100 | public void fail(String failCode, String failMsg) {
101 | LoadingDialogUtil.cancelLoading();
102 | }
103 | }, true);
104 | }
105 |
106 | static class ProductAdapter extends BaseAdapter {
107 | private Context context;
108 | private ArrayList> list;
109 |
110 | public ProductAdapter(Context context, ArrayList> list) {
111 | this.context = context;
112 | this.list = list;
113 | }
114 |
115 | @Override
116 | public int getCount() {
117 | return list.size();
118 | }
119 |
120 | @Override
121 | public Object getItem(int position) {
122 | return list.get(position);
123 | }
124 |
125 | @Override
126 | public long getItemId(int position) {
127 | return position;
128 | }
129 |
130 | @Override
131 | public View getView(int position, View convertView, ViewGroup parent) {
132 | ProductAdapter.ViewHolder holder;
133 | if (convertView == null) {
134 | convertView = LayoutInflater.from(context).inflate(R.layout.goods_view, parent, false);
135 | holder = new ProductAdapter.ViewHolder();
136 | holder.gName = (TextView) convertView.findViewById(R.id.g_name);
137 | holder.tvDescribe = (TextView) convertView.findViewById(R.id.desc);
138 | holder.tvPrice = (TextView) convertView.findViewById(R.id.price);
139 | holder.oldPrice=(TextView) convertView.findViewById(R.id.oldprice);
140 | holder.username=(TextView) convertView.findViewById(R.id.user_name);
141 | holder.imageView=(ImageView)convertView.findViewById(R.id.g_pic);
142 | holder.imageView2=(ImageView)convertView.findViewById(R.id.user_icon);
143 |
144 | convertView.setTag(holder);
145 | } else {
146 | holder = (ProductAdapter.ViewHolder) convertView.getTag();
147 | }
148 |
149 | HashMap map = list.get(position);
150 | holder.gName.setText(map.get("name"));
151 | holder.tvDescribe.setText(map.get("describle"));
152 | holder.tvPrice.setText("价格:"+map.get("price"));
153 | holder.oldPrice.setText("原价:"+map.get("oldprice"));
154 | holder.username.setText(map.get("account"));
155 | holder.imageView2.setImageBitmap(FragmentUtils.stringToImage(map.get("usericon")));
156 | holder.imageView.setImageBitmap(FragmentUtils.stringToImage(map.get("image")));
157 | return convertView;
158 | }
159 |
160 | private static class ViewHolder {
161 | private TextView gName;
162 | private TextView tvDescribe;
163 | private TextView tvPrice;
164 | private TextView oldPrice;
165 | private TextView username;
166 | private ImageView imageView;
167 | private ImageView imageView2;
168 | }
169 | }
170 |
171 |
172 |
173 | }
174 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/Register.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.content.ContentResolver;
4 | import android.content.Intent;
5 | import android.content.res.Resources;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.graphics.drawable.BitmapDrawable;
9 | import android.graphics.drawable.Drawable;
10 | import android.net.Uri;
11 | import android.os.Bundle;
12 | import android.view.View;
13 | import android.widget.Button;
14 | import android.widget.EditText;
15 | import android.widget.ImageView;
16 | import android.widget.Toast;
17 |
18 | import com.tm.mywechat.http.bean.CommonRequest;
19 | import com.tm.mywechat.http.bean.CommonResponse;
20 | import com.tm.mywechat.http.interf.ResponseHandler;
21 | import com.tm.mywechat.main_page.AddFragment;
22 | import com.tm.mywechat.main_page.MyMainActivity;
23 | import com.tm.mywechat.util.LoadingDialogUtil;
24 |
25 | import java.io.FileNotFoundException;
26 |
27 | import static android.R.attr.bitmap;
28 | import static com.tm.mywechat.FragmentUtils.bitmapToString;
29 |
30 | /**
31 | * Created by SJL on 2017/6/11.
32 | */
33 |
34 | public class Register extends BaseActivity {
35 | ImageView imageView;
36 | private static final int PICK_ALBUM = 1;
37 | private String userbitmap;
38 | private Bitmap userImg;
39 | private String URL_REGISTER = "http://192.168.43.165:8080/MyWorld_Service/RegisterServlet";
40 | private String icon;
41 | private static String icon1;
42 |
43 | @Override
44 | protected void onCreate(Bundle savedInstanceState) {
45 | super.onCreate(savedInstanceState);
46 | setContentView(R.layout.register_activity);
47 |
48 | final EditText etName = (EditText) findViewById(R.id.et_zh);
49 | final EditText etPassword = (EditText) findViewById(R.id.et_mima);
50 | final EditText etnickname = (EditText) findViewById(R.id.et_nickname);
51 | final EditText etphone = (EditText) findViewById(R.id.et_phone);
52 | final EditText etaddress=(EditText)findViewById(R.id.et_address);
53 |
54 |
55 | Resources res=this.getResources();
56 | Drawable drawable=res.getDrawable(R.drawable.user);
57 | Drawable drawable1=res.getDrawable(R.drawable.pic2);
58 | BitmapDrawable bd=(BitmapDrawable)drawable;
59 | BitmapDrawable bd1=(BitmapDrawable)drawable1;
60 | Bitmap bm1 =bd1.getBitmap();
61 | icon1 = bitmapToString(bm1);
62 |
63 | Bitmap bm =bd.getBitmap();
64 | icon = bitmapToString(bm);
65 |
66 | imageView=(ImageView)findViewById(R.id.iv2);
67 | imageView.setOnClickListener(new View.OnClickListener(){
68 |
69 | @Override
70 | public void onClick(View v) {
71 |
72 | Intent intent = new Intent(Intent.ACTION_PICK,
73 |
74 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
75 |
76 | startActivityForResult(intent, PICK_ALBUM );
77 |
78 |
79 | }
80 |
81 |
82 | });
83 |
84 |
85 |
86 | Button btnreg = (Button) findViewById(R.id.btn_register);
87 | btnreg.setOnClickListener(new View.OnClickListener() {
88 | @Override
89 | public void onClick(View v) {
90 | register(etName.getText().toString(), etPassword.getText().toString(),etnickname.getText().toString(),etphone.getText().toString(),etaddress.getText().toString(),userbitmap);
91 | }
92 | });
93 |
94 | }
95 |
96 |
97 | public static String getIcon1()
98 | {
99 | return icon1;
100 | }
101 |
102 | @Override
103 | public void onActivityResult(int requestCode, int resultCode, Intent data) {
104 | super.onActivityResult(requestCode, resultCode, data);
105 | if (requestCode==1) {
106 | Uri uri = data.getData();
107 | ContentResolver cr = getContentResolver();
108 | try {
109 | if (userImg != null)//如果不释放的话,不断取图片,将会内存不够
110 | userImg.recycle();
111 | userImg = BitmapFactory.decodeStream(cr.openInputStream(uri));
112 | } catch (FileNotFoundException e) {
113 | // TODO Auto-generated catch block
114 | e.printStackTrace();
115 | }
116 | System.out.println("the bmp toString: " + userImg);
117 |
118 | imageView.setImageBitmap(userImg);
119 | userbitmap = bitmapToString(userImg);
120 |
121 |
122 | }
123 | }
124 |
125 |
126 | public String getIcon()
127 | {
128 | return icon;
129 |
130 | }
131 |
132 |
133 | private void register(String name, String password ,String nickname,String phone,String address,String usericon) {
134 | // final TextView tvRequest = (TextView) findViewById(R.id.tv_request);
135 | // final TextView tvResponse = (TextView) findViewById(R.id.tv_response);
136 |
137 | final CommonRequest request = new CommonRequest();
138 | request.addRequestParam("name", name);
139 | request.addRequestParam("password", password);
140 | request.addRequestParam("nickname", nickname);
141 | request.addRequestParam("phone", phone);
142 | request.addRequestParam("address",address);
143 | if(usericon==null) {
144 | String geticon=getIcon();
145 | request.addRequestParam("usericon",geticon);
146 | }
147 | else
148 | request.addRequestParam("usericon",usericon);
149 | request.addRequestParam("opt","1");
150 | request.addRequestParam("opt2","1");
151 | sendHttpPostRequest(URL_REGISTER, request, new ResponseHandler() {
152 | @Override
153 | public void success(CommonResponse response) {
154 | Toast.makeText(Register.this,"注册成功",Toast.LENGTH_LONG).show();
155 | // LoadingDialogUtil.cancelLoading();
156 | /*tvRequest.setText(request.getJsonStr());
157 | tvResponse.setText(response.getResCode() + "\n" + response.getResMsg());*/
158 | //DialogUtil.showHintDialog(MainActivity.this, "登陆成功啦!", false);
159 | Intent intent=new Intent(Register.this, Login.class);
160 | startActivity(intent);
161 |
162 | }
163 |
164 | @Override
165 | public void fail(String failCode, String failMsg) {
166 | if("100".equals(failCode))
167 | Toast.makeText(Register.this,"该用户名已经被注册",Toast.LENGTH_LONG).show();
168 | else
169 | Toast.makeText(Register.this,"注册成功",Toast.LENGTH_LONG).show();
170 | /* tvRequest.setText(request.getJsonStr());
171 | tvResponse.setText(failCode + "\n" + failMsg);
172 | DialogUtil.showHintDialog(MainActivity.this, true, "登陆失败", failCode + " : " + failMsg, "关闭对话框", new View.OnClickListener() {
173 | @Override
174 | public void onClick(View v) {
175 | LoadingDialogUtil.cancelLoading();
176 | DialogUtil.dismissDialog();
177 | }
178 | });*/
179 | }
180 | }, true);
181 |
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/main_page/ClassifyFragment.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat.main_page;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.support.annotation.Nullable;
6 | import android.support.v4.app.Fragment;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.RelativeLayout;
11 |
12 | import com.tm.mywechat.ListActivity;
13 | import com.tm.mywechat.R;
14 |
15 | /**
16 | * Created by Administrator on 2017/1/10.
17 | */
18 | public class ClassifyFragment extends Fragment{
19 | @Nullable
20 | @Override
21 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
22 |
23 | View view = inflater.inflate(R.layout.classify_activity,container,false);
24 | RelativeLayout tp1=(RelativeLayout)view.findViewById(R.id.tp1);
25 | RelativeLayout tp2=(RelativeLayout)view.findViewById(R.id.tp2);
26 | RelativeLayout tp3=(RelativeLayout)view.findViewById(R.id.tp3);
27 | RelativeLayout tp4=(RelativeLayout)view.findViewById(R.id.tp4);
28 | RelativeLayout tp5=(RelativeLayout)view.findViewById(R.id.tp5);
29 | RelativeLayout tp6=(RelativeLayout)view.findViewById(R.id.tp6);
30 | RelativeLayout tp7=(RelativeLayout)view.findViewById(R.id.tp7);
31 | RelativeLayout tp8=(RelativeLayout)view.findViewById(R.id.tp8);
32 |
33 | myOnclick myOnclick = new myOnclick();
34 |
35 | tp1.setOnClickListener(myOnclick);
36 | tp2.setOnClickListener(myOnclick);
37 | tp3.setOnClickListener(myOnclick);
38 | tp4.setOnClickListener(myOnclick);
39 | tp5.setOnClickListener(myOnclick);
40 | tp6.setOnClickListener(myOnclick);
41 | tp7.setOnClickListener(myOnclick);
42 | tp8.setOnClickListener(myOnclick);
43 |
44 |
45 |
46 | return view;
47 | }
48 |
49 | public class myOnclick implements View.OnClickListener {
50 | @Override
51 | public void onClick(View v) {
52 | Intent intent = new Intent();
53 | Bundle bundle = new Bundle();
54 | switch (v.getId()) {
55 | case R.id.tp1:
56 |
57 | intent.setClass(getActivity(), ListActivity.class);
58 | bundle.putString("分类名", "校园代步");
59 | bundle.putString("分类ID", "1");
60 | intent.putExtras(bundle);
61 | startActivity(intent);
62 | break;
63 | case R.id.tp2:
64 |
65 | intent.setClass(getActivity(), ListActivity.class);
66 | bundle.putString("分类名", "数码");
67 | bundle.putString("分类ID", "2");
68 | intent.putExtras(bundle);
69 | startActivity(intent);
70 | break;
71 | case R.id.tp3:
72 | intent.setClass(getActivity(), ListActivity.class);
73 | bundle.putString("分类名", "电脑");
74 | bundle.putString("分类ID", "3");
75 | intent.putExtras(bundle);
76 | startActivity(intent);
77 | break;
78 | case R.id.tp4:
79 | intent.setClass(getActivity(), ListActivity.class);
80 | bundle.putString("分类名", "数码配件");
81 | bundle.putString("分类ID", "4");
82 | intent.putExtras(bundle);
83 | startActivity(intent);
84 | break;
85 | case R.id.tp5:
86 | intent.setClass(getActivity(), ListActivity.class);
87 | bundle.putString("分类名", "图书教材");
88 | bundle.putString("分类ID", "5");
89 | intent.putExtras(bundle);
90 | startActivity(intent);
91 | break;
92 | case R.id.tp6:
93 | intent.setClass(getActivity(), ListActivity.class);
94 | bundle.putString("分类名", "运动健身");
95 | bundle.putString("分类ID", "6");
96 | intent.putExtras(bundle);
97 | startActivity(intent);
98 | break;
99 | case R.id.tp7:
100 | intent.setClass(getActivity(), ListActivity.class);
101 | bundle.putString("分类名", "电器");
102 | bundle.putString("分类ID", "7");
103 | intent.putExtras(bundle);
104 | startActivity(intent);
105 | break;
106 | case R.id.tp8:
107 | intent.setClass(getActivity(), ListActivity.class);
108 | bundle.putString("分类名", "校园网");
109 | bundle.putString("分类ID", "8");
110 | intent.putExtras(bundle);
111 | startActivity(intent);
112 | break;
113 |
114 | }
115 | }
116 | }
117 | }
118 | /*
119 | public void onClick(View v)
120 | {
121 | Intent intent = new Intent();
122 | Bundle bundle = new Bundle();
123 | switch(v.getId())
124 | {
125 | case R.id.tp1:
126 |
127 | intent.setClass(getActivity(), ListActivity.class);
128 | bundle.putString("分类名","type");
129 | bundle.putString("分类ID","1");
130 | intent.putExtras(bundle);
131 | startActivity(intent);
132 | break;
133 | case R.id.tp2:
134 |
135 | intent.setClass(getActivity(), ListActivity.class);
136 | bundle.putString("分类名","type");
137 | bundle.putString("分类ID","2");
138 | intent.putExtras(bundle);
139 | startActivity(intent);
140 | break;
141 | case R.id.tp3:
142 | intent.setClass(getActivity(), ListActivity.class);
143 | bundle.putString("分类名","type");
144 | bundle.putString("分类ID","3");
145 | intent.putExtras(bundle);
146 | startActivity(intent);
147 | break;
148 | case R.id.tp4:
149 | intent.setClass(getActivity(), ListActivity.class);
150 | bundle.putString("分类名","数码配件");
151 | bundle.putString("分类ID","4");
152 | intent.putExtras(bundle);
153 | startActivity(intent);
154 | break;
155 | case R.id.tp5:
156 | intent.setClass(getActivity(), ListActivity.class);
157 | bundle.putString("分类名","图书教材");
158 | bundle.putString("分类ID","5");
159 | intent.putExtras(bundle);
160 | startActivity(intent);
161 | break;
162 | case R.id.tp6:
163 | intent.setClass(getActivity(), ListActivity.class);
164 | bundle.putString("分类名","运动健身");
165 | bundle.putString("分类ID","6");
166 | intent.putExtras(bundle);
167 | startActivity(intent);
168 | break;
169 | case R.id.tp7:
170 | intent.setClass(getActivity(), ListActivity.class);
171 | bundle.putString("分类名","电器");
172 | bundle.putString("分类ID","7");
173 | intent.putExtras(bundle);
174 | startActivity(intent);
175 | break;
176 | case R.id.tp8:
177 | intent.setClass(getActivity(), ListActivity.class);
178 | bundle.putString("分类名","校园网");
179 | bundle.putString("分类ID","8");
180 | intent.putExtras(bundle);
181 | startActivity(intent);
182 | break;
183 |
184 | }
185 | }*/
186 |
187 |
188 |
189 |
--------------------------------------------------------------------------------
/MyWeChat/app/src/main/java/com/tm/mywechat/UpdateUser.java:
--------------------------------------------------------------------------------
1 | package com.tm.mywechat;
2 |
3 | import android.app.Activity;
4 | import android.content.ContentResolver;
5 | import android.content.Intent;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.net.Uri;
9 | import android.os.Bundle;
10 | import android.util.Log;
11 | import android.view.View;
12 | import android.widget.Button;
13 | import android.widget.EditText;
14 | import android.widget.ImageView;
15 | import android.widget.Toast;
16 |
17 | import com.tm.mywechat.http.bean.CommonRequest;
18 | import com.tm.mywechat.http.bean.CommonResponse;
19 | import com.tm.mywechat.http.interf.ResponseHandler;
20 | import com.tm.mywechat.main_page.HomePageFragment;
21 | import com.tm.mywechat.main_page.MineFragment;
22 | import com.tm.mywechat.util.DialogUtil;
23 | import com.tm.mywechat.util.LoadingDialogUtil;
24 |
25 | import org.json.JSONException;
26 | import org.json.JSONObject;
27 |
28 | import java.io.FileNotFoundException;
29 | import java.util.HashMap;
30 | import java.util.Iterator;
31 |
32 | import static com.tm.mywechat.FragmentUtils.bitmapToString;
33 |
34 | /**
35 | * Created by SJL on 2017/6/11.
36 | */
37 |
38 | public class UpdateUser extends BaseActivity {
39 | ImageView imageView;
40 | private static final int PICK_ALBUM = 1;
41 | private String userbitmap;
42 | private Bitmap userImg;
43 | private String URL_REGISTER = "http://192.168.43.165:8080/MyWorld_Service/RegisterServlet";
44 | private EditText etPassword;
45 | private EditText etnickname;
46 | private EditText etphone;
47 | private EditText etaddress;
48 | private String nickname;
49 | private String phone;
50 | private String address;
51 | private String image;
52 |
53 |
54 | @Override
55 | protected void onCreate(Bundle savedInstanceState) {
56 | super.onCreate(savedInstanceState);
57 | setContentView(R.layout.updateuser);
58 |
59 | EditText etName = (EditText) findViewById(R.id.et_zh);
60 | etPassword = (EditText) findViewById(R.id.et_mima);
61 | etnickname = (EditText) findViewById(R.id.et_nickname);
62 | etphone = (EditText) findViewById(R.id.et_phone);
63 | etaddress = (EditText)findViewById(R.id.et_address);
64 |
65 | getData();
66 |
67 |
68 | imageView=(ImageView)findViewById(R.id.iv2);
69 | imageView.setOnClickListener(new View.OnClickListener(){
70 |
71 | @Override
72 | public void onClick(View v) {
73 |
74 | Intent intent = new Intent(Intent.ACTION_PICK,
75 |
76 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
77 |
78 | startActivityForResult(intent, PICK_ALBUM );
79 |
80 |
81 | }
82 |
83 |
84 | });
85 |
86 |
87 |
88 | Button change = (Button) findViewById(R.id.btn_change);
89 | change.setOnClickListener(new View.OnClickListener() {
90 | @Override
91 | public void onClick(View v) {
92 | changem( etnickname.getText().toString(), etphone.getText().toString(), etaddress.getText().toString(),userbitmap);
93 | }
94 | });
95 |
96 | }
97 |
98 |
99 | @Override
100 | public void onActivityResult(int requestCode, int resultCode, Intent data) {
101 | super.onActivityResult(requestCode, resultCode, data);
102 | if (requestCode==1) {
103 | Uri uri = data.getData();
104 | ContentResolver cr = getContentResolver();
105 | try {
106 | if (userImg != null)//如果不释放的话,不断取图片,将会内存不够
107 | userImg.recycle();
108 | userImg = BitmapFactory.decodeStream(cr.openInputStream(uri));
109 | } catch (FileNotFoundException e) {
110 | // TODO Auto-generated catch block
111 | e.printStackTrace();
112 | }
113 | System.out.println("the bmp toString: " + userImg);
114 |
115 | imageView.setImageBitmap(userImg);
116 | userbitmap = bitmapToString(userImg);
117 |
118 |
119 | }
120 | }
121 |
122 |
123 | private void changem(String nickname,String phone,String address,String usericon) {
124 | // final TextView tvRequest = (TextView) findViewById(R.id.tv_request);
125 | // final TextView tvResponse = (TextView) findViewById(R.id.tv_response);
126 |
127 | final CommonRequest request = new CommonRequest();
128 | //request.addRequestParam("password", password);
129 | request.addRequestParam("nickname", nickname);
130 | request.addRequestParam("phone", phone);
131 | request.addRequestParam("address",address);
132 | if(usericon==null)
133 | request.addRequestParam("usericon",image);
134 | else
135 | request.addRequestParam("usericon",usericon);
136 | request.addRequestParam("opt2","2");
137 | request.addRequestParam("opt","1");
138 | request.addRequestParam("name",Login.getAccount());
139 | sendHttpPostRequest(URL_REGISTER, request, new ResponseHandler() {
140 | @Override
141 | public void success(CommonResponse response) {
142 | LoadingDialogUtil.cancelLoading();
143 | Toast.makeText(UpdateUser.this,"修改成功",Toast.LENGTH_LONG).show();
144 | finish();
145 | /*tvRequest.setText(request.getJsonStr());
146 | tvResponse.setText(response.getResCode() + "\n" + response.getResMsg());*/
147 | //DialogUtil.showHintDialog(UpdateUser.this, "修改成功!", false);
148 |
149 |
150 | }
151 |
152 | @Override
153 | public void fail(String failCode, String failMsg) {
154 | Toast.makeText(UpdateUser.this,"修改成功",Toast.LENGTH_LONG).show();
155 | finish();
156 | /* DialogUtil.showHintDialog(UpdateUser.this, true, "修改失败", failCode + " : " + failMsg, "关闭对话框", new View.OnClickListener() {
157 | @Override
158 | public void onClick(View v) {
159 | LoadingDialogUtil.cancelLoading();
160 | DialogUtil.dismissDialog();
161 | }
162 | });*/
163 | }
164 | }, true);
165 |
166 | }
167 |
168 |
169 | private void getData() {
170 | CommonRequest request = new CommonRequest();
171 | request.addRequestParam("opt","2");
172 | request.addRequestParam("name",Login.getAccount());
173 | sendHttpPostRequest(URL_REGISTER, request, new ResponseHandler() {
174 | @Override
175 | public void success(CommonResponse response) {
176 | LoadingDialogUtil.cancelLoading();
177 |
178 |
179 | String jsonString=response.getjsonString();
180 | setText(jsonString);
181 | Log.d("kllkklkllkll","h");
182 |
183 | /*if (response.getDataList().size() > 0) {
184 | HomePageFragment.ProductAdapter adapter = new HomePageFragment.ProductAdapter(getContext(), response.getDataList());
185 | lvProduct.setAdapter(adapter);
186 | } else {
187 | //DialogUtil.showHintDialog(ListActivity.this, "列表数据为空", true);
188 | }*/
189 | }
190 |
191 | @Override
192 | public void fail(String failCode, String failMsg) {
193 |
194 | LoadingDialogUtil.cancelLoading();
195 | }
196 | }, true);
197 | }
198 |
199 | public void setText(String string)
200 | {
201 |
202 | //HashMap data = new HashMap();
203 | // 将json字符串转换成jsonObject
204 | try {
205 | JSONObject jsonObject = new JSONObject(string);
206 | nickname=jsonObject.getString("nickname");
207 | phone=jsonObject.getString("phone");
208 | address=jsonObject.getString("address");
209 | image=jsonObject.getString("usericon");
210 | /* Iterator it = jsonObject.keys();
211 | // 遍历jsonObject数据,添加到Map对象
212 | while (it.hasNext())
213 | {
214 | String key = String.valueOf(it.next());
215 | String value = (String) jsonObject.get(key);
216 | data.put(key, value);
217 | }*/
218 | }catch (JSONException e)
219 | {
220 |
221 | }
222 |
223 |
224 | // etPassword.setText(jsonObject.getString("nickname"));
225 |
226 | // etPassword.setText(data.get("password"));
227 |
228 | etnickname.setText(nickname);
229 | etphone.setText(phone);
230 | etaddress.setText(address);
231 | imageView.setImageBitmap(FragmentUtils.stringToImage(image));
232 |
233 |
234 |
235 | }
236 |
237 | }
238 |
--------------------------------------------------------------------------------