├── .gitignore ├── LICENSE ├── NineGridView-master ├── .gitignore ├── README.md ├── app │ ├── .gitignore │ ├── build.gradle │ ├── libs │ │ ├── AMap2DMap_5.2.0_AMapSearch_5.7.0_AMapLocation_3.7.0_20171229.jar │ │ └── GsonFormat.jar │ ├── proguard-rules.pro │ ├── release │ │ └── output.json │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-web.png │ │ ├── java │ │ └── cn │ │ │ └── edu │ │ │ └── heuet │ │ │ └── littlecurl │ │ │ └── qzone │ │ │ ├── App.java │ │ │ ├── LauncherActivity.java │ │ │ ├── activity │ │ │ └── QZoneActivity.java │ │ │ ├── adapter │ │ │ └── RecyclerVidewAdapter.java │ │ │ ├── bean │ │ │ ├── Location.java │ │ │ ├── MyMedia.java │ │ │ └── RecyclerViewItem.java │ │ │ └── ui │ │ │ ├── CircleImageView.java │ │ │ └── ExpandListView.java │ │ └── res │ │ ├── drawable │ │ ├── background_white_round.xml │ │ ├── event_di.9.png │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_qzone.xml │ │ └── item_recyclerview.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── event_comment.png │ │ ├── event_favour.png │ │ ├── feed_more.png │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ ├── ic_launcher_round.png │ │ ├── icon_emoji.png │ │ ├── locationtwo.png │ │ ├── sale_icon_star.png │ │ ├── see.png │ │ ├── share.png │ │ ├── triangle.png │ │ └── triangletwo.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── values-w820dp │ │ ├── dimens.xml │ │ └── values.xml │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── network_security_config.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── ninegridview │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── cn │ │ │ └── edu │ │ │ └── heuet │ │ │ └── littlecurl │ │ │ └── ninegridview │ │ │ ├── base │ │ │ └── NineGridViewAdapter.java │ │ │ ├── bean │ │ │ └── NineGridItem.java │ │ │ ├── detail │ │ │ ├── NineGridItemDetailActivity.java │ │ │ ├── SpaceItemDecoration.java │ │ │ └── ViewPager2Adapter.java │ │ │ └── preview │ │ │ ├── NineGridItemWrapperView.java │ │ │ └── NineGridViewGroup.java │ │ └── res │ │ ├── drawable │ │ ├── ic_default_color.xml │ │ └── ic_default_img.xml │ │ ├── layout │ │ ├── activity_ninegrid_itemdetail.xml │ │ └── item_ninegrid.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ └── strings.xml └── settings.gradle ├── README.md └── image ├── 1573992043854.png ├── 1573992214487.png ├── 1573992259378.png ├── 1573993820069.png ├── 1573996205651.png ├── 1573996347984.png ├── 1574087351451.png ├── 1574087619014.png ├── 1574088727753.png ├── 1574088971183.png ├── NineGridView2.gif ├── catalog.png ├── danshoutuosai.png ├── danshouyanmian.png ├── dianzan.png ├── haixiu.png ├── image20191130124258942.jpg ├── ku.png ├── partone.png ├── parttwo.png ├── penxue.png ├── process.jpg ├── sahua.png ├── shuangshouwuyan.png ├── tanshouwunai.png ├── wushanxiao.png ├── xidatui.gif └── yiwen.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # IntelliJ 36 | *.iml 37 | .idea/workspace.xml 38 | .idea/tasks.xml 39 | .idea/gradle.xml 40 | .idea/assetWizardSettings.xml 41 | .idea/dictionaries 42 | .idea/libraries 43 | .idea/caches 44 | 45 | # Keystore files 46 | # Uncomment the following line if you do not want to check your keystore files in. 47 | #*.jks 48 | 49 | # External native build folder generated in Android Studio 2.2 and later 50 | .externalNativeBuild 51 | 52 | # Google Services (e.g. APIs or Firebase) 53 | google-services.json 54 | 55 | # Freeline 56 | freeline.py 57 | freeline/ 58 | freeline_project_description.json 59 | 60 | # fastlane 61 | fastlane/report.xml 62 | fastlane/Preview.html 63 | fastlane/screenshots 64 | fastlane/test_output 65 | fastlane/readme.md 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 LittleCurl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NineGridView-master/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea 4 | /local.properties 5 | .DS_Store 6 | /build 7 | /captures 8 | /screenshots -------------------------------------------------------------------------------- /NineGridView-master/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littlecurl/NineGridView/a6d156cdb0b087034df443c42ef28227117593fb/NineGridView-master/README.md -------------------------------------------------------------------------------- /NineGridView-master/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /NineGridView-master/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 23 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | javaCompileOptions { 14 | annotationProcessorOptions { 15 | includeCompileClasspath true 16 | } 17 | } 18 | 19 | multiDexEnabled true 20 | } 21 | buildTypes { 22 | release { 23 | minifyEnabled false 24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | compileOptions { 28 | sourceCompatibility JavaVersion.VERSION_1_8 29 | targetCompatibility JavaVersion.VERSION_1_8 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation fileTree(include: ['*.jar'], dir: 'libs') 35 | // 配合上面配置的 multiDexEnabled true,还有一点在Application继承上 36 | // App extends MultiDexApplication 37 | implementation 'com.android.support:multidex:1.0.3' 38 | // 基本组件库 39 | implementation 'androidx.appcompat:appcompat:1.1.0' 40 | // 约束性布局 41 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3' 42 | // SwipeRefreshLayout下拉刷新 43 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 44 | // Grid网格布局 45 | implementation 'androidx.gridlayout:gridlayout:1.0.0' 46 | // Glide图片加载 47 | implementation 'com.github.bumptech.glide:glide:4.10.0' 48 | // OkHttp加载网络H 49 | implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.2.2' 50 | // FastJson解析Json 51 | implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.62' 52 | // 九宫格控件 53 | implementation project(':ninegridview') 54 | // RecyclerView 55 | implementation 'androidx.recyclerview:recyclerview:1.1.0' 56 | } 57 | -------------------------------------------------------------------------------- /NineGridView-master/app/libs/AMap2DMap_5.2.0_AMapSearch_5.7.0_AMapLocation_3.7.0_20171229.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littlecurl/NineGridView/a6d156cdb0b087034df443c42ef28227117593fb/NineGridView-master/app/libs/AMap2DMap_5.2.0_AMapSearch_5.7.0_AMapLocation_3.7.0_20171229.jar -------------------------------------------------------------------------------- /NineGridView-master/app/libs/GsonFormat.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littlecurl/NineGridView/a6d156cdb0b087034df443c42ef28227117593fb/NineGridView-master/app/libs/GsonFormat.jar -------------------------------------------------------------------------------- /NineGridView-master/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 E:\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 | -------------------------------------------------------------------------------- /NineGridView-master/app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littlecurl/NineGridView/a6d156cdb0b087034df443c42ef28227117593fb/NineGridView-master/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/App.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.graphics.Bitmap; 6 | import android.widget.ImageView; 7 | 8 | import androidx.multidex.MultiDexApplication; 9 | 10 | import com.bumptech.glide.Glide; 11 | import com.bumptech.glide.load.engine.DiskCacheStrategy; 12 | 13 | import cn.edu.heuet.littlecurl.ninegridview.preview.NineGridViewGroup; 14 | 15 | /** 16 | * 此类继承自Application 17 | * 一般Application的作用就是在App启动的时候, 18 | * 加载那些只需要加载一次的东西 19 | * 比如:图片加载器 20 | * 该类需要在AndroidManifest.xml文件中进行配置 21 | * android:name=".App" 22 | */ 23 | public class App extends MultiDexApplication { 24 | @Override 25 | public void onCreate() { 26 | super.onCreate(); 27 | setImageLoader(); 28 | } 29 | 30 | private void setImageLoader() { 31 | NineGridViewGroup.setImageLoader(new GlideImageLoader()); 32 | } 33 | 34 | /** 35 | * Glide 加载图片 36 | */ 37 | private class GlideImageLoader implements NineGridViewGroup.ImageLoader { 38 | GlideImageLoader() { 39 | } 40 | 41 | @Override 42 | public void onDisplayImage(Context context, ImageView imageView, String url) { 43 | Glide.with(context) 44 | .load(url) 45 | .placeholder(R.drawable.ic_default_color) // 图片未加载时的占位图或背景色 46 | .error(R.drawable.ic_default_color) // 图片加载失败时显示的图或背景色 47 | .diskCacheStrategy(DiskCacheStrategy.ALL) // 开启本地缓存 48 | .into(imageView); 49 | } 50 | 51 | @Override 52 | public Bitmap getCacheImage(String url) { 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/LauncherActivity.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.view.View; 6 | import android.widget.Button; 7 | 8 | import androidx.appcompat.app.AppCompatActivity; 9 | 10 | import cn.edu.heuet.littlecurl.qzone.activity.QZoneActivity; 11 | 12 | /** 13 | * 这个类主要就是为了跳转页面 14 | */ 15 | public class LauncherActivity extends AppCompatActivity { 16 | 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | setContentView(R.layout.activity_main); 21 | 22 | // 设置Button点击事件 23 | initButtonAndListener(); 24 | } 25 | 26 | private void initButtonAndListener() { 27 | Button button = findViewById(R.id.button); 28 | button.setOnClickListener(new View.OnClickListener() { 29 | @Override 30 | public void onClick(View v) { 31 | startActivity(new Intent(LauncherActivity.this, QZoneActivity.class)); 32 | } 33 | }); 34 | 35 | } 36 | } -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/activity/QZoneActivity.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.activity; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import androidx.recyclerview.widget.LinearLayoutManager; 7 | import androidx.recyclerview.widget.RecyclerView; 8 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; 9 | 10 | import java.util.ArrayList; 11 | import java.util.Collections; 12 | 13 | import cn.edu.heuet.littlecurl.qzone.R; 14 | import cn.edu.heuet.littlecurl.qzone.adapter.RecyclerVidewAdapter; 15 | import cn.edu.heuet.littlecurl.qzone.bean.Location; 16 | import cn.edu.heuet.littlecurl.qzone.bean.MyMedia; 17 | import cn.edu.heuet.littlecurl.qzone.bean.RecyclerViewItem; 18 | 19 | /** 20 | * 从 activity_qzone.xml 布局文件中可以看出来 21 | * 一个下拉刷新组件SwipeRefreshLayout里面套一个RecyclerView 22 | * 所以此类的作用就是获取数据(我自己手写的) 23 | * 然后将数据给到RecyclerView的适配器 24 | */ 25 | public class QZoneActivity extends AppCompatActivity 26 | implements SwipeRefreshLayout.OnRefreshListener { 27 | 28 | // Log打印的通用Tag 29 | private final String TAG = "QZoneActivity:"; 30 | 31 | // 下拉刷新控件 32 | SwipeRefreshLayout swipeRefreshLayout; 33 | 34 | // 数据展示 35 | RecyclerView recyclerView; 36 | 37 | public RecyclerVidewAdapter recyclerViewAdapter; 38 | private ArrayList recyclerViewItemList = new ArrayList<>(); 39 | 40 | @Override 41 | protected void onCreate(Bundle savedInstanceState) { 42 | super.onCreate(savedInstanceState); 43 | setContentView(R.layout.activity_qzone); 44 | // 初始化布局 45 | initView(); 46 | // 自定义数据 47 | loadMyTestDate(); 48 | } 49 | 50 | private void initView(){ 51 | recyclerView = findViewById(R.id.recyclerView); 52 | // 布局管理器必须有,否则不显示布局 53 | // No layout manager attached; skipping layout 54 | LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); 55 | linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); 56 | recyclerView.setLayoutManager(linearLayoutManager); 57 | 58 | // RecyclerView适配器 59 | recyclerViewAdapter = new RecyclerVidewAdapter(this, recyclerViewItemList); 60 | recyclerView.setAdapter(recyclerViewAdapter); 61 | 62 | // 下拉刷新控件 63 | // 因为该类 implements SwipeRefreshLayout.OnRefreshListener 64 | // 所以只需要在onCreate里注册一下监听器,具体的响应事件可以写到onCreate方法之外 65 | swipeRefreshLayout = findViewById(R.id.swipe_refresh_layout); 66 | swipeRefreshLayout.setOnRefreshListener(this); 67 | } 68 | 69 | // 自定义的测试数据(假装这是网络请求并解析后的数据) 70 | private void loadMyTestDate() { 71 | // 先构造MyMedia 72 | String imgUrl1 = "https://i0.hdslb.com/bfs/album/0b6e13b1028b9a7426990034488b4af04b54c719.png"; 73 | String imgUrl2 = "https://i0.hdslb.com/bfs/album/7db905515628e6c18d8a61f4369a505f1ab0dec2.jpg"; 74 | String imgUrl3 = "https://i0.hdslb.com/bfs/album/f26eba49f3a8c8fc394f629aba27c7e1da812698.png"; 75 | // 视频内容:敲架子鼓 76 | String videoUrl1 = "http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"; 77 | // 视频内容:感受到鸭力 78 | String videoUrl2 = "http://gslb.miaopai.com/stream/w95S1LIlrb4Hi4zGbAtC4TYx0ta4BVKr-PXjuw__.mp4?vend=miaopai&ssig=8f20ca2d86ec365f0f777b769184f8aa&time_stamp=1574944581588&mpflag=32&unique_id=1574940981591448"; 79 | // 视频内容:狗崽子 80 | String videoUrl4 = "http://gslb.miaopai.com/stream/7-5Q7kCzeec9tu~9XvZAxNizNAL1TJC7KtJCuw__.mp4?vend=miaopai&ssig=82b42debfc2a51569bafe6ac7a993d89&time_stamp=1574944868488&mpflag=32&unique_id=1574940981591448"; 81 | String videoUrl3 = videoUrl4; 82 | 83 | MyMedia myMedia1 = new MyMedia(imgUrl1, videoUrl1); 84 | MyMedia myMedia2 = new MyMedia(imgUrl2); 85 | MyMedia myMedia3 = new MyMedia(imgUrl3, videoUrl2); 86 | MyMedia myMedia4 = new MyMedia(imgUrl1, videoUrl3); 87 | MyMedia myMedia5 = new MyMedia(imgUrl3, videoUrl4); 88 | // 再构造mediaList 89 | // 1张图片 90 | ArrayList mediaList1 = new ArrayList<>(); 91 | mediaList1.add(myMedia2); 92 | // 2张图片 93 | ArrayList mediaList2 = new ArrayList<>(); 94 | mediaList2.add(myMedia1); 95 | mediaList2.add(myMedia2); 96 | // 4张图片 97 | ArrayList mediaList4 = new ArrayList<>(); 98 | for (int i = 0; i < 2; i++) { 99 | mediaList4.add(myMedia1); 100 | mediaList4.add(myMedia2); 101 | } 102 | // 10张图片 103 | ArrayList mediaList10 = new ArrayList<>(); 104 | for (int i = 0; i < 2; i++) { 105 | mediaList10.add(myMedia1); 106 | mediaList10.add(myMedia2); 107 | mediaList10.add(myMedia3); 108 | mediaList10.add(myMedia4); 109 | mediaList10.add(myMedia5); 110 | } 111 | 112 | Location location = new Location(); 113 | location.setAddress("Test Address"); 114 | // 最后构造EvaluationItem 115 | final RecyclerViewItem recyclerViewItem1 = new RecyclerViewItem(mediaList1, "河北经贸大学自强社是在校学生处指导、学生资助管理中心主办下,于2008年4月15日注册成立的,一个以在校学生为主体的学生公益社团。历经十年的发展,在学生处、学生资助管理中心的大力支持下,在每一届自强人的团结努力下,自强社已经由成... ", "2019-11-02", 116 | "10080", "自强社", location, imgUrl1); 117 | final RecyclerViewItem recyclerViewItem2 = new RecyclerViewItem(mediaList2, "河北经贸大学信息技术学院成立于1996年,由原计算机系/经济信息系合并组建而成,是我校建设的第一批学院。", "2019-11-02", 118 | "10080", "信息技术学院", location, imgUrl2); 119 | final RecyclerViewItem recyclerViewItem4 = new RecyclerViewItem(mediaList4, "河北经贸大学信息技术学院成立于1996年,由原计算机系/经济信息系合并组建而成,是我校建设的第一批学院。", "2019-11-02", 120 | "10080", "信息技术学院", location, imgUrl2); 121 | final RecyclerViewItem recyclerViewItem10 = new RecyclerViewItem(mediaList10, "河北经贸大学雷雨话剧社是河北经贸大学唯一以话剧为主,兼小品,相声等多种表演艺术形式,由一批热爱表演,热爱话剧,热爱中国传统艺术与当代流行艺术结合的同学共同组成的文艺类大型社团。雷雨话剧社坚持以追求话剧“更新颖”、“更大型”、“更专业”为奋斗目标,坚持在继承传统文化和前辈的演出经验... ", "2019-11-02", 122 | "10080", "雷雨话剧社", location, imgUrl3); 123 | recyclerViewItemList.add(recyclerViewItem1); 124 | recyclerViewItemList.add(recyclerViewItem2); 125 | recyclerViewItemList.add(recyclerViewItem4); 126 | recyclerViewItemList.add(recyclerViewItem10); 127 | } 128 | 129 | @Override 130 | public void onRefresh() { 131 | // 加载数据(先清空原来的数据) 132 | recyclerViewItemList.clear(); 133 | // loadBackendData(url); 134 | loadMyTestDate(); 135 | // 打乱顺序(为了确认确实是刷新了) 136 | Collections.shuffle(recyclerViewItemList); 137 | // 通知适配器数据已经改变 138 | recyclerViewAdapter.notifyDataSetChanged(); 139 | // 下拉刷新完成 140 | if (swipeRefreshLayout.isRefreshing()) { 141 | swipeRefreshLayout.setRefreshing(false); 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/adapter/RecyclerVidewAdapter.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.adapter; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ImageView; 8 | import android.widget.TextView; 9 | import android.widget.Toast; 10 | 11 | import androidx.annotation.NonNull; 12 | import androidx.recyclerview.widget.RecyclerView; 13 | 14 | import java.util.ArrayList; 15 | import java.util.List; 16 | 17 | import cn.edu.heuet.littlecurl.ninegridview.base.NineGridViewAdapter; 18 | import cn.edu.heuet.littlecurl.ninegridview.bean.NineGridItem; 19 | import cn.edu.heuet.littlecurl.ninegridview.preview.NineGridViewGroup; 20 | import cn.edu.heuet.littlecurl.qzone.R; 21 | import cn.edu.heuet.littlecurl.qzone.bean.MyMedia; 22 | import cn.edu.heuet.littlecurl.qzone.bean.RecyclerViewItem; 23 | 24 | public class RecyclerVidewAdapter extends RecyclerView.Adapter { 25 | 26 | private Context context; 27 | private List recyclerViewItemList; 28 | 29 | public RecyclerVidewAdapter() { 30 | } 31 | 32 | /** 33 | * 接受外部传来的数据 34 | */ 35 | public RecyclerVidewAdapter(Context context, List recyclerViewItemList) { 36 | this.context = context; 37 | this.recyclerViewItemList = recyclerViewItemList; 38 | } 39 | 40 | /** 41 | * 填充视图 42 | */ 43 | @NonNull 44 | @Override 45 | public RecyclerVidewAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { 46 | View view = LayoutInflater.from(context).inflate(R.layout.item_recyclerview, parent, false); 47 | return new ViewHolder(view); 48 | } 49 | 50 | /** 51 | * 获取控件 52 | */ 53 | public class ViewHolder extends RecyclerView.ViewHolder { 54 | 55 | private final ImageView avatar; 56 | private final TextView tv_username; 57 | private final TextView tv_createTime; 58 | private final TextView tv_content; 59 | private final NineGridViewGroup nineGridViewGroup; 60 | private final TextView tv_location; 61 | private final ImageView iv_detail_triangle; 62 | private final ImageView iv_eye; 63 | private final ImageView iv_share; 64 | 65 | public ViewHolder(@NonNull View itemView) { 66 | super(itemView); 67 | // 头像 68 | avatar = itemView.findViewById(R.id.avatar); 69 | // 用户名 70 | tv_username = itemView.findViewById(R.id.tv_username); 71 | // 创建时间 72 | tv_createTime = itemView.findViewById(R.id.tv_createTime); 73 | // 内容 74 | tv_content = itemView.findViewById(R.id.tv_content); 75 | // 图片九宫格控件 76 | nineGridViewGroup = itemView.findViewById(R.id.nineGrid); 77 | // 位置 78 | tv_location = itemView.findViewById(R.id.tv_location); 79 | // 位置详情三角小图标 80 | iv_detail_triangle = itemView.findViewById(R.id.iv_detail_triangle); 81 | // 围观眼睛小图标 82 | iv_eye = itemView.findViewById(R.id.iv_eye); 83 | // 分享小图标 84 | iv_share = itemView.findViewById(R.id.iv_share); 85 | 86 | } 87 | } 88 | 89 | /** 90 | * 绑定控件 91 | */ 92 | @Override 93 | public void onBindViewHolder(@NonNull RecyclerVidewAdapter.ViewHolder holder, int position) { 94 | // 获取对应的数据 95 | RecyclerViewItem recyclerViewItem = recyclerViewItemList.get(position); 96 | 97 | // 往控件上绑定数据 98 | NineGridViewGroup.getImageLoader().onDisplayImage(context,holder.avatar,recyclerViewItem.getHeadImageUrl()); 99 | holder.tv_username.setText(recyclerViewItem.getNickName()); 100 | holder.tv_createTime.setText(recyclerViewItem.getCreateTime()); 101 | holder.tv_content.setText(recyclerViewItem.getContent()); 102 | holder.tv_location.setText(recyclerViewItem.getLocation().getAddress()); 103 | holder.iv_detail_triangle.setOnClickListener(new View.OnClickListener() { 104 | @Override 105 | public void onClick(View view) { 106 | Toast.makeText(context, "位置详情图标点击事件还未开发", Toast.LENGTH_SHORT).show(); 107 | } 108 | }); 109 | holder.iv_eye.setOnClickListener(new View.OnClickListener() { 110 | @Override 111 | public void onClick(View view) { 112 | Toast.makeText(context, "围观图标点击事件还未开发", Toast.LENGTH_SHORT).show(); 113 | } 114 | }); 115 | holder.iv_share.setOnClickListener(new View.OnClickListener() { 116 | @Override 117 | public void onClick(View view) { 118 | Toast.makeText(context, "分享图标点击事件还未开发", Toast.LENGTH_SHORT).show(); 119 | } 120 | }); 121 | 122 | // 为满足九宫格适配器数据要求,需要构造对应的List 123 | ArrayList mediaList = recyclerViewItem.getMediaList(); 124 | // 没有数据就没有九宫格 125 | if (mediaList != null && mediaList.size() > 0) { 126 | ArrayList nineGridItemList = new ArrayList<>(); 127 | for (MyMedia myMedia : mediaList) { 128 | String thumbnailUrl = myMedia.getImageUrl(); 129 | String bigImageUrl = thumbnailUrl; 130 | String videoUrl = myMedia.getVideoUrl(); 131 | nineGridItemList.add(new NineGridItem(thumbnailUrl, bigImageUrl, videoUrl)); 132 | } 133 | NineGridViewAdapter nineGridViewAdapter = new NineGridViewAdapter(nineGridItemList); 134 | holder.nineGridViewGroup.setAdapter(nineGridViewAdapter); 135 | } 136 | } 137 | 138 | @Override 139 | public int getItemCount() { 140 | return recyclerViewItemList.size(); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/bean/Location.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Location implements Serializable { 6 | private String longitude; 7 | private String latitude; 8 | private String address; 9 | private String coverImage; 10 | 11 | public String getLongitude() { 12 | return longitude; 13 | } 14 | 15 | public void setLongitude(String longitude) { 16 | this.longitude = longitude; 17 | } 18 | 19 | public String getLatitude() { 20 | return latitude; 21 | } 22 | 23 | public void setLatitude(String latitude) { 24 | this.latitude = latitude; 25 | } 26 | 27 | public String getAddress() { 28 | return address; 29 | } 30 | 31 | public void setAddress(String address) { 32 | this.address = address; 33 | } 34 | 35 | public String getCoverImage() { 36 | return coverImage; 37 | } 38 | 39 | public void setCoverImage(String coverImage) { 40 | this.coverImage = coverImage; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/bean/MyMedia.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class MyMedia implements Serializable { 6 | private String imageUrl; 7 | private String videoUrl; 8 | 9 | public MyMedia() { 10 | } 11 | 12 | public MyMedia(String imageUrl) { 13 | this.imageUrl = imageUrl; 14 | } 15 | 16 | public MyMedia(String imageUrl, String videoUrl) { 17 | this.imageUrl = imageUrl; 18 | this.videoUrl = videoUrl; 19 | } 20 | 21 | public String getImageUrl() { 22 | return imageUrl; 23 | } 24 | 25 | public void setImageUrl(String imageUrl) { 26 | this.imageUrl = imageUrl; 27 | } 28 | 29 | public String getVideoUrl() { 30 | return videoUrl; 31 | } 32 | 33 | public void setVideoUrl(String videoUrl) { 34 | this.videoUrl = videoUrl; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/bean/RecyclerViewItem.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.bean; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | 6 | public class RecyclerViewItem implements Serializable { 7 | 8 | private String content; // 内容信息 9 | private String createTime; // 时间 10 | private String channelId; // id 11 | private String nickName; // 名字 12 | private Location location; // location 13 | private String headImageUrl; // 头像 14 | private ArrayList mediaList; // 九宫格数据 15 | 16 | public RecyclerViewItem() { 17 | } 18 | 19 | public RecyclerViewItem(ArrayList mediaList, String content, String createTime, String channelId, String nickName, Location location, String headImageUrl) { 20 | this.mediaList = mediaList; 21 | this.content = content; 22 | this.createTime = createTime; 23 | this.channelId = channelId; 24 | this.nickName = nickName; 25 | this.location = location; 26 | this.headImageUrl = headImageUrl; 27 | } 28 | 29 | public ArrayList getMediaList() { 30 | return mediaList; 31 | } 32 | 33 | public void setMediaList(ArrayList mediaList) { 34 | this.mediaList = mediaList; 35 | } 36 | 37 | public String getContent() { 38 | return content; 39 | } 40 | 41 | public void setContent(String content) { 42 | this.content = content; 43 | } 44 | 45 | public String getCreateTime() { 46 | return createTime; 47 | } 48 | 49 | public void setCreateTime(String createTime) { 50 | this.createTime = createTime; 51 | } 52 | 53 | public String getChannelId() { 54 | return channelId; 55 | } 56 | 57 | public void setChannelId(String channelId) { 58 | this.channelId = channelId; 59 | } 60 | 61 | public String getNickName() { 62 | return nickName; 63 | } 64 | 65 | public void setNickName(String nickName) { 66 | this.nickName = nickName; 67 | } 68 | 69 | public Location getLocation() { 70 | return location; 71 | } 72 | 73 | public void setLocation(Location location) { 74 | this.location = location; 75 | } 76 | 77 | public String getHeadImageUrl() { 78 | return headImageUrl; 79 | } 80 | 81 | public void setHeadImageUrl(String headImageUrl) { 82 | this.headImageUrl = headImageUrl; 83 | } 84 | } -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/ui/CircleImageView.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.ui; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.graphics.Bitmap; 6 | import android.graphics.BitmapShader; 7 | import android.graphics.Canvas; 8 | import android.graphics.Color; 9 | import android.graphics.ColorFilter; 10 | import android.graphics.Matrix; 11 | import android.graphics.Paint; 12 | import android.graphics.Shader; 13 | import android.graphics.drawable.BitmapDrawable; 14 | import android.graphics.drawable.ColorDrawable; 15 | import android.graphics.drawable.Drawable; 16 | import android.net.Uri; 17 | import android.util.AttributeSet; 18 | import android.util.TypedValue; 19 | 20 | import androidx.annotation.ColorInt; 21 | import androidx.annotation.ColorRes; 22 | import androidx.annotation.DrawableRes; 23 | import androidx.appcompat.widget.AppCompatImageView; 24 | 25 | import cn.edu.heuet.littlecurl.qzone.R; 26 | 27 | public class CircleImageView extends AppCompatImageView { 28 | 29 | private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP; //只允许CENTER_CROP模式 30 | private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888; //默认创建的格式 31 | private static final int COLORDRAWABLE_DIMENSION = 2; //对于 colorDrawable 的大小 32 | 33 | //以下是自定义属性 34 | private int mBorderWidth = 3; //默认边框的宽度,单位 dp 35 | private int mBorderColor = 0xFFFF0000; //默认边框的颜色 36 | private int mFillColor = 0x00000000; //纯色的填充色 37 | private boolean mBorderOverlay = false; //true表示边框会覆盖一部分图片,false表示边框不会覆盖在图片之上 38 | 39 | //以下是成员变量 40 | private final Matrix mShaderMatrix = new Matrix(); //对图片缩放的矩阵 41 | private final Paint mBitmapPaint = new Paint(); //图片的画笔 42 | private final Paint mBorderPaint = new Paint(); //边框的画笔 43 | private final Paint mFillPaint = new Paint(); //背景色的画笔 44 | private Bitmap mBitmap; //设置的图片 45 | private float mBorderRadius; //边框的半径,默认向内部偏移了 mBorderWidth/2 的长度,保证边框不超出有效绘画区域 46 | private float mDrawableRadius; //内容的绘制半径,自动根据 mBorderOverlay 参数决定是否包括边框的半径 47 | private ColorFilter mColorFilter; //滤色 48 | private boolean mSetupPending; //是否执行了setUp方法 49 | 50 | public CircleImageView(Context context) { 51 | this(context, null); 52 | } 53 | 54 | public CircleImageView(Context context, AttributeSet attrs) { 55 | this(context, attrs, 0); 56 | } 57 | 58 | public CircleImageView(Context context, AttributeSet attrs, int defStyle) { 59 | super(context, attrs, defStyle); 60 | 61 | mBorderWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, mBorderWidth, getResources().getDisplayMetrics()); 62 | 63 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0); 64 | mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_civ_BorderWidth, mBorderWidth); 65 | mBorderColor = a.getColor(R.styleable.CircleImageView_civ_BorderColor, mBorderColor); 66 | mBorderOverlay = a.getBoolean(R.styleable.CircleImageView_civ_BorderOverlay, mBorderOverlay); 67 | mFillColor = a.getColor(R.styleable.CircleImageView_civ_FillColor, mFillColor); 68 | a.recycle(); 69 | 70 | super.setScaleType(SCALE_TYPE); 71 | } 72 | 73 | @Override 74 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { 75 | super.onSizeChanged(w, h, oldw, oldh); 76 | mSetupPending = true; 77 | setup(); 78 | } 79 | 80 | private void setup() { 81 | if (!mSetupPending || getWidth() == 0 && getHeight() == 0) return; 82 | if (mBitmap == null) { 83 | invalidate(); 84 | return; 85 | } 86 | 87 | BitmapShader bitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); 88 | mBitmapPaint.setAntiAlias(true); 89 | mBitmapPaint.setShader(bitmapShader); 90 | 91 | mBorderPaint.setStyle(Paint.Style.STROKE); 92 | mBorderPaint.setAntiAlias(true); 93 | mBorderPaint.setColor(mBorderColor); 94 | mBorderPaint.setStrokeWidth(mBorderWidth); 95 | 96 | mFillPaint.setStyle(Paint.Style.FILL); 97 | mFillPaint.setAntiAlias(true); 98 | mFillPaint.setColor(mFillColor); 99 | 100 | int drawableWidth = getWidth() - getPaddingLeft() - getPaddingRight(); 101 | int drawableHeight = getHeight() - getPaddingTop() - getPaddingBottom(); 102 | mDrawableRadius = Math.min(drawableWidth, drawableHeight) / 2; 103 | mBorderRadius = mDrawableRadius - mBorderWidth / 2; 104 | if (!mBorderOverlay) { 105 | mDrawableRadius -= mBorderWidth; 106 | } 107 | 108 | int bitmapHeight = mBitmap.getHeight(); 109 | int bitmapWidth = mBitmap.getWidth(); 110 | float dx = (drawableWidth - mDrawableRadius * 2) / 2 + getPaddingLeft(); 111 | float dy = (drawableHeight - mDrawableRadius * 2) / 2 + getPaddingTop(); 112 | float scale; 113 | mShaderMatrix.set(null); 114 | if (bitmapWidth > bitmapHeight) { 115 | scale = mDrawableRadius * 2 / bitmapHeight; //图片的宽高比 大于 有效绘制区域的宽高比,此时缩放比以 高度的缩放比为基准 116 | dx += (mDrawableRadius * 2 - bitmapWidth * scale) / 2; //dx 为负值,表示向左平移 117 | } else { 118 | scale = mDrawableRadius * 2 / bitmapWidth; //图片的宽高比 小于 有效绘制区域的宽高比,此时缩放比以 宽度的缩放比为基准 119 | dy += (mDrawableRadius * 2 - bitmapHeight * scale) / 2;//dy 为负值,表示向上平移 120 | } 121 | mShaderMatrix.postScale(scale, scale); //设置图片的缩放大小 122 | mShaderMatrix.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f)); //设置图片的平移距离 123 | bitmapShader.setLocalMatrix(mShaderMatrix); //最后赋值给BitmapShader 124 | 125 | invalidate(); 126 | } 127 | 128 | /** 129 | * 没有调用父类的 super 方法,全完靠自定义控件绘制出来 130 | */ 131 | @Override 132 | protected void onDraw(Canvas canvas) { 133 | if (mBitmap != null) 134 | canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mBitmapPaint);//绘制图片 135 | else if (mFillColor != Color.TRANSPARENT) 136 | canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mDrawableRadius, mFillPaint); //绘制纯色背景 137 | if (mBorderWidth != 0) 138 | canvas.drawCircle(getWidth() / 2.0f, getHeight() / 2.0f, mBorderRadius, mBorderPaint); //绘制边框 139 | } 140 | 141 | /** 142 | * 将传入的drawable转换成bitmap 143 | */ 144 | private Bitmap getBitmapFromDrawable(Drawable drawable) { 145 | if (drawable == null) 146 | return null; 147 | if (drawable instanceof BitmapDrawable) return ((BitmapDrawable) drawable).getBitmap(); 148 | try { 149 | Bitmap bitmap; 150 | if (drawable instanceof ColorDrawable) { 151 | bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG); 152 | } else { 153 | int width = drawable.getIntrinsicWidth() <= 0 ? 1 : drawable.getIntrinsicWidth(); 154 | int height = drawable.getIntrinsicHeight() <= 0 ? 1 : drawable.getIntrinsicHeight(); 155 | bitmap = Bitmap.createBitmap(width, height, BITMAP_CONFIG); 156 | } 157 | Canvas canvas = new Canvas(bitmap); 158 | drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); 159 | drawable.draw(canvas); 160 | return bitmap; 161 | } catch (Exception e) { 162 | e.printStackTrace(); 163 | return null; 164 | } 165 | } 166 | 167 | @Override 168 | public ScaleType getScaleType() { 169 | return SCALE_TYPE; 170 | } 171 | 172 | @Override 173 | public void setScaleType(ScaleType scaleType) { 174 | if (scaleType != SCALE_TYPE) { 175 | throw new IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType)); 176 | } 177 | } 178 | 179 | @Override 180 | public void setAdjustViewBounds(boolean adjustViewBounds) { 181 | if (adjustViewBounds) { 182 | throw new IllegalArgumentException("adjustViewBounds not supported."); 183 | } 184 | } 185 | 186 | @Override 187 | public void setImageBitmap(Bitmap bm) { 188 | super.setImageBitmap(bm); 189 | mBitmap = bm; 190 | setup(); 191 | } 192 | 193 | @Override 194 | public void setImageDrawable(Drawable drawable) { 195 | super.setImageDrawable(drawable); 196 | mBitmap = getBitmapFromDrawable(drawable); 197 | setup(); 198 | } 199 | 200 | @Override 201 | public void setImageResource(@DrawableRes int resId) { 202 | super.setImageResource(resId); 203 | mBitmap = getBitmapFromDrawable(getDrawable()); 204 | setup(); 205 | } 206 | 207 | @Override 208 | public void setImageURI(Uri uri) { 209 | super.setImageURI(uri); 210 | mBitmap = uri != null ? getBitmapFromDrawable(getDrawable()) : null; 211 | setup(); 212 | } 213 | 214 | @Override 215 | public void setColorFilter(ColorFilter cf) { 216 | if (cf == mColorFilter) return; 217 | mColorFilter = cf; 218 | mBitmapPaint.setColorFilter(mColorFilter); 219 | invalidate(); 220 | } 221 | 222 | @Override 223 | public void setPadding(int left, int top, int right, int bottom) { 224 | super.setPadding(left, top, right, bottom); 225 | setup(); 226 | } 227 | 228 | public int getBorderColor() { 229 | return mBorderColor; 230 | } 231 | 232 | public void setBorderColor(@ColorInt int borderColor) { 233 | if (borderColor == mBorderColor) return; 234 | mBorderColor = borderColor; 235 | mBorderPaint.setColor(mBorderColor); 236 | invalidate(); 237 | } 238 | 239 | public void setBorderColorResource(@ColorRes int borderColorRes) { 240 | setBorderColor(getContext().getResources().getColor(borderColorRes)); 241 | } 242 | 243 | public int getFillColor() { 244 | return mFillColor; 245 | } 246 | 247 | public void setFillColor(@ColorInt int fillColor) { 248 | if (fillColor == mFillColor) return; 249 | mFillColor = fillColor; 250 | mFillPaint.setColor(fillColor); 251 | invalidate(); 252 | } 253 | 254 | public void setFillColorResource(@ColorRes int fillColorRes) { 255 | setFillColor(getContext().getResources().getColor(fillColorRes)); 256 | } 257 | 258 | public int getBorderWidth() { 259 | return mBorderWidth; 260 | } 261 | 262 | public void setBorderWidth(int borderWidth) { 263 | if (borderWidth == mBorderWidth) return; 264 | mBorderWidth = borderWidth; 265 | setup(); 266 | } 267 | 268 | public boolean isBorderOverlay() { 269 | return mBorderOverlay; 270 | } 271 | 272 | public void setBorderOverlay(boolean borderOverlay) { 273 | if (borderOverlay == mBorderOverlay) return; 274 | mBorderOverlay = borderOverlay; 275 | setup(); 276 | } 277 | } -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/java/cn/edu/heuet/littlecurl/qzone/ui/ExpandListView.java: -------------------------------------------------------------------------------- 1 | package cn.edu.heuet.littlecurl.qzone.ui; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.ListView; 6 | 7 | /** 8 | * ================================================ 9 | * 作 者:廖子尧 10 | * 版 本:1.0 11 | * 创建日期:2016/3/13 12 | * 描 述: 13 | * 修订历史: 14 | * ================================================ 15 | */ 16 | public class ExpandListView extends ListView { 17 | public ExpandListView(Context context) { 18 | super(context); 19 | } 20 | 21 | public ExpandListView(Context context, AttributeSet attrs) { 22 | super(context, attrs); 23 | } 24 | 25 | public ExpandListView(Context context, AttributeSet attrs, int defStyleAttr) { 26 | super(context, attrs, defStyleAttr); 27 | } 28 | 29 | @Override 30 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 31 | int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); 32 | super.onMeasure(widthMeasureSpec, expandSpec); 33 | } 34 | } -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/res/drawable/background_white_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 21 | 22 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/res/drawable/event_di.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/littlecurl/NineGridView/a6d156cdb0b087034df443c42ef28227117593fb/NineGridView-master/app/src/main/res/drawable/event_di.9.png -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /NineGridView-master/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 |