首次提交
1
module_community/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
65
module_community/build.gradle
Normal file
@@ -0,0 +1,65 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.2"
|
||||
|
||||
defaultConfig {
|
||||
// applicationId "com.yuyin.module_login"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 30
|
||||
versionCode 12
|
||||
versionName "1.2"
|
||||
dataBinding {
|
||||
//noinspection DataBindingWithoutKapt
|
||||
enabled = true
|
||||
}
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation 'androidx.core:core-ktx:1.3.2'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.navigation:navigation-fragment:2.3.1'
|
||||
implementation 'androidx.navigation:navigation-ui:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.1'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.1'
|
||||
|
||||
|
||||
api 'com.alibaba:arouter-api:1.4.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
|
||||
kapt'com.alibaba:arouter-compiler:1.2.2'
|
||||
|
||||
api project(':lib_base')
|
||||
|
||||
}
|
||||
0
module_community/consumer-rules.pro
Normal file
21
module_community/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
10
module_community/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yuyin.module_community">
|
||||
|
||||
/
|
||||
<application>
|
||||
<activity android:name="com.yuyin.lib_base.ui.jubao.SocialReleaseActivity" />
|
||||
<activity android:name=".ui.detail.DongTaiActivity" />
|
||||
<activity android:name=".ui.fabu.SocialReleaseActivity" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,463 @@
|
||||
package com.yuyin.module_community.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.media.MediaPlayer;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.android.tu.loadingdialog.LoadingDailog;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yuyin.lib_base.arouter.AroutUtil;
|
||||
import com.yuyin.lib_base.base.UserManager;
|
||||
import com.yuyin.lib_base.util.MediaManager;
|
||||
import com.yuyin.lib_base.util.TimeUtil;
|
||||
import com.yuyin.lib_base.util.img.FullScreenUtil;
|
||||
import com.yuyin.lib_base.view.MyGridView;
|
||||
import com.yuyin.module_community.R;
|
||||
import com.yuyin.module_community.model.DynamicBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class CommDynamicAdapter extends BaseQuickAdapter<DynamicBean, BaseViewHolder> {
|
||||
//该变量如果设置成全局的会发生数据紊乱
|
||||
//private ArrayList<String> oneImageList = new ArrayList<>(); //单图的数据源
|
||||
// private ArrayList<String> tagsList = new ArrayList<>(); //标签的数据源
|
||||
|
||||
//用于退出 Activity,避免 Countdown,造成资源浪费。
|
||||
// private SparseArray<CountDownTimer> mCountDownCounters;
|
||||
private static MediaPlayer mMediaPlayer;
|
||||
|
||||
private CountDownTimer mSingleCountDownTimer;
|
||||
|
||||
boolean mHasFinishTimer = true;
|
||||
|
||||
Handler mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
public LoadingDailog dialog;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public CommDynamicAdapter(Context context) {
|
||||
super(R.layout.comm_dy_item, new ArrayList<>());
|
||||
this.mContext = context;
|
||||
// this.mCountDownCounters = new SparseArray<>();
|
||||
LoadingDailog.Builder loadBuilder = new LoadingDailog.Builder(context)
|
||||
.setMessage("加载中...")
|
||||
.setCancelable(true)
|
||||
.setCancelOutside(true);
|
||||
dialog = loadBuilder.create();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, DynamicBean item) {
|
||||
|
||||
helper.addOnClickListener(R.id.dianzan)
|
||||
.addOnClickListener(R.id.guanzhu_btn)
|
||||
.addOnClickListener(R.id.delete)
|
||||
.addOnClickListener(R.id.zhuanfa)
|
||||
.addOnClickListener(R.id.dy_lookmore_tv)
|
||||
.addOnClickListener(R.id.dy_head_image)
|
||||
.addOnClickListener(R.id.dy_more_image)
|
||||
.addOnClickListener(R.id.dy_oneimage_iv);
|
||||
|
||||
//先让单图,多图,音频的布局显示
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_voice).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.iv_jubao).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
// ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO).withString("uid", item.getUid() + "").navigation();
|
||||
}
|
||||
});
|
||||
//昵称
|
||||
helper.setText(R.id.dy_name_text, item.getNick_name());
|
||||
|
||||
//头像
|
||||
if (!TextUtils.isEmpty(item.getHead_pic())) {
|
||||
Glide
|
||||
.with(mContext)
|
||||
.load(item.getHead_pic())
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.into((ImageView) helper.getView(R.id.dy_head_image));
|
||||
}
|
||||
|
||||
//动态内容以富文本展示
|
||||
String content = item.getContent();
|
||||
if (content == null || content.length() == 0) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.GONE);
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).setVisibility(View.VISIBLE);
|
||||
}
|
||||
helper.getView(R.id.dy_lookmore_tv).getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
|
||||
@Override
|
||||
public boolean onPreDraw() {
|
||||
//这个回调会调用多次,获取完行数记得注销监听
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
int lineCount = view.getLineCount();
|
||||
if (lineCount >= 7) {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
} else {
|
||||
helper.getView(R.id.dy_lookmore_tv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_content_tv).getViewTreeObserver().removeOnPreDrawListener(this);//销毁
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
helper.setText(R.id.dy_content_tv, content);
|
||||
helper.setText(R.id.tvAddress, item.getDistance());
|
||||
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.GONE);
|
||||
} else {
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
//置顶
|
||||
if (item.is_top() == 2) {
|
||||
helper.getView(R.id.dy_top_text).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
helper.getView(R.id.dy_top_text).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//关注
|
||||
TextView guanzhu_btn = helper.getView(R.id.guanzhu_btn);
|
||||
ImageView delete = helper.getView(R.id.delete);
|
||||
|
||||
if (item.getUid() == UserManager.INSTANCE.getUser().getUid()) {
|
||||
guanzhu_btn.setVisibility(View.GONE);
|
||||
// delete.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
guanzhu_btn.setVisibility(View.VISIBLE);
|
||||
// delete.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (item.is_follow() == 1) {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#808098"));
|
||||
// guanzhu_btn.setText("已关注");
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.yi_follow);
|
||||
} else {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#13131F"));
|
||||
// guanzhu_btn.setText("关注");
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.no_follow);
|
||||
}
|
||||
|
||||
//点赞
|
||||
helper.setText(R.id.dy_fabulous, item.getPraise_num() + "");
|
||||
if (item.is_praise() == 1) {
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan2));
|
||||
helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_yidianzan);
|
||||
} else {
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan1));
|
||||
helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_dianzan);
|
||||
}
|
||||
|
||||
//分享数
|
||||
helper.setText(R.id.dy_share, item.getShare_num() + "");
|
||||
//评论数
|
||||
helper.setText(R.id.dy_comment, item.getComment_num() + "");
|
||||
|
||||
//男女 1 男 2 女
|
||||
if (item.getSex() == 1) {
|
||||
helper.setImageResource(R.id.dy_sex_image, R.mipmap.login_reg_nan1);
|
||||
} else {
|
||||
helper.setImageResource(R.id.dy_sex_image, R.mipmap.login_reg_nv1);
|
||||
}
|
||||
|
||||
//时间
|
||||
|
||||
if (!item.getAdd_time().isEmpty()) {
|
||||
try {
|
||||
helper.setText(R.id.dy_time_text, item.getAdd_time());
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//音频时长
|
||||
if (!item.isPlay()) {
|
||||
//音频时长
|
||||
helper.setText(R.id.dy_voice_time, item.getSound_duration() + "s");
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_bofang);
|
||||
} else {
|
||||
helper.setText(R.id.dy_voice_time, item.getCurrentTime() + "s");
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_zanting);
|
||||
}
|
||||
|
||||
String audio = item.getSound(); //音频
|
||||
if (item.getImages().size() != 0) {
|
||||
String[] arrIv = item.getImages().toArray(new String[item.getImages().size()]);
|
||||
int length = arrIv.length;
|
||||
helper.getView(R.id.dy_voice).setVisibility(View.GONE);
|
||||
if (length == 1) { //单图
|
||||
//该变量如果设置成全局的会发生数据紊乱
|
||||
ArrayList<String> oneImageList = new ArrayList<>();
|
||||
String img1Iv = arrIv[0];
|
||||
oneImageList.add(img1Iv);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.GONE);
|
||||
|
||||
ImageView imgSingle = helper.getView(R.id.dy_oneimage_iv);
|
||||
|
||||
// int screenWidth = QMUIDisplayHelper.getScreenWidth(mContext) - QMUIDisplayHelper.dp2px(mContext, 24);
|
||||
|
||||
// int imgWidth = screenWidth * 2 / 3;
|
||||
//
|
||||
// ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) imgSingle.getLayoutParams();
|
||||
//
|
||||
// params.width = imgWidth;
|
||||
//
|
||||
// imgSingle.setLayoutParams(params);
|
||||
|
||||
Glide.with(mContext)
|
||||
.load(img1Iv)
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.into((ImageView) helper.getView(R.id.dy_oneimage_iv));
|
||||
helper.getView(R.id.dy_oneimage_iv).setOnClickListener(v -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, 0, oneImageList);
|
||||
});
|
||||
} else { //多图
|
||||
|
||||
if (length == 4) {
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
// int screenWidth = QMUIDisplayHelper.getScreenWidth(mContext) - QMUIDisplayHelper.dp2px(mContext, 24);
|
||||
// int imgWidth = screenWidth * 2 / 3;
|
||||
// ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) recyclerView.getLayoutParams();
|
||||
// params.width = imgWidth;
|
||||
// recyclerView.setLayoutParams(params);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
|
||||
for (int j = 0; j < arrIv.length; j++) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(arrIv[j]);
|
||||
}
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged();
|
||||
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} else if (audio != null && audio.length() != 0 && !"".equals(audio)) { //音频模式
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_voice).setOnClickListener(v -> {
|
||||
|
||||
if (!item.isPlay()) {
|
||||
if (dialog != null) {
|
||||
dialog.show();
|
||||
}
|
||||
//停止其它正在播放的录音
|
||||
if (mSingleCountDownTimer != null && !mHasFinishTimer) {
|
||||
mSingleCountDownTimer.cancel();
|
||||
MediaManager.pause();
|
||||
List<DynamicBean> list = getData();
|
||||
int size = list.size();
|
||||
int position = 0;
|
||||
for (int i = 0; i < size; i++) {
|
||||
DynamicBean dynamicsBean = list.get(i);
|
||||
if (dynamicsBean.isPlay()) {
|
||||
position = i;
|
||||
dynamicsBean.setPlay(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
LogUtils.d("==正在倒计时,要停止它");
|
||||
notifyItemChanged(position, "text_stop_timer");
|
||||
// notifyItemChanged(position);
|
||||
}
|
||||
mHasFinishTimer = false;
|
||||
MediaManager.playSoundAsync(item.getSound(), null, new MediaPlayer.OnPreparedListener() {
|
||||
@Override
|
||||
public void onPrepared(MediaPlayer mp) {
|
||||
if (dialog != null) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
item.setPlay(true);
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_zanting);
|
||||
mp.start();
|
||||
// CountDownTimer countDownTimer = mCountDownCounters.get(helper.getView(R.id.dy_voice_time).hashCode());
|
||||
// if (countDownTimer != null) {
|
||||
// //将复用的倒计时清除
|
||||
// countDownTimer.cancel();
|
||||
// }
|
||||
int t = item.getSound_duration();
|
||||
long time = (long) t * 1000;
|
||||
mSingleCountDownTimer = new CountDownTimer(time, 1000) {
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
|
||||
int times = (int) (l / 1000);
|
||||
|
||||
item.setCurrentTime(times + "");
|
||||
|
||||
// helper.setText(R.id.dy_voice_time, (int) (l / 1000) + "s");
|
||||
LogUtils.d("====倒计时", (l / 1000) + "s");
|
||||
|
||||
// notifyDataSetChanged();
|
||||
int position = helper.getPosition();
|
||||
|
||||
notifyItemChanged(position, "text_timer");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {//倒计时结束了
|
||||
helper.setText(R.id.dy_voice_time, item.getSound_duration() + "s");
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_bofang);
|
||||
MediaManager.pause();
|
||||
MediaManager.release();
|
||||
item.setPlay(false);
|
||||
int position = helper.getPosition();
|
||||
notifyItemChanged(position, "text_timer");
|
||||
mHasFinishTimer = true;
|
||||
}
|
||||
}.start();
|
||||
|
||||
// mCountDownCounters.put(helper.getView(R.id.dy_voice_time).hashCode(), countDownTimer);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
item.setPlay(false);
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_bofang);
|
||||
helper.setText(R.id.dy_voice_time, item.getSound_duration() + "");
|
||||
MediaManager.pause();
|
||||
MediaManager.release();
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
helper.getView(R.id.dy_oneimage_iv).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.GONE);
|
||||
helper.getView(R.id.dy_voice).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convertPayloads(BaseViewHolder helper, DynamicBean item, List<Object> payloads) {
|
||||
super.convertPayloads(helper, item, payloads);
|
||||
if (payloads.isEmpty()) {
|
||||
convert(helper, item);
|
||||
} else {
|
||||
String payload = (String) payloads.get(0);
|
||||
int praise_num = item.getPraise_num();
|
||||
if ("like".equals(payload)) {
|
||||
item.set_praise(1);
|
||||
item.setPraise_num(praise_num + 1);
|
||||
helper.setText(R.id.dy_fabulous, praise_num + 1 + "");
|
||||
helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_yidianzan);
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan2));
|
||||
} else if ("unlike".equals(payload)) {
|
||||
item.set_praise(0);
|
||||
item.setPraise_num((praise_num - 1) > 0 ? praise_num - 1 : 0);
|
||||
helper.setText(R.id.dy_fabulous, praise_num - 1 + "");
|
||||
helper.setImageResource(R.id.dianzan_image, R.drawable.dongtai_hudong_dianzan);
|
||||
TextView dy_fabulous = helper.getView(R.id.dy_fabulous);
|
||||
dy_fabulous.setTextColor(mContext.getResources().getColor(R.color.dianzan1));
|
||||
} else if ("follow".equals(payload)) {
|
||||
//关注
|
||||
TextView guanzhu_btn = helper.getView(R.id.guanzhu_btn);
|
||||
if (item.is_follow() == 1) {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#808098"));
|
||||
// guanzhu_btn.setText("已关注");
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.yi_follow);
|
||||
} else {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#13131F"));
|
||||
// guanzhu_btn.setText("关注");
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.no_follow);
|
||||
}
|
||||
|
||||
} else if ("share".equals(payload)) {
|
||||
int forward_num = item.getShare_num();
|
||||
helper.setText(R.id.dy_share, forward_num + 1 + "");
|
||||
} else if ("text_timer".equals(payload)) {
|
||||
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String time = item.getCurrentTime();
|
||||
if (item.isPlay()) {
|
||||
helper.setText(R.id.dy_voice_time, item.getCurrentTime() + "s");
|
||||
LogUtils.d("====倒计时更新======", time + "");
|
||||
} else {
|
||||
helper.setText(R.id.dy_voice_time, item.getSound_duration() + "");
|
||||
}
|
||||
LogUtils.d("====时间======", time + "");
|
||||
}
|
||||
});
|
||||
|
||||
} else if ("text_stop_timer".equals(payload)) {
|
||||
|
||||
LogUtils.d("====停止了哈哈哈======");
|
||||
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String time = item.getCurrentTime();
|
||||
if (item.isPlay()) {
|
||||
helper.setText(R.id.dy_voice_time, item.getCurrentTime() + "s");
|
||||
LogUtils.d("==停止==倒计时更新======", time + "");
|
||||
} else {
|
||||
helper.setText(R.id.dy_voice_time, item.getSound_duration() + "");
|
||||
helper.setImageResource(R.id.dy_voice_play, R.mipmap.shequ_yuyin_bofang);
|
||||
LogUtils.d("==停止==停止倒计时更新======", item.getSound_duration() + "");
|
||||
}
|
||||
LogUtils.d("==停止==时间======", time + "");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yuyin.module_community.adapter
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yuyin.module_community.R
|
||||
import com.yuyin.module_community.model.ImageItems
|
||||
import java.util.*
|
||||
|
||||
class FBPicListAdapter() :
|
||||
BaseQuickAdapter<ImageItems, BaseViewHolder>(
|
||||
R.layout.item_fabu_pics, ArrayList()
|
||||
) {
|
||||
override fun convert(helper: BaseViewHolder, item: ImageItems) {
|
||||
helper.addOnClickListener(R.id.iv_del)
|
||||
val ivDel = helper.getView<ImageView>(R.id.iv_del)
|
||||
if (item.type == 1) {
|
||||
ivDel.visibility = View.VISIBLE
|
||||
Glide.with(mContext)
|
||||
.load(item.image.path)
|
||||
.placeholder(R.mipmap.icon_add_pic22)
|
||||
.error(R.mipmap.icon_add_pic22)
|
||||
.into((helper.getView<View>(R.id.iv_img) as ImageView))
|
||||
} else {
|
||||
ivDel.visibility = View.GONE
|
||||
Glide.with(mContext)
|
||||
.load(item.image.path)
|
||||
.placeholder(R.mipmap.icon_add_pic22)
|
||||
.error(R.mipmap.icon_add_pic22)
|
||||
.into((helper.getView<View>(R.id.iv_img) as ImageView))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.yuyin.module_community.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
//九宫格添加
|
||||
public class FullyGridLayoutManager extends GridLayoutManager {
|
||||
public FullyGridLayoutManager(Context context, int spanCount) {
|
||||
super(context, spanCount);
|
||||
}
|
||||
|
||||
public FullyGridLayoutManager(Context context, int spanCount, int orientation, boolean reverseLayout) {
|
||||
super(context, spanCount, orientation, reverseLayout);
|
||||
}
|
||||
|
||||
private int[] mMeasuredDimension = new int[2];
|
||||
|
||||
@Override
|
||||
public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state, int widthSpec, int heightSpec) {
|
||||
final int widthMode = View.MeasureSpec.getMode(widthSpec);
|
||||
final int heightMode = View.MeasureSpec.getMode(heightSpec);
|
||||
final int widthSize = View.MeasureSpec.getSize(widthSpec);
|
||||
final int heightSize = View.MeasureSpec.getSize(heightSpec);
|
||||
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int count = getItemCount();
|
||||
int span = getSpanCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
measureScrapChild(recycler, i,
|
||||
View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),
|
||||
View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),
|
||||
mMeasuredDimension);
|
||||
|
||||
if (getOrientation() == HORIZONTAL) {
|
||||
if (i % span == 0) {
|
||||
width = width + mMeasuredDimension[0];
|
||||
}
|
||||
if (i == 0) {
|
||||
height = mMeasuredDimension[1];
|
||||
}
|
||||
} else {
|
||||
if (i % span == 0) {
|
||||
height = height + mMeasuredDimension[1];
|
||||
}
|
||||
if (i == 0) {
|
||||
width = mMeasuredDimension[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (widthMode) {
|
||||
case View.MeasureSpec.EXACTLY:
|
||||
width = widthSize;
|
||||
case View.MeasureSpec.AT_MOST:
|
||||
case View.MeasureSpec.UNSPECIFIED:
|
||||
}
|
||||
|
||||
switch (heightMode) {
|
||||
case View.MeasureSpec.EXACTLY:
|
||||
height = heightSize;
|
||||
case View.MeasureSpec.AT_MOST:
|
||||
case View.MeasureSpec.UNSPECIFIED:
|
||||
}
|
||||
|
||||
setMeasuredDimension(width, height);
|
||||
}
|
||||
|
||||
final RecyclerView.State mState = new RecyclerView.State();
|
||||
|
||||
private void measureScrapChild(RecyclerView.Recycler recycler, int position, int widthSpec,
|
||||
int heightSpec, int[] measuredDimension) {
|
||||
int itemCount = mState.getItemCount();
|
||||
if (position < itemCount) {
|
||||
try {
|
||||
View view = recycler.getViewForPosition(0);
|
||||
if (view != null) {
|
||||
RecyclerView.LayoutParams p = (RecyclerView.LayoutParams) view.getLayoutParams();
|
||||
int childWidthSpec = ViewGroup.getChildMeasureSpec(widthSpec,
|
||||
getPaddingLeft() + getPaddingRight(), p.width);
|
||||
int childHeightSpec = ViewGroup.getChildMeasureSpec(heightSpec,
|
||||
getPaddingTop() + getPaddingBottom(), p.height);
|
||||
view.measure(childWidthSpec, childHeightSpec);
|
||||
measuredDimension[0] = view.getMeasuredWidth() + p.leftMargin + p.rightMargin;
|
||||
measuredDimension[1] = view.getMeasuredHeight() + p.bottomMargin + p.topMargin;
|
||||
recycler.recycleView(view);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.yuyin.module_community.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.jess.arms.http.imageloader.glide.ImageConfigImpl;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yuyin.lib_base.adapter.MyBaseAdapter;
|
||||
import com.yuyin.module_community.R;
|
||||
|
||||
public class OneImageYuanJiaoAdapter extends MyBaseAdapter<String> {
|
||||
private Context context;
|
||||
|
||||
// public OneImageYuanJiaoAdapter(Context context) {
|
||||
// this.context = context;
|
||||
// }
|
||||
|
||||
public OneImageYuanJiaoAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// protected void convert(BaseViewHolder helper, String item) {
|
||||
// helper.addOnClickListener(R.id.fiv);
|
||||
//
|
||||
// helper.setVisible(R.id.ll_del, false);
|
||||
// QMUIRadiusImageView image = helper.getView(R.id.fiv);
|
||||
// RequestOptions options = new RequestOptions()
|
||||
// .centerCrop()
|
||||
// .placeholder(R.color.white)
|
||||
// .diskCacheStrategy(DiskCacheStrategy.ALL);
|
||||
// Glide.with(mContext)
|
||||
// .load(item)
|
||||
// .apply(options)
|
||||
// .into(image);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder VH;
|
||||
if (convertView == null) {
|
||||
convertView = LayoutInflater.from(context).inflate(R.layout.gv_filter_image, null);
|
||||
VH = new ViewHolder(convertView);
|
||||
convertView.setTag(VH);
|
||||
} else {
|
||||
VH = (ViewHolder) convertView.getTag();
|
||||
}
|
||||
VH.iv_del.setVisibility(View.GONE);
|
||||
|
||||
if (!TextUtils.isEmpty(list_adapter.get(position))) {
|
||||
// Glide.with(context)
|
||||
// .load(list_adapter.get(position))
|
||||
// .placeholder(R.mipmap.no_tu)
|
||||
// .error(R.mipmap.no_tu)
|
||||
// .into(VH.tv_title);
|
||||
RequestOptions options = new RequestOptions()
|
||||
.centerCrop()
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL);
|
||||
Glide.with(context)
|
||||
.load(list_adapter.get(position))
|
||||
.apply(options)
|
||||
.into(VH.tv_title);
|
||||
|
||||
}
|
||||
//
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
||||
public static class ViewHolder {
|
||||
RoundedImageView tv_title;
|
||||
ImageView iv_del;
|
||||
RelativeLayout layoutImg;
|
||||
|
||||
public ViewHolder(View convertView) {
|
||||
tv_title = convertView.findViewById(R.id.fiv);
|
||||
iv_del = convertView.findViewById(R.id.iv_del);
|
||||
// layoutImg = convertView.findViewById(R.id.layout_img);
|
||||
//
|
||||
// int screenWidth = QMUIDisplayHelper.getScreenWidth(BaseApplication.mApplication) - QMUIDisplayHelper.dp2px(BaseApplication.mApplication, 24);
|
||||
//
|
||||
// int imgWidth = screenWidth*1/3-QMUIDisplayHelper.dp2px(BaseApplication.mApplication, 10);
|
||||
//
|
||||
// RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutImg.getLayoutParams();
|
||||
// params.width = imgWidth;
|
||||
// params.height = imgWidth;
|
||||
// layoutImg.setLayoutParams(params);
|
||||
//
|
||||
// params = (RelativeLayout.LayoutParams) tv_title.getLayoutParams();
|
||||
// params.width = imgWidth;
|
||||
// params.height = imgWidth;
|
||||
// tv_title.setLayoutParams(params);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yuyin.module_community.adapter
|
||||
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yuyin.lib_base.util.TimeUtil
|
||||
import com.yuyin.module_community.R
|
||||
import com.yuyin.module_community.model.PingLunBean
|
||||
import java.util.*
|
||||
|
||||
class PingLunListAdapter() :
|
||||
BaseQuickAdapter<PingLunBean, BaseViewHolder>(
|
||||
R.layout.item_pinglun, ArrayList()
|
||||
) {
|
||||
override fun convert(helper: BaseViewHolder, item: PingLunBean) {
|
||||
Glide.with(mContext)
|
||||
.load(item.head_pic)
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.into((helper.getView<View>(R.id.iv_img) as ImageView))
|
||||
helper.setText(R.id.tv_name, item.nick_name)
|
||||
.setText(R.id.tv_text, item.content)
|
||||
.setText(R.id.tv_time,TimeUtil.sendTime(item.add_time*1000))
|
||||
|
||||
if (item.sex == "1") {
|
||||
helper.setImageResource(R.id.iv_sex, R.mipmap.login_reg_nan1)
|
||||
} else {
|
||||
helper.setImageResource(R.id.iv_sex, R.mipmap.login_reg_nv1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.yuyin.module_community.model
|
||||
|
||||
import com.lzy.imagepicker.bean.ImageItem
|
||||
|
||||
data class PingLunBean(
|
||||
var zid: String = "",
|
||||
var content: String = "",
|
||||
var praise_num: String = "",
|
||||
var sex: String = "",
|
||||
var head_pic: String = "",
|
||||
var nick_name: String = "",
|
||||
var add_time:Long=0
|
||||
)
|
||||
|
||||
data class ImageItems(
|
||||
var type: Int = 0,
|
||||
var image: ImageItem = ImageItem()
|
||||
)
|
||||
|
||||
data class DynamicBean(
|
||||
var zid: Int = 0,
|
||||
var uid: Int = 0,
|
||||
var images: ArrayList<String> = ArrayList(),
|
||||
var sound: String = "",
|
||||
var sound_duration: Int = 0,
|
||||
var video: String = "",
|
||||
var content: String = "",
|
||||
var add_time: String = "",
|
||||
var praise_num: Int = 0,
|
||||
var read_num: Int = 0,
|
||||
var share_num: Int = 0,
|
||||
var comment_num: Int = 0,
|
||||
var is_recommend: Int = 0,
|
||||
var is_top: Int = 0,
|
||||
var base64_nick_name: String = "",
|
||||
var sex: Int = 0,
|
||||
var head_pic: String = "",
|
||||
var is_show: Int = 0,
|
||||
var nick_name: String = "",
|
||||
var is_praise: Int = 0,
|
||||
var is_follow: Int = 0,
|
||||
var is_collect: Int = 0,
|
||||
var isPlay: Boolean = false,
|
||||
var currentTime: String = "",
|
||||
var distance: String = ""
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.yuyin.module_community.network
|
||||
|
||||
import com.yuyin.lib_base.http.RequestService
|
||||
|
||||
/**
|
||||
*/
|
||||
object CommunityApiServer {
|
||||
val api by lazy { RequestService.create<CommunityApiService>() }
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.yuyin.module_community.network
|
||||
|
||||
import com.yuyin.lib_base.http.ResponseData
|
||||
import com.yuyin.module_community.model.DynamicBean
|
||||
import com.yuyin.module_community.model.PingLunBean
|
||||
import retrofit2.http.Field
|
||||
import retrofit2.http.FieldMap
|
||||
import retrofit2.http.FormUrlEncoded
|
||||
import retrofit2.http.POST
|
||||
|
||||
interface CommunityApiService {
|
||||
/**
|
||||
* 获取社区列表
|
||||
*/
|
||||
@POST("User_Zone/get_zone_list")
|
||||
@FormUrlEncoded
|
||||
suspend fun get_zone_list(
|
||||
@FieldMap map: MutableMap<String, String>
|
||||
): ResponseData<List<DynamicBean>>
|
||||
|
||||
/**
|
||||
* 获取社区列表
|
||||
*/
|
||||
@POST("User_Zone/get_user_zone_list")
|
||||
@FormUrlEncoded
|
||||
suspend fun get_user_zone_list(
|
||||
@FieldMap map: MutableMap<String, String>
|
||||
): ResponseData<List<DynamicBean>>
|
||||
|
||||
/**
|
||||
* 获取指定动态评论列表
|
||||
*/
|
||||
@POST("User_Zone/get_comment_list")
|
||||
@FormUrlEncoded
|
||||
suspend fun get_comment_list(
|
||||
@FieldMap map: MutableMap<String, String>
|
||||
): ResponseData<List<PingLunBean>>
|
||||
|
||||
/**
|
||||
* 发布社区信息
|
||||
*/
|
||||
@POST("User_Zone/publish_zone")
|
||||
@FormUrlEncoded
|
||||
suspend fun publish_zone(
|
||||
@FieldMap map: MutableMap<String, String>
|
||||
): ResponseData<Any>
|
||||
|
||||
/**
|
||||
* 动态删除
|
||||
*/
|
||||
@POST("User_Zone/delete_zone")
|
||||
@FormUrlEncoded
|
||||
suspend fun delete_zone(@Field("zid") zid: String): ResponseData<Any>
|
||||
|
||||
|
||||
/**
|
||||
* 动态点赞
|
||||
*/
|
||||
@POST("User_Zone/praise_zone")
|
||||
@FormUrlEncoded
|
||||
suspend fun praise_zone(@Field("zid") zid: String): ResponseData<Any>
|
||||
|
||||
/**
|
||||
* 获取指定动态详情
|
||||
*/
|
||||
@POST("User_Zone/get_zone_info")
|
||||
@FormUrlEncoded
|
||||
suspend fun get_zone_info(@Field("zid") zid: String): ResponseData<DynamicBean>
|
||||
|
||||
/**
|
||||
* 动态评论
|
||||
*/
|
||||
@POST("User_Zone/comment_zone")
|
||||
@FormUrlEncoded
|
||||
suspend fun comment_zone(@Field("zid") zid: String,@Field("content") content: String): ResponseData<Any>
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.yuyin.module_community.repository
|
||||
|
||||
import com.yuyin.lib_base.http.BaseRepository
|
||||
import com.yuyin.lib_base.http.ResponseData
|
||||
import com.yuyin.module_community.model.DynamicBean
|
||||
import com.yuyin.module_community.model.PingLunBean
|
||||
import com.yuyin.module_community.network.CommunityApiServer
|
||||
|
||||
class CommunityRepository : BaseRepository() {
|
||||
|
||||
suspend fun get_zone_list(
|
||||
map: MutableMap<String, String>
|
||||
): ResponseData<List<DynamicBean>> = request {
|
||||
CommunityApiServer.api.get_zone_list(map)
|
||||
}
|
||||
|
||||
suspend fun get_user_zone_list(
|
||||
map: MutableMap<String, String>
|
||||
): ResponseData<List<DynamicBean>> = request {
|
||||
CommunityApiServer.api.get_user_zone_list(map)
|
||||
}
|
||||
|
||||
suspend fun get_comment_list(
|
||||
map: MutableMap<String, String>
|
||||
): ResponseData<List<PingLunBean>> = request {
|
||||
CommunityApiServer.api.get_comment_list(map)
|
||||
}
|
||||
|
||||
suspend fun publish_zone(
|
||||
map: MutableMap<String, String>
|
||||
): ResponseData<Any> = request {
|
||||
CommunityApiServer.api.publish_zone(map)
|
||||
}
|
||||
|
||||
suspend fun praise_zone(
|
||||
zid: String
|
||||
): ResponseData<Any> = request {
|
||||
CommunityApiServer.api.praise_zone(zid)
|
||||
}
|
||||
|
||||
suspend fun delete_zone(
|
||||
zid: String
|
||||
): ResponseData<Any> = request {
|
||||
CommunityApiServer.api.delete_zone(zid)
|
||||
}
|
||||
|
||||
suspend fun get_zone_info(
|
||||
zid: String
|
||||
): ResponseData<DynamicBean> = request {
|
||||
CommunityApiServer.api.get_zone_info(zid)
|
||||
}
|
||||
|
||||
suspend fun comment_zone(
|
||||
zid: String, cotent: String
|
||||
): ResponseData<Any> = request {
|
||||
CommunityApiServer.api.comment_zone(zid, cotent)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
package com.yuyin.module_community.ui.detail
|
||||
|
||||
import android.graphics.Color
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.blankj.utilcode.util.KeyboardUtils
|
||||
import com.bumptech.glide.Glide
|
||||
import com.kongzue.dialog.util.BaseDialog
|
||||
import com.kongzue.dialog.v3.CustomDialog
|
||||
import com.yuyin.lib_base.arouter.AroutUtil
|
||||
import com.yuyin.lib_base.arouter.AroutUtil.COMMUNITY_DETAIL
|
||||
import com.yuyin.lib_base.base.BaseDataBindingActivity
|
||||
import com.yuyin.lib_base.base.UserManager
|
||||
import com.yuyin.lib_base.util.TimeUtil
|
||||
import com.yuyin.lib_base.util.img.FullScreenUtil
|
||||
import com.yuyin.lib_base.util.showToast
|
||||
import com.yuyin.lib_base.view.KeybordWindow
|
||||
import com.yuyin.lib_base.view.MyGridView
|
||||
import com.yuyin.module_community.R
|
||||
import com.yuyin.module_community.adapter.OneImageYuanJiaoAdapter
|
||||
import com.yuyin.module_community.adapter.PingLunListAdapter
|
||||
import com.yuyin.module_community.databinding.ActivityDongtaiBinding
|
||||
import kotlinx.android.synthetic.main.activity_dongtai.*
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
@Route(path = COMMUNITY_DETAIL)
|
||||
class DongTaiActivity : BaseDataBindingActivity<DongTaiViewModel, ActivityDongtaiBinding>() {
|
||||
private lateinit var pingLunListAdapter: PingLunListAdapter
|
||||
private var dtUid=""
|
||||
override fun startObserve() {
|
||||
viewModel.deleteZone.observe(this) {
|
||||
EventBus.getDefault().post("101111")
|
||||
finish()
|
||||
}
|
||||
viewModel.commentZone.observe(this) {
|
||||
page = 1
|
||||
viewModel.get_comment_list(getMap())
|
||||
mDataBinding.etText.setText("");
|
||||
KeyboardUtils.hideSoftInput(mDataBinding.etText)
|
||||
|
||||
}
|
||||
viewModel.getFinally().observe(this) {
|
||||
if (mDataBinding.refreshLayout != null) {
|
||||
mDataBinding.refreshLayout.finishRefresh()
|
||||
mDataBinding.refreshLayout.finishLoadMore()
|
||||
}
|
||||
}
|
||||
viewModel.praiseAZone.observe(this) {
|
||||
if (viewModel.type.value == 1) {
|
||||
viewModel.dynamicData.value?.is_praise = 1
|
||||
viewModel.dynamicData.value?.praise_num =
|
||||
viewModel.dynamicData.value?.praise_num!! + 1
|
||||
dy_fabulous.setTextColor(resources.getColor(R.color.dianzan2))
|
||||
dianzan_image.setImageResource(R.drawable.dongtai_hudong_yidianzan)
|
||||
} else if (viewModel.type.value == 2) {
|
||||
viewModel.dynamicData.value?.is_praise = 0
|
||||
viewModel.dynamicData.value?.praise_num =
|
||||
viewModel.dynamicData.value?.praise_num!! - 1
|
||||
dy_fabulous.setTextColor(resources.getColor(R.color.dianzan1))
|
||||
dianzan_image.setImageResource(R.drawable.dongtai_hudong_dianzan)
|
||||
}
|
||||
dy_fabulous.text = viewModel.dynamicData.value?.praise_num.toString()
|
||||
}
|
||||
viewModel.cancelFollowData.observe(this) {
|
||||
viewModel.dynamicData.value?.let {
|
||||
viewModel.dynamicData.value?.is_follow = 0
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#13131F"));
|
||||
// guanzhu_btn.text = "关注"
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.no_follow)
|
||||
}
|
||||
}
|
||||
viewModel.followData.observe(this) {
|
||||
viewModel.dynamicData.value?.let {
|
||||
viewModel.dynamicData.value?.is_follow = 1
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#808098"));
|
||||
// guanzhu_btn.text = "已关注"
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.yi_follow)
|
||||
}
|
||||
}
|
||||
viewModel.pingLunData.observe(this) {
|
||||
if (it.isEmpty()) {
|
||||
if (page == 1) {
|
||||
pingLunListAdapter.setEmptyView(R.layout.base_empty_view, myList1)
|
||||
}
|
||||
} else {
|
||||
|
||||
if (page == 1)
|
||||
pingLunListAdapter.setNewData(it)
|
||||
else
|
||||
pingLunListAdapter.addData(it)
|
||||
|
||||
tv_pl.text="全部评论(${pingLunListAdapter.getItemCount()})"
|
||||
}
|
||||
|
||||
}
|
||||
viewModel.dynamicData.observe(this) {
|
||||
dtUid=it.uid.toString()
|
||||
tv_pl.text="全部评论(${it.comment_num})"
|
||||
//先让单图,多图,音频的布局显示
|
||||
dy_oneimage_iv.visibility = View.VISIBLE
|
||||
dy_image_recyc.visibility = View.VISIBLE
|
||||
//昵称
|
||||
dy_name_text.text = it.nick_name
|
||||
//头像
|
||||
if (!TextUtils.isEmpty(it.head_pic)) {
|
||||
Glide
|
||||
.with(this)
|
||||
.load(it.head_pic)
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.into(dy_head_image)
|
||||
}
|
||||
dy_time_text.text = TimeUtil.toDateYmd5(it.add_time.toLong())
|
||||
//动态内容以富文本展示
|
||||
dy_content_tv.text = it.content
|
||||
|
||||
if (it.uid.toLong() == UserManager.user.uid) {
|
||||
guanzhu_btn.visibility = View.GONE
|
||||
delete.visibility = View.VISIBLE
|
||||
} else {
|
||||
delete.visibility = View.GONE
|
||||
guanzhu_btn.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
if (it.sex == 1) {
|
||||
Glide.with(this).load(0).into(dy_sex_image)
|
||||
} else {
|
||||
Glide.with(this).load(0).into(dy_sex_image)
|
||||
}
|
||||
|
||||
if (it.is_follow == 1) {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#808098"))
|
||||
// guanzhu_btn.text = "已关注"
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.yi_follow)
|
||||
} else {
|
||||
// guanzhu_btn.setTextColor(Color.parseColor("#13131F"))
|
||||
// guanzhu_btn.text = "+关注"
|
||||
guanzhu_btn.setBackgroundResource(R.mipmap.no_follow)
|
||||
}
|
||||
|
||||
//点赞
|
||||
dy_fabulous.text = it.praise_num.toString()
|
||||
if (it.is_praise == 1) {
|
||||
dy_fabulous.setTextColor(resources.getColor(R.color.dianzan2))
|
||||
dianzan_image.setImageResource(R.drawable.dongtai_hudong_yidianzan)
|
||||
} else {
|
||||
dy_fabulous.setTextColor(resources.getColor(R.color.dianzan1))
|
||||
dianzan_image.setImageResource(R.drawable.dongtai_hudong_dianzan)
|
||||
}
|
||||
//评论数
|
||||
dy_comment.text = it.comment_num.toString() + ""
|
||||
|
||||
if (it.images.size != 0) {
|
||||
if (it.images.size == 1) { //单图
|
||||
//该变量如果设置成全局的会发生数据紊乱
|
||||
val oneImageList = ArrayList<String>()
|
||||
val img1Iv: String = it.images[0]
|
||||
oneImageList.add(img1Iv)
|
||||
dy_image_recyc.visibility = View.GONE
|
||||
|
||||
Glide.with(this)
|
||||
.load(img1Iv)
|
||||
.placeholder(R.mipmap.no_tu)
|
||||
.error(R.mipmap.no_tu)
|
||||
.into(dy_oneimage_iv)
|
||||
dy_oneimage_iv.setOnClickListener(View.OnClickListener { v: View? ->
|
||||
FullScreenUtil.showFullScreenDialog(
|
||||
this,
|
||||
0,
|
||||
oneImageList
|
||||
)
|
||||
})
|
||||
} else { //多图
|
||||
if (it.images.size == 4) {
|
||||
val oneImageYuanJiaoAdapter = OneImageYuanJiaoAdapter(this)
|
||||
val recyclerView: MyGridView = dy_image_recyc
|
||||
recyclerView.numColumns = 3
|
||||
recyclerView.adapter = oneImageYuanJiaoAdapter
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear()
|
||||
for (j in it.images.indices) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(it.images.get(j))
|
||||
}
|
||||
dy_oneimage_iv.visibility = View.GONE
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged()
|
||||
recyclerView.onItemClickListener =
|
||||
AdapterView.OnItemClickListener { parent: AdapterView<*>?, view: View?, position: Int, id: Long ->
|
||||
FullScreenUtil.showFullScreenDialog(
|
||||
this,
|
||||
position,
|
||||
oneImageYuanJiaoAdapter.getList_adapter()
|
||||
)
|
||||
}
|
||||
} else {
|
||||
val oneImageYuanJiaoAdapter = OneImageYuanJiaoAdapter(this)
|
||||
val recyclerView: MyGridView = dy_image_recyc
|
||||
recyclerView.numColumns = 3
|
||||
recyclerView.adapter = oneImageYuanJiaoAdapter
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear()
|
||||
for (j in it.images.indices) {
|
||||
oneImageYuanJiaoAdapter.getList_adapter().add(it.images.get(j))
|
||||
}
|
||||
dy_oneimage_iv.visibility = View.GONE
|
||||
oneImageYuanJiaoAdapter.notifyDataSetChanged()
|
||||
recyclerView.onItemClickListener =
|
||||
AdapterView.OnItemClickListener { parent: AdapterView<*>?, view: View?, position: Int, id: Long ->
|
||||
FullScreenUtil.showFullScreenDialog(
|
||||
this,
|
||||
position,
|
||||
oneImageYuanJiaoAdapter.getList_adapter()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dy_oneimage_iv.visibility = View.GONE
|
||||
dy_image_recyc.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.activity_dongtai
|
||||
|
||||
override fun initView() {
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
intent.getStringExtra("zid")?.let {
|
||||
viewModel.get_zone_info(it)
|
||||
}
|
||||
pingLunListAdapter = PingLunListAdapter()
|
||||
val linearLayoutManager = LinearLayoutManager(this)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
val did = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
|
||||
did.setDrawable(resources.getDrawable(R.drawable.did_gray_dp8))
|
||||
mDataBinding.myList1.addItemDecoration(did)
|
||||
mDataBinding.myList1.layoutManager = linearLayoutManager
|
||||
mDataBinding.myList1.adapter = pingLunListAdapter
|
||||
|
||||
mDataBinding.refreshLayout.setEnableRefresh(false)
|
||||
mDataBinding.refreshLayout.setOnLoadMoreListener {
|
||||
page++
|
||||
viewModel.get_comment_list(getMap())
|
||||
}
|
||||
viewModel.get_comment_list(getMap())
|
||||
}
|
||||
|
||||
override fun initEvent() {
|
||||
mDataBinding.dyHeadImage.setOnClickListener {
|
||||
ARouter.getInstance().build(AroutUtil.MAIN_MY_HOME_PAGE)
|
||||
.withString("from_id", dtUid)
|
||||
.navigation()
|
||||
}
|
||||
dy_more_image.setOnClickListener {
|
||||
if(!TextUtils.isEmpty(dtUid)) {
|
||||
if (dtUid == UserManager.user.uid.toString()) {
|
||||
val dialog: CustomDialog =
|
||||
CustomDialog.build(
|
||||
this,
|
||||
R.layout.dialog_dongtai
|
||||
) { dialog, v ->
|
||||
val confirm = v?.findViewById<TextView>(R.id.tv_confirm)
|
||||
val tv_cancel = v?.findViewById<TextView>(R.id.tv_cancel)
|
||||
confirm?.text = "删除"
|
||||
confirm?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
val id: Int = viewModel.dynamicData.value!!.zid
|
||||
viewModel.delete_zone(id.toString())
|
||||
}
|
||||
tv_cancel?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
}
|
||||
}
|
||||
dialog.cancelable = true
|
||||
dialog.align = BaseDialog.ALIGN.BOTTOM
|
||||
dialog.show()
|
||||
} else {
|
||||
val dialog: CustomDialog =
|
||||
CustomDialog.build(
|
||||
this,
|
||||
R.layout.dialog_dongtai
|
||||
) { dialog, v ->
|
||||
val confirm = v?.findViewById<TextView>(R.id.tv_confirm)
|
||||
val tv_cancel = v?.findViewById<TextView>(R.id.tv_cancel)
|
||||
confirm?.text = "举报"
|
||||
confirm?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO)
|
||||
.withString("uid", viewModel.dynamicData.value!!.uid.toString())
|
||||
.navigation()
|
||||
}
|
||||
|
||||
tv_cancel?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
}
|
||||
}
|
||||
dialog.cancelable = true
|
||||
dialog.align = BaseDialog.ALIGN.BOTTOM
|
||||
dialog.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
mDataBinding.tvSend.setOnClickListener {
|
||||
if (!TextUtils.isEmpty(mDataBinding.etText.text.toString())) {
|
||||
viewModel.dynamicData.value?.let {
|
||||
viewModel.comment_zone(it.zid.toString(), mDataBinding.etText.text.toString())
|
||||
}
|
||||
} else {
|
||||
"请输入内容!".showToast()
|
||||
}
|
||||
|
||||
}
|
||||
pinglun.setOnClickListener {
|
||||
// val payWindow = KeybordWindow(this)
|
||||
// payWindow.showAtLocation(pinglun, Gravity.BOTTOM, 0, 0)
|
||||
// payWindow.setOnDismissListener {
|
||||
// val params = window.attributes
|
||||
// params.alpha = 1f
|
||||
// window.attributes = params
|
||||
// }
|
||||
// payWindow.btn_ok.setOnClickListener { v ->
|
||||
// val str: String = payWindow.editMessage.text.toString()
|
||||
// if (!TextUtils.isEmpty(str)) {
|
||||
// viewModel.dynamicData.value?.let {
|
||||
// viewModel.comment_zone(it.zid.toString(), str)
|
||||
// }
|
||||
// payWindow.dismiss()
|
||||
// } else {
|
||||
// "请输入内容!".showToast()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
guanzhu_btn.setOnClickListener {
|
||||
viewModel.dynamicData.value?.let {
|
||||
if (it.is_follow == 1) {
|
||||
viewModel.cancelFollowData(it.uid.toString())
|
||||
} else {
|
||||
viewModel.followData(it.uid.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
dianzan.setOnClickListener {
|
||||
viewModel.dynamicData.value?.let {
|
||||
if (it.is_praise == 1) {
|
||||
viewModel.praise_zone(it.zid.toString(), 2)
|
||||
} else {
|
||||
viewModel.praise_zone(it.zid.toString(), 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
delete.setOnClickListener {
|
||||
viewModel.delete_zone(intent.getStringExtra("zid").toString())
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private fun getMap(): MutableMap<String, String> {
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
map["page"] = page.toString() + ""
|
||||
map["page_limit"] = "15"
|
||||
intent.getStringExtra("zid")?.let {
|
||||
map["zid"] = it
|
||||
}
|
||||
return map
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.yuyin.module_community.ui.detail
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yuyin.lib_base.base.BaseViewModel
|
||||
import com.yuyin.lib_base.util.showToast
|
||||
import com.yuyin.module_community.model.DynamicBean
|
||||
import com.yuyin.module_community.model.PingLunBean
|
||||
import com.yuyin.module_community.repository.CommunityRepository
|
||||
|
||||
class DongTaiViewModel : BaseViewModel() {
|
||||
var repository = CommunityRepository()
|
||||
var dynamicData = MutableLiveData<DynamicBean>()
|
||||
var followData = MutableLiveData<String>()
|
||||
var cancelFollowData = MutableLiveData<String>()
|
||||
var type = MutableLiveData(0)
|
||||
var praiseAZone = MutableLiveData<Any>()
|
||||
var pingLunData = MutableLiveData<List<PingLunBean>>()
|
||||
var commentZone = MutableLiveData<Any>()
|
||||
|
||||
var deleteZone = MutableLiveData<Any>()
|
||||
fun delete_zone(zid: String) {
|
||||
launchUI {
|
||||
val result = repository.delete_zone(zid)
|
||||
deleteZone.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun get_comment_list(map: MutableMap<String, String>) {
|
||||
launchUI {
|
||||
var result = repository.get_comment_list(map)
|
||||
pingLunData.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun get_zone_info(zid: String) {
|
||||
launchUI {
|
||||
var result = repository.get_zone_info(zid)
|
||||
dynamicData.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun comment_zone(zid: String, content: String) {
|
||||
launchUI {
|
||||
var result = repository.comment_zone(zid, content)
|
||||
commentZone.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun followData(userId: String) {
|
||||
launchUI {
|
||||
baseRepository.follow(userId)
|
||||
followData.value = userId
|
||||
}
|
||||
}
|
||||
|
||||
fun cancelFollowData(userId: String) {
|
||||
launchUI {
|
||||
baseRepository.cancel_follow(userId)
|
||||
cancelFollowData.value = userId
|
||||
}
|
||||
}
|
||||
|
||||
fun praise_zone(zid: String, s: Int) {
|
||||
launchUI {
|
||||
val result = repository.praise_zone(zid)
|
||||
type.value = s
|
||||
praiseAZone.value = result.data
|
||||
result.msg.showToast()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
package com.yuyin.module_community.ui.fabu
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Intent
|
||||
import android.text.Editable
|
||||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.baoyz.actionsheet.ActionSheet
|
||||
import com.lzy.imagepicker.ImagePicker
|
||||
import com.lzy.imagepicker.bean.ImageItem
|
||||
import com.lzy.imagepicker.ui.ImageGridActivity
|
||||
import com.tbruyelle.rxpermissions2.RxPermissions
|
||||
import com.yuyin.lib_base.App
|
||||
import com.yuyin.lib_base.arouter.AroutUtil.COMMUNITY_FABU
|
||||
import com.yuyin.lib_base.base.BaseDataBindingActivity
|
||||
import com.yuyin.lib_base.util.PermissionsChecker
|
||||
import com.yuyin.lib_base.util.showToast
|
||||
import com.yuyin.module_community.R
|
||||
import com.yuyin.module_community.adapter.FBPicListAdapter
|
||||
import com.yuyin.module_community.adapter.FullyGridLayoutManager
|
||||
import com.yuyin.module_community.databinding.ActivitySocialReleaseBinding
|
||||
import com.yuyin.module_community.model.ImageItems
|
||||
import kotlinx.android.synthetic.main.activity_social_release.*
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
import top.zibin.luban.Luban
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
@Route(path = COMMUNITY_FABU)
|
||||
class SocialReleaseActivity :
|
||||
BaseDataBindingActivity<SocialReleaseViewModel, ActivitySocialReleaseBinding>() {
|
||||
|
||||
val REQUEST_CODE_SELECT = 100
|
||||
private var maxSelectNum = 9 //最多显示的图片数量
|
||||
var permissionListTmp = arrayOf<String>(
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
)
|
||||
|
||||
//标签
|
||||
private var imageSize = 0
|
||||
|
||||
override fun startObserve() {
|
||||
viewModel.imgListData.observe(this, {
|
||||
disMiss()
|
||||
setFaBu(it)
|
||||
})
|
||||
viewModel.publishZone.observe(this, {
|
||||
"发布成功".showToast()
|
||||
finish()
|
||||
})
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.activity_social_release
|
||||
|
||||
override fun initView() {
|
||||
adapter.setOnItemClickListener { adapter2, view, position ->
|
||||
var mPermissionsChecker = PermissionsChecker(this@SocialReleaseActivity)
|
||||
if (mPermissionsChecker!!.lacksPermissions(*permissionListTmp)) {
|
||||
ll_quanxian.visibility = View.VISIBLE
|
||||
} else {
|
||||
ll_quanxian.visibility = View.GONE
|
||||
}
|
||||
if (adapter.data[position].type == 2) {
|
||||
var numss = 9 - (adapter.data.size - 1)
|
||||
if (numss > 3) numss = 3
|
||||
val rxPermissions = RxPermissions(this)
|
||||
val finalNumss = numss
|
||||
rxPermissions
|
||||
.request(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||
.subscribe { granted: Boolean ->
|
||||
if (granted) { // Always true pre-M
|
||||
// 跳转到相册
|
||||
ll_quanxian.visibility = View.GONE
|
||||
ImagePicker.getInstance().selectLimit = finalNumss
|
||||
ImagePicker.getInstance().isMultiMode = true
|
||||
ImagePicker.getInstance().isCrop = false
|
||||
val intent = Intent(this, ImageGridActivity::class.java)
|
||||
//显示选中的图片
|
||||
startActivityForResult(intent, REQUEST_CODE_SELECT)
|
||||
} else {
|
||||
ll_quanxian.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
adapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
when (view.id) {
|
||||
R.id.iv_del -> {
|
||||
tempList.removeAt(position)
|
||||
imageListAll1.removeAt(position)
|
||||
imageListAll2 = imageListAll1
|
||||
if (tempList.size == maxSelectNum - 1) {
|
||||
imageListAll2.add(ImageItems(2, ImageItem()))
|
||||
adapter.setNewData(imageListAll2)
|
||||
} else {
|
||||
adapter.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun uploadFile() {
|
||||
val parts = java.util.ArrayList<MultipartBody.Part>()
|
||||
for (i in tempList.indices) {
|
||||
val file = Luban.with(this).load(imageListAll1[i].image.path).get()[0]
|
||||
val requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file)
|
||||
val body = MultipartBody.Part.createFormData("file[]", file.name, requestFile)
|
||||
parts.add(body)
|
||||
}
|
||||
|
||||
if (parts.size != 0) {
|
||||
showLoading()
|
||||
viewModel.uploadImages(parts)
|
||||
} else {
|
||||
setFaBu(null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setFaBu(urls: List<String>?) {
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
if (!TextUtils.isEmpty(mDataBinding.sorEt.text.toString())) {
|
||||
map["content"] = mDataBinding.sorEt.text.toString()
|
||||
}
|
||||
// if (!TextUtils.isEmpty(path) && !TextUtils.isEmpty(sorEt.getText().toString())) {
|
||||
// map["sound"] = urls[0]
|
||||
// map["sound_duration"] = TimeUtil.toDateeee(duration)
|
||||
// } else
|
||||
|
||||
if (tempList.size != 0) {
|
||||
var url_s = ""
|
||||
urls?.let {
|
||||
for (i in urls.indices) {
|
||||
url_s = url_s + (if (TextUtils.isEmpty(url_s)) "" else ",") + urls[i]
|
||||
}
|
||||
}
|
||||
map["images"] = url_s
|
||||
}
|
||||
|
||||
viewModel.publish_zone(map)
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
adapter = FBPicListAdapter()
|
||||
val manager = FullyGridLayoutManager(this, 3, GridLayoutManager.VERTICAL, false)
|
||||
mDataBinding.sorReleaseRv.layoutManager = manager
|
||||
mDataBinding.sorReleaseRv.adapter = adapter
|
||||
imageListAll2.add(ImageItems(2, ImageItem()))
|
||||
adapter.setNewData(imageListAll2)
|
||||
}
|
||||
|
||||
override fun initEvent() {
|
||||
mDataBinding.rightConfirm.setOnClickListener {
|
||||
uploadFile()
|
||||
}
|
||||
mDataBinding.sorEt.addTextChangedListener(object : TextWatcher {
|
||||
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
}
|
||||
|
||||
override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
|
||||
}
|
||||
|
||||
override fun afterTextChanged(p0: Editable?) {
|
||||
mDataBinding.srTextNum.text = mDataBinding.sorEt.text.length.toString()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//弹出选择拍照还是手机相册的弹窗
|
||||
private fun showPop() {
|
||||
ActionSheet.createBuilder(this, supportFragmentManager)
|
||||
.setCancelButtonTitle("取消")
|
||||
.setOtherButtonTitles("相机", "相册")
|
||||
.setCancelableOnTouchOutside(true)
|
||||
.setListener(object : ActionSheet.ActionSheetListener {
|
||||
override fun onDismiss(actionSheet: ActionSheet, isCancel: Boolean) {}
|
||||
override fun onOtherButtonClick(actionSheet: ActionSheet, index: Int) {
|
||||
when (index) {
|
||||
0 -> {
|
||||
val rxPermissions = RxPermissions(this@SocialReleaseActivity)
|
||||
rxPermissions
|
||||
.request(
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
)
|
||||
.subscribe { granted: Boolean ->
|
||||
if (granted) { // Always true pre-M
|
||||
//相机
|
||||
val intent = Intent(
|
||||
this@SocialReleaseActivity,
|
||||
ImageGridActivity::class.java
|
||||
)
|
||||
intent.putExtra(
|
||||
ImageGridActivity.EXTRAS_TAKE_PICKERS,
|
||||
true
|
||||
) // 是否是直接打开相机
|
||||
startActivityForResult(
|
||||
intent,
|
||||
REQUEST_CODE_SELECT
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1 -> {
|
||||
val rxPermissions = RxPermissions(this@SocialReleaseActivity)
|
||||
rxPermissions
|
||||
.request(
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
)
|
||||
.subscribe { granted: Boolean ->
|
||||
if (granted) { // Always true pre-M
|
||||
// 跳转到相册
|
||||
ImagePicker.getInstance().selectLimit =
|
||||
maxSelectNum - imageSize
|
||||
ImagePicker.getInstance().isMultiMode = true
|
||||
val intent = Intent(
|
||||
this@SocialReleaseActivity,
|
||||
ImageGridActivity::class.java
|
||||
)
|
||||
//显示选中的图片
|
||||
startActivityForResult(intent, REQUEST_CODE_SELECT)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).show()
|
||||
|
||||
}
|
||||
|
||||
private var tempList: ArrayList<ImageItem> = ArrayList()
|
||||
private lateinit var adapter: FBPicListAdapter
|
||||
private var imageListAll1 = ArrayList<ImageItems>()
|
||||
private var imageListAll2 = ArrayList<ImageItems>()
|
||||
|
||||
/*------图片选择回调------*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
if (resultCode == ImagePicker.RESULT_CODE_ITEMS) {
|
||||
//添加图片返回
|
||||
if (requestCode == REQUEST_CODE_SELECT) {
|
||||
tempList.addAll(data.getSerializableExtra(ImagePicker.EXTRA_RESULT_ITEMS) as ArrayList<ImageItem>)
|
||||
imageSize = tempList.size
|
||||
if (tempList == null) {
|
||||
return
|
||||
}
|
||||
adapter.data.clear()
|
||||
|
||||
for (i in tempList.indices) {
|
||||
imageListAll1.add(ImageItems(1, tempList[i]))
|
||||
}
|
||||
|
||||
imageListAll2 = imageListAll1
|
||||
if (imageListAll2.size < maxSelectNum) {
|
||||
imageListAll2.add(ImageItems(2, ImageItem()))
|
||||
}
|
||||
|
||||
adapter.setNewData(imageListAll2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yuyin.module_community.ui.fabu
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yuyin.lib_base.base.BaseViewModel
|
||||
import com.yuyin.module_community.repository.CommunityRepository
|
||||
|
||||
class SocialReleaseViewModel : BaseViewModel() {
|
||||
|
||||
var repository = CommunityRepository()
|
||||
var publishZone = MutableLiveData<Any>()
|
||||
|
||||
fun publish_zone(map: MutableMap<String, String>) {
|
||||
launchUI {
|
||||
var result = repository.publish_zone(map)
|
||||
publishZone.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
package com.yuyin.module_community.ui.main
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.baoyz.actionsheet.ActionSheet
|
||||
import com.kongzue.dialog.util.BaseDialog
|
||||
import com.kongzue.dialog.v3.CustomDialog
|
||||
import com.yuyin.lib_base.arouter.AroutUtil
|
||||
import com.yuyin.lib_base.base.BaseDataBindingFragment
|
||||
import com.yuyin.lib_base.base.UserManager
|
||||
import com.yuyin.module_community.R
|
||||
import com.yuyin.module_community.adapter.CommDynamicAdapter
|
||||
import com.yuyin.module_community.databinding.FragmentDynamicBinding
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import java.util.*
|
||||
|
||||
class DynamicFragment : BaseDataBindingFragment<DynamiccViewModel, FragmentDynamicBinding>() {
|
||||
|
||||
private lateinit var commDynamicAdapter: CommDynamicAdapter
|
||||
override fun getLayoutId(): Int = R.layout.fragment_dynamic
|
||||
|
||||
//type 1 最新 2 推荐 3 最新
|
||||
fun getInstance(type: String): DynamicFragment {
|
||||
val fragment = DynamicFragment()
|
||||
val bundle = Bundle()
|
||||
bundle.putString("type", type)
|
||||
fragment.arguments = bundle
|
||||
return fragment
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
EventBus.getDefault().register(this)
|
||||
commDynamicAdapter = CommDynamicAdapter(activity)
|
||||
val linearLayoutManager = LinearLayoutManager(activity)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
val did = DividerItemDecoration(activity, DividerItemDecoration.VERTICAL)
|
||||
did.setDrawable(resources.getDrawable(R.drawable.did_gray_dp8))
|
||||
mDataBinding.myList1.addItemDecoration(did)
|
||||
mDataBinding.myList1.layoutManager = linearLayoutManager
|
||||
mDataBinding.myList1.adapter = commDynamicAdapter
|
||||
|
||||
mDataBinding.refreshLayout.setOnRefreshListener {
|
||||
page = 1
|
||||
viewModel.get_zone_list(getMap())
|
||||
}
|
||||
mDataBinding.refreshLayout.setOnLoadMoreListener {
|
||||
page++
|
||||
viewModel.get_zone_list(getMap())
|
||||
}
|
||||
viewModel.get_zone_list(getMap())
|
||||
commDynamicAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
when (view.id) {
|
||||
R.id.zhuanfa -> {
|
||||
ActionSheet.createBuilder(activity, childFragmentManager)
|
||||
.setCancelButtonTitle("取消")
|
||||
.setOtherButtonTitles(if (commDynamicAdapter.data[position].uid.toString() == UserManager.user.uid.toString()) "删除" else "举报")
|
||||
.setCancelableOnTouchOutside(true)
|
||||
.setListener(object : ActionSheet.ActionSheetListener {
|
||||
override fun onDismiss(actionSheet: ActionSheet, isCancel: Boolean) {}
|
||||
override fun onOtherButtonClick(actionSheet: ActionSheet, index: Int) {
|
||||
if (commDynamicAdapter.data[position].uid.toString() == UserManager.user.uid.toString()) {
|
||||
val id: Int = commDynamicAdapter.data[position].zid
|
||||
viewModel.delete_zone(id.toString())
|
||||
} else {
|
||||
ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO)
|
||||
.withString(
|
||||
"uid",
|
||||
commDynamicAdapter.data[position].uid.toString()
|
||||
).navigation()
|
||||
}
|
||||
}
|
||||
}).show()
|
||||
}
|
||||
R.id.dianzan -> {
|
||||
val id: Int = commDynamicAdapter.data[position].zid
|
||||
val is_praise: Int = commDynamicAdapter.data[position].is_praise
|
||||
if (is_praise == 1) {
|
||||
praise_zone(id.toString() + "", position, 2)
|
||||
} else {
|
||||
praise_zone(id.toString() + "", position, 1)
|
||||
}
|
||||
}
|
||||
R.id.dy_head_image -> {
|
||||
ARouter.getInstance().build(AroutUtil.MAIN_MY_HOME_PAGE)
|
||||
.withString("from_id", commDynamicAdapter.data[position].uid.toString())
|
||||
.navigation()
|
||||
}
|
||||
R.id.guanzhu_btn -> {
|
||||
val uid = commDynamicAdapter.data[position].uid.toString()
|
||||
val is_follow: Int = commDynamicAdapter.data[position].is_follow
|
||||
if (is_follow == 1) {
|
||||
viewModel.cancelFollowData(uid)
|
||||
} else {
|
||||
viewModel.followData(uid)
|
||||
}
|
||||
}
|
||||
R.id.delete -> {
|
||||
val id: Int = commDynamicAdapter.data[position].zid
|
||||
viewModel.delete_zone(id.toString())
|
||||
}
|
||||
R.id.dy_more_image -> {
|
||||
if (commDynamicAdapter.data[position].uid.toString() == UserManager.user.uid.toString()) {
|
||||
val dialog: CustomDialog =
|
||||
CustomDialog.build(requireActivity() as AppCompatActivity,
|
||||
R.layout.dialog_dongtai
|
||||
) { dialog, v ->
|
||||
val confirm = v?.findViewById<TextView>(R.id.tv_confirm)
|
||||
val tv_cancel = v?.findViewById<TextView>(R.id.tv_cancel)
|
||||
confirm?.text = "删除"
|
||||
confirm?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
val id: Int = commDynamicAdapter.data[position].zid
|
||||
viewModel.delete_zone(id.toString())
|
||||
}
|
||||
tv_cancel?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
}
|
||||
}
|
||||
dialog.setCancelable(true)
|
||||
dialog.setAlign(BaseDialog.ALIGN.BOTTOM)
|
||||
|
||||
dialog.show()
|
||||
} else {
|
||||
val dialog: CustomDialog =
|
||||
CustomDialog.build(requireActivity() as AppCompatActivity,
|
||||
R.layout.dialog_dongtai
|
||||
) { dialog, v ->
|
||||
val confirm = v?.findViewById<TextView>(R.id.tv_confirm)
|
||||
val tv_cancel = v?.findViewById<TextView>(R.id.tv_cancel)
|
||||
confirm?.text = "举报"
|
||||
confirm?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
ARouter.getInstance().build(AroutUtil.COMMUNITY_JUBAO)
|
||||
.withString(
|
||||
"uid",
|
||||
commDynamicAdapter.data[position].uid.toString()
|
||||
)
|
||||
.navigation()
|
||||
}
|
||||
tv_cancel?.setOnClickListener {
|
||||
dialog?.doDismiss()
|
||||
}
|
||||
}
|
||||
|
||||
dialog.setAlign(BaseDialog.ALIGN.BOTTOM)
|
||||
dialog.setCancelable(true)
|
||||
dialog.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
commDynamicAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
ARouter.getInstance().build(AroutUtil.COMMUNITY_DETAIL)
|
||||
.withString("zid", commDynamicAdapter.data[position].zid.toString()).navigation()
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public fun receiveMsg(event: Object) {
|
||||
if ("101111".equals(event.toString())) {
|
||||
page = 1
|
||||
viewModel.get_zone_list(getMap())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
private fun praise_zone(s: String, position: Int, i: Int) {
|
||||
viewModel.praise_zone(s, position, i)
|
||||
}
|
||||
|
||||
override fun initEvent() {
|
||||
viewModel.cancelFollowData.observe(this, {
|
||||
for (i in commDynamicAdapter.data.indices) {
|
||||
if (commDynamicAdapter.data[i].uid.toString() == it) {
|
||||
commDynamicAdapter.data[i].is_follow = 0
|
||||
commDynamicAdapter.notifyItemChanged(i, "follow")
|
||||
}
|
||||
}
|
||||
})
|
||||
viewModel.followData.observe(this, {
|
||||
for (i in commDynamicAdapter.data.indices) {
|
||||
if (commDynamicAdapter.data[i].uid.toString() == it) {
|
||||
commDynamicAdapter.data[i].is_follow = 1
|
||||
commDynamicAdapter.notifyItemChanged(i, "follow")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun startObserve() {
|
||||
viewModel.deleteZone.observe(this, {
|
||||
page = 1
|
||||
viewModel.get_zone_list(getMap())
|
||||
})
|
||||
viewModel.praiseAZone.observe(this) {
|
||||
if (viewModel.type.value == 1) {
|
||||
viewModel.selPos.value?.let { commDynamicAdapter.notifyItemChanged(it, "like") }
|
||||
} else if (viewModel.type.value == 2) {
|
||||
viewModel.selPos.value?.let { commDynamicAdapter.notifyItemChanged(it, "unlike") }
|
||||
}
|
||||
}
|
||||
viewModel.getFinally().observe(this) {
|
||||
if (mDataBinding.refreshLayout != null) {
|
||||
mDataBinding.refreshLayout.finishRefresh()
|
||||
mDataBinding.refreshLayout.finishLoadMore()
|
||||
}
|
||||
}
|
||||
viewModel.dynamicList.observe(this) {
|
||||
if (it.isEmpty()) {
|
||||
if (page == 1) {
|
||||
mDataBinding.llNodata.visibility = View.VISIBLE
|
||||
mDataBinding.myList1.visibility = View.GONE
|
||||
}
|
||||
} else {
|
||||
mDataBinding.llNodata.visibility = View.GONE
|
||||
mDataBinding.myList1.visibility = View.VISIBLE
|
||||
if (page == 1) commDynamicAdapter.setNewData(it)
|
||||
else commDynamicAdapter.addData(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private fun getMap(): MutableMap<String, String> {
|
||||
val map: MutableMap<String, String> = HashMap()
|
||||
if (requireArguments().getString("type").equals("2")) map["is_recommend"] = "2"
|
||||
if (requireArguments().getString("type").equals("3")) map["is_follow"] = "1"
|
||||
map["page"] = page.toString() + ""
|
||||
map["page_limit"] = "15"
|
||||
return map
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.yuyin.module_community.ui.main
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yuyin.lib_base.base.BaseViewModel
|
||||
import com.yuyin.lib_base.util.showToast
|
||||
import com.yuyin.module_community.model.DynamicBean
|
||||
import com.yuyin.module_community.repository.CommunityRepository
|
||||
|
||||
class DynamiccViewModel : BaseViewModel() {
|
||||
|
||||
var repository = CommunityRepository()
|
||||
var selPos = MutableLiveData(0)
|
||||
var type = MutableLiveData(0)
|
||||
var praiseAZone = MutableLiveData<Any>()
|
||||
var deleteZone = MutableLiveData<Any>()
|
||||
|
||||
var followData = MutableLiveData<String>()
|
||||
var cancelFollowData = MutableLiveData<String>()
|
||||
|
||||
fun get_zone_list(map: MutableMap<String, String>) {
|
||||
launchUI {
|
||||
var result = repository.get_zone_list(map)
|
||||
dynamicList.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
var dynamicList = MutableLiveData<List<DynamicBean>>()
|
||||
fun get_user_zone_list(map: MutableMap<String, String>) {
|
||||
launchUI {
|
||||
var result = repository.get_user_zone_list(map)
|
||||
dynamicList.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun praise_zone(zid: String, pos: Int, s: Int) {
|
||||
launchUI {
|
||||
val result = repository.praise_zone(zid)
|
||||
selPos.value = pos
|
||||
type.value = s
|
||||
praiseAZone.value = result.data
|
||||
result.msg.showToast()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun delete_zone(zid: String) {
|
||||
launchUI {
|
||||
val result = repository.delete_zone(zid)
|
||||
deleteZone.value = result.data
|
||||
}
|
||||
}
|
||||
|
||||
fun followData(userId: String) {
|
||||
launchUI {
|
||||
baseRepository.follow(userId)
|
||||
followData.value = userId
|
||||
}
|
||||
}
|
||||
|
||||
fun cancelFollowData(userId: String) {
|
||||
launchUI {
|
||||
baseRepository.cancel_follow(userId)
|
||||
cancelFollowData.value = userId
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.yuyin.module_community.view;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.yuyin.module_community.R;
|
||||
|
||||
|
||||
/**
|
||||
* 拍照选择
|
||||
*/
|
||||
public class PhotoWindow extends PopupWindow {
|
||||
|
||||
|
||||
private View view;
|
||||
private Context context;
|
||||
private LinearLayout take_photo, chose_pic;
|
||||
|
||||
public LinearLayout getTake_photo() {
|
||||
return take_photo;
|
||||
}
|
||||
|
||||
public LinearLayout getChose_pic() {
|
||||
return chose_pic;
|
||||
}
|
||||
|
||||
public PhotoWindow(Activity context) {
|
||||
super(context);
|
||||
this.context = context;
|
||||
view = LayoutInflater.from(context).inflate(R.layout.pop_upload_head, null);
|
||||
final LinearLayout dismiss_pop = view.findViewById(R.id.dismiss_pop);
|
||||
take_photo = view.findViewById(R.id.take_photo);
|
||||
chose_pic = view.findViewById(R.id.chose_pic);
|
||||
// 设置SelectPicPopupWindow的View
|
||||
this.setContentView(view);
|
||||
// 设置SelectPicPopupWindow弹出窗体的宽
|
||||
this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT);
|
||||
// 设置SelectPicPopupWindow弹出窗体的高
|
||||
this.setHeight(RelativeLayout.LayoutParams.WRAP_CONTENT);
|
||||
// 设置SelectPicPopupWindow弹出窗体可点击
|
||||
this.setFocusable(true);
|
||||
this.setOutsideTouchable(true);
|
||||
// 刷新状态
|
||||
// this.update();
|
||||
// 实例化一个ColorDrawable颜色为半透明
|
||||
ColorDrawable dw = new ColorDrawable(0x00000000);
|
||||
// 点back键和其他地方使其消失,设置了这个才能触发OnDismisslistener ,设置其他控件变化等操作
|
||||
WindowManager.LayoutParams params= context.getWindow().getAttributes();
|
||||
params.alpha=0.7f;
|
||||
context.getWindow().setAttributes(params);
|
||||
this.setBackgroundDrawable(dw);
|
||||
dismiss_pop.setOnClickListener(view -> {
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 784 B |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 304 B |
7
module_community/src/main/res/drawable/did_gray_dp8.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#333333" />
|
||||
<size android:height="0dp" />
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
9
module_community/src/main/res/drawable/no_follow.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#9A9CFF" />
|
||||
<gradient
|
||||
android:angle="-90"
|
||||
android:endColor="#FFFFFF"
|
||||
android:startColor="#B77CFD" />
|
||||
<corners android:radius="50dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#000000" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#30DEDC" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#22223A" />
|
||||
<corners android:radius="10dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@mipmap/fabu_yuyin" android:state_focused="true" />
|
||||
<item android:drawable="@mipmap/fabu_yuyin_no" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@mipmap/fabu_tupian" android:state_focused="true" />
|
||||
<item android:drawable="@mipmap/fabu_tupian_no" />
|
||||
</selector>
|
||||
6
module_community/src/main/res/drawable/yi_follow.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#383841" />
|
||||
<corners android:radius="30dp" />
|
||||
</shape>
|
||||
508
module_community/src/main/res/layout/activity_dongtai.xml
Normal file
@@ -0,0 +1,508 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/login11"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_base_back"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:src="@mipmap/ic_arrow_back_white_24dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="动态详情"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/translant"
|
||||
android:orientation="vertical"
|
||||
app:elevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/zhengge_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
app:layout_scrollFlags="scroll">
|
||||
<!-- android:background="@drawable/shape_261c39_15"-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.yuyin.lib_base.view.CircularImage
|
||||
android:id="@+id/dy_head_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toRightOf="@id/dy_head_image"
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_sex_image"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_below="@id/dy_name_text"
|
||||
android:layout_gravity="center"
|
||||
android:layout_toRightOf="@id/dy_head_image"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_rank_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_top_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/shape_butt_main_50"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="置顶"
|
||||
android:textColor="#fffefefe"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dy_name_text"
|
||||
android:layout_gravity="center"
|
||||
android:layout_toRightOf="@id/dy_sex_image"
|
||||
android:text="2022-09-12 19:00:00"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="right"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/icon_dongtai_del2"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guanzhu_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/no_follow"
|
||||
android:gravity="center"
|
||||
android:textSize="11sp"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="7"
|
||||
android:textColor="#212121"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_lookmore_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dy_content_tv"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginRight="6dp"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.yuyin.lib_base.view.MyGridView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:numColumns="3"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dy_voice"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_back"
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/shape_butt_main_50" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@mipmap/shequ_yuyin_bofang"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_voice_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="17dp"
|
||||
android:src="@drawable/dongtai_hudong_shengbo" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/dy_oneimage_iv"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_more_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:src="@mipmap/shequ_dongtai_gengduo"
|
||||
android:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/weizhixinxi" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="未知"
|
||||
android:textColor="#ffa7a5ae"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pinglun"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pinglun_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/dongtai_hudong_pinglun" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_comment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textColor="#212121"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dianzan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dianzan_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/dongtai_hudong_dianzan" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_fabulous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="#212121"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/zhuanfa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginLeft="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/zhuanfa_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/santiaogang" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jubao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="#F5F5F5"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="@dimen/dp_10">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/v_view"
|
||||
android:layout_width="15sp"
|
||||
android:layout_height="15sp"
|
||||
android:layout_gravity="right"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/no_follow"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="全部评论"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/myList1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@mipmap/dt_input_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/icon_input" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/translant"
|
||||
android:hint="说点什么"
|
||||
android:textColor="@color/color333333"
|
||||
android:textColorHint="@color/color999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/shape_butt_main_8"
|
||||
android:gravity="center"
|
||||
android:text="发送"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
243
module_community/src/main/res/layout/activity_social_release.xml
Normal file
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/login11">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fabu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_base_back"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="19dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="14dp"
|
||||
android:src="@mipmap/main_back" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="动态发布"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp">
|
||||
<!-- android:background="@drawable/shape_261c39_15"-->
|
||||
<EditText
|
||||
android:id="@+id/sor_et"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@null"
|
||||
android:gravity="start"
|
||||
android:hint="此刻想和大家分享点什么~"
|
||||
android:maxLength="200"
|
||||
android:textColor="#808098"
|
||||
android:textColorHint="#808098"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="15dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sr_text_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="#666666" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="/200"
|
||||
android:textColor="#666666" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dy_voice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="120dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/shequ_yuyin" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@mipmap/shequ_yuyin_bofang" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_voice_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_toRightOf="@id/dy_voice_play"
|
||||
android:textColor="@color/color333333" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/dy_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@+id/dy_voice_back"
|
||||
android:background="@color/translant"
|
||||
android:src="@mipmap/fabu_luyin_quxiao" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/sor_release_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="上传图片"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="显示位置"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/switchs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rightConfirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:layout_marginHorizontal="34dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/shape_butt_main_8"
|
||||
android:gravity="center"
|
||||
android:text="立即发布"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
|
||||
android:id="@+id/ll_quanxian"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone"
|
||||
app:qmui_backgroundColor="@color/white"
|
||||
app:qmui_radius="5dp"
|
||||
tools:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="文件存储和访问权限、相机权限使用说明"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="余音派对申请获取您的存储权限和相机权限,以便您查看、选择相册里的图片/视频发布动态、反馈意见,设置与更换头像、拍照设置头像
|
||||
封面,聊天时分享图片/视频,以及保存图片/视频至相册。您还可以在其他场景访问设备里的照片和视频,以及保存内容到设备"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
362
module_community/src/main/res/layout/comm_dy_item.xml
Normal file
@@ -0,0 +1,362 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/zhengge_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="15sp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingRight="15sp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.yuyin.lib_base.view.CircularImage
|
||||
android:id="@+id/dy_head_image"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_name_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#212121"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_sex_image"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="5dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_rank_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_top_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/shape_butt_main_50"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="置顶"
|
||||
android:textColor="#fffefefe"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_time_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/dy_name_text"
|
||||
android:layout_gravity="center"
|
||||
android:layout_toRightOf="@id/dy_sex_image"
|
||||
android:textColor="#999999"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="right"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/icon_dongtai_del2"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/guanzhu_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/no_follow"
|
||||
android:gravity="center"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_content_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="7"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_lookmore_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginRight="6dp"
|
||||
android:text="查看更多"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/aaa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<com.yuyin.lib_base.view.MyGridView
|
||||
android:id="@+id/dy_image_recyc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:numColumns="3"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dy_voice"
|
||||
android:layout_width="165dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_back"
|
||||
android:layout_width="163dp"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/shape_butt_main_50" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_voice_play"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:src="@mipmap/shequ_yuyin_bofang"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_voice_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="17dp"
|
||||
android:src="@drawable/dongtai_hudong_shengbo" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/dy_oneimage_iv"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:riv_corner_radius="5dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/weizhixinxi" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAddress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="未知"
|
||||
android:textColor="#ffa7a5ae"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dy_more_image"
|
||||
android:layout_width="30dp"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/shequ_dongtai_gengduo"
|
||||
android:visibility="visible" />
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="1dp"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/pinglun"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pinglun_image"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/dongtai_hudong_pinglun" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_comment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dianzan"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dianzan_image"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/dongtai_hudong_dianzan" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_fabulous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/zhuanfa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginLeft="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/zhuanfa_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@mipmap/santiaogang" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dy_share"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/color333333"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jubao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
61
module_community/src/main/res/layout/dialog_dongtai.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom|center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:qmui_backgroundColor="#FFFFFF"
|
||||
app:qmui_radiusTopLeft="@dimen/dp_10"
|
||||
app:qmui_radiusTopRight="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="举报"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="#66111111" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="取消"
|
||||
android:textColor="@color/black" />
|
||||
</com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
55
module_community/src/main/res/layout/fragment_dynamic.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/myList1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="125dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/no_data" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="这里空空的哦~"
|
||||
android:textColor="@color/color999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
34
module_community/src/main/res/layout/gv_filter_image.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:id="@+id/layout_img"
|
||||
android:layout_marginHorizontal="5dp"
|
||||
app:layout_constraintDimensionRatio="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/fiv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="12dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/fabu_tupian_shanchu"
|
||||
android:visibility="visible" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
26
module_community/src/main/res/layout/item_fabu_pics.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_margin="5dp"
|
||||
android:gravity="center">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_add_pic22"
|
||||
app:riv_corner_radius="5dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_del"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/icon_dongtai_del"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
81
module_community/src/main/res/layout/item_pinglun.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.yuyin.lib_base.view.CircularImage
|
||||
android:id="@+id/iv_img"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jesur"
|
||||
android:textColor="#212121"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sex"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/login_reg_nan1" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="14dp"
|
||||
android:text="14分钟前"
|
||||
android:layout_alignParentRight="true"
|
||||
android:textColor="#66111111"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="你好美女,可以聊聊吗?"
|
||||
android:textColor="#212121"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:visibility="gone"
|
||||
android:background="#1a333333" />
|
||||
|
||||
</LinearLayout>
|
||||
62
module_community/src/main/res/layout/pop_upload_head.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:background="@color/white"
|
||||
android:id="@+id/take_photo"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="拍照" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:background="@color/color_dddddd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/chose_pic"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:background="@color/white"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="从手机选择"/>
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:background="@color/color_dddddd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"/>
|
||||
<LinearLayout
|
||||
android:background="@color/white"
|
||||
android:id="@+id/dismiss_pop"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="取消" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
BIN
module_community/src/main/res/mipmap-xxhdpi/community_bg1.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/dt_input_bg.webp
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu2.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu_shangchuan.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu_tupian.webp
Normal file
|
After Width: | Height: | Size: 592 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu_tupian_no.webp
Normal file
|
After Width: | Height: | Size: 554 B |
|
After Width: | Height: | Size: 572 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu_yuyin.webp
Normal file
|
After Width: | Height: | Size: 662 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/fabu_yuyin_no.webp
Normal file
|
After Width: | Height: | Size: 604 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/guanzhi1.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/guanzhi2.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 838 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/icon_add_pic22.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 406 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/icon_input.webp
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/no_follow.webp
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/santiaogang.webp
Normal file
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 488 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/shequ_yuyin.webp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 56 B |
BIN
module_community/src/main/res/mipmap-xxhdpi/switch_off.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/switch_on.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/tuijian1.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/tuijian2.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/weizhixinxi.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/yi_follow.webp
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/zuiixn1.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
module_community/src/main/res/mipmap-xxhdpi/zuiixn2.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
4
module_community/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
</resources>
|
||||
3
module_community/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">module_login</string>
|
||||
</resources>
|
||||
10
module_community/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimary</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||