作者 daidong

通知3.26

... ... @@ -43,7 +43,6 @@
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />
<activity android:name=".ui.jxt.fragment.Tz.Tjtzmb_Activity" />
<activity android:name=".ui.jxt.fragment.Tz.Tzmb_Activity" />
<activity android:name=".ui.jxt.fragment.Tz.FbtzA_ctivity" />
<activity android:name=".ui.jxt.fragment.Tz.TzxqActivity" />
<activity android:name=".ui.jxt.activity.HD.HdMbActivity" />
<activity android:name=".zxing.Jifen_Activity" />
... ... @@ -115,7 +114,7 @@
android:name=".ui.jxt.activity.Tzmb_Activity"
android:windowSoftInputMode="adjustResize|stateHidden" />
<activity
android:name=".ui.jxt.activity.Fbtz_Activity"
android:name=".ui.jxt.fragment.Tz.FbtzA_ctivity"
android:windowSoftInputMode="adjustResize|stateHidden" />
<activity
android:name=".ui.jxt.activity.Zyxqck_Activity"
... ...
... ... @@ -370,6 +370,7 @@ public interface ApiService {
@POST("/api/home_school/getListParent")
Observable<HdLBBean> getParentHdList(@Header("token") String token, @Query("type") int type);
@POST("/api/active/getTemplate")
Observable<HDMBBean>getTemplate(@Header("token") String token);
@POST("/api/active/setTemplate")
Observable<AddMbBean>setTemplate(@Header("token") String token, String title, String content,String imgpath);
... ...
package com.yinhebairong.clasmanage.ui.jxt.activity;
import android.graphics.Color;
import com.yinhebairong.clasmanage.R;
import com.yinhebairong.clasmanage.base.BaseActivity;
import com.yinhebairong.clasmanage.base.instant.Layout;
import com.yinhebairong.clasmanage.base.instant.TopNavigationBar;
import com.yinhebairong.clasmanage.base.instant.slideslip.SlideLip;
@SlideLip(slidelip = false) // 侧滑返回上一页 , 默认不开启 \
@TopNavigationBar(color = Color.TRANSPARENT, setBarBiack = 2) // 状态栏颜色 , 状态栏样式
@Layout(R.layout.activity_fbtz)
public class Fbtz_Activity extends BaseActivity {
@Override
protected void initData() {
}
@Override
protected void setEvent() {
}
}
... ... @@ -41,7 +41,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.donkingliang.imageselector.utils.ImageSelector;
... ... @@ -53,7 +52,6 @@ import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.yinhebairong.clasmanage.Config;
import com.yinhebairong.clasmanage.R;
import com.yinhebairong.clasmanage.adapter.imageselect.SquareImageView;
import com.yinhebairong.clasmanage.adapter.jxtadapter.TzMbAdatper;
import com.yinhebairong.clasmanage.adapter.jxtadapter.TztjmbAdapter;
import com.yinhebairong.clasmanage.base.BaseActivity;
import com.yinhebairong.clasmanage.base.instant.Layout;
... ... @@ -65,9 +63,6 @@ import com.yinhebairong.clasmanage.entity.PostFiel;
import com.yinhebairong.clasmanage.entity.VideoEntity;
import com.yinhebairong.clasmanage.m.M;
import com.yinhebairong.clasmanage.network.ApiService;
import com.yinhebairong.clasmanage.ui.jxt.activity.Fbzy_Activity;
import com.yinhebairong.clasmanage.ui.jxt.activity.Jsbj_Activity;
import com.yinhebairong.clasmanage.ui.jxt.activity.Jsbj_Activity_ViewBinding;
import com.yinhebairong.clasmanage.ui.jxt.fragment.Jl.JsjlActivity;
import com.yinhebairong.clasmanage.utils.AudioUtils;
import com.yinhebairong.clasmanage.widget.CircularProgressBar;
... ... @@ -130,10 +125,11 @@ public class FbtzA_ctivity extends BaseActivity {
String teacherIds = "";
String content = "";
private final static int STRAT_ID = 1998;
private final static int HDXZ_ID = 1999;
private final static int TZXZ_ID = 1999;
@BindView(R.id.et_tzzt)
EditText etTzzt;
TzMbBean.DataBean.ItemBean tzmb_item = new TzMbBean.DataBean.ItemBean();
TzMbBean.DataBean.ItemBean itemBean;
List<String> links_list = new ArrayList<>();
String audio = "";
String img = "";
... ... @@ -160,6 +156,11 @@ public class FbtzA_ctivity extends BaseActivity {
TztjmbAdapter tzMbAdatper;
String title;
String contextText;
@BindView(R.id.select_text)
TextView selectText;
@BindView(R.id.tv_xbjf)
TextView tvXbjf;
@Override
protected void initData() {
title = getIntent().getStringExtra("title");
... ... @@ -176,177 +177,19 @@ public class FbtzA_ctivity extends BaseActivity {
// mediaPlayer.setVolume(0.5f, 0.5f);
getMbDAta();
includeName.setText("发布通知");
includeBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
classSelect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(FbtzA_ctivity.this, JsjlActivity.class);
startActivityForResult(intent, STRAT_ID);
}
});
addTzmb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(FbtzA_ctivity.this, Tzmb_Activity.class);
startActivity(intent);
startActivityForResult(intent, HDXZ_ID);
}
});
fabutzBut.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!classId.equals("")) {
if (!parentIds.equals("")) {
name = etTzzt.getText().toString();
if (!name.equals("")) {
content = contentEd.getText().toString();
if (!content.equals("")) {
WaitDialog.show(FbtzA_ctivity.this, "请稍候...");
ArrayList<String> videos = new ArrayList<>();
for (int i = 0; i < frequencyUrl.size(); i++) {
videos.add(frequencyUrl.get(i).getVideoPath());
}
audio = TextUtils.join(",", videos);
img = TextUtils.join(",",ImagesUrl);
video = TextUtils.join(",",videoUrl);
links = TextUtils.join(",",links_list);
Log.i("录音", "onClick: " + audio);
Api().fbtz(Config.Token, classId, teacherIds, parentIds, name, content, tzmb_item.getCall(), tzmb_item.getInscription(), img, audio, video,links).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<FbtzEntity>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(FbtzEntity fbtzEntity) {
if (fbtzEntity.getCode() == M.success) {
finish();
} else {
Toast.makeText(ctx, "" + fbtzEntity.getMsg(), Toast.LENGTH_SHORT).show();
WaitDialog.dismiss();
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
} else {
Toast.makeText(ctx, "请输入通知内容", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请输入通知的标题", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请选择接收通知的家长", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请选择接受的班级", Toast.LENGTH_SHORT).show();
}
}
});
addTzmb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(FbtzA_ctivity.this, Tzmb_Activity.class);
startActivityForResult(intent, HDXZ_ID);
}
});
imageAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
imgPop(picAndVideo, position);
}
});
audioAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
text_time = view.findViewById(R.id.text_time);
List<VideoEntity> data = audioAdapter.getData();
for (int i = 0; i < data.size(); i++) {
data.get(i).setChecked(false);
}
try {
if (mediaPlayer.isPlaying()) {
mediaPlayer.reset();
data.get(position).setChecked(true);
mediaPlayer.setDataSource(data.get(position).getVideoPath());
mediaPlayer.prepare();
mediaPlayer.start();
updateDescTv();
} else {
mediaPlayer.reset();
mediaPlayer.setDataSource(data.get(position).getVideoPath());
mediaPlayer.prepare();
mediaPlayer.start();
updateDescTv();
}
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
int duration = mediaPlayer.getDuration();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss");
Date date = new Date(duration);
String format = simpleDateFormat.format(date);
text_time.setText(format);
}
});
} catch (IOException e) {
e.printStackTrace();
}
adapter.notifyDataSetChanged();
}
});
audioAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
List<VideoEntity> data = audioAdapter.getData();
data.remove(position);
mediaPlayer.stop();
audioAdapter.notifyDataSetChanged();
}
});
imgRecycle.setLayoutManager(new GridLayoutManager(this, 3));
imgRecycle.setAdapter(imageAdapter);
imageAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
switch (view.getId()) {
case R.id.v_delete:
if (picAndVideo.get(position).getType() == 1) {
ImagesUrl.remove(picAndVideo.get(position).getPath());
} else if (picAndVideo.get(position).getType() == 2) {
videoUrl.remove(picAndVideo.get(position).getPath());
} else if (picAndVideo.get(position).getType() == 3) {
frequencyUrl.remove(picAndVideo.get(position).getPath());
}
picAndVideo.remove(position);
adapter.notifyDataSetChanged();
break;
case R.id.item_select_pic_video:
break;
}
}
});
}
// @Override
// protected void onResume() {
// super.onResume();
// if (getIntent().getExtras() != null) {
// Intent intent = getIntent();
// Bundle tzmb_item = intent.getExtras();
// itemBean = (TzMbBean.DataBean.ItemBean) tzmb_item.getSerializable("tzmb_item");
// classType.setText(itemBean.getTitle());
// }
// }
private void getMbDAta() {
Api().tjmb(Config.Token)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
... ... @@ -358,27 +201,27 @@ public class FbtzA_ctivity extends BaseActivity {
@Override
public void onNext(TztjmbBean tztjmbBean) {
if (tztjmbBean.getCode() == M.success){
if (tzMbAdatper==null){
tzMbAdatper = new TztjmbAdapter(R.layout.item_fbhdxqtem,tztjmbBean.getData());
if (tztjmbBean.getCode() == M.success) {
if (tzMbAdatper == null) {
tzMbAdatper = new TztjmbAdapter(R.layout.item_fbhdxqtem, tztjmbBean.getData());
moBanRv.setAdapter(tzMbAdatper);
tzMbAdatper.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
TextView hdtext = view.findViewById(R.id.hdtext);
if (tzMbAdatper.getData().get(position).isChecked()){
if (tzMbAdatper.getData().get(position).isChecked()) {
hdtext.setEnabled(false);
tzMbAdatper.getData().get(position).setChecked(false);
tzMbAdatper.getData().get(position).getContent();
etTzzt.setText(tzMbAdatper.getData().get(position).getTitle());
contentEd.setText(tzMbAdatper.getData().get(position).getContent());
}else {
} else {
tzMbAdatper.getData().get(position).setChecked(true);
hdtext.setEnabled(true);
}
}
});
}else {
} else {
tzMbAdatper.setNewData(tztjmbBean.getData());
tzMbAdatper.notifyDataSetChanged();
}
... ... @@ -498,11 +341,11 @@ public class FbtzA_ctivity extends BaseActivity {
private void AudioPop() {
View view = LayoutInflater.from(FbtzA_ctivity.this).inflate(R.layout.pop_ly_window,null);
View view = LayoutInflater.from(FbtzA_ctivity.this).inflate(R.layout.pop_ly_window, null);
// 弹窗
final PopupWindow popupWindow = new PopupWindow(view, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
ImageView ly_but = view.findViewById(R.id.ly_but);
time_text= view.findViewById(R.id.time_text);
time_text = view.findViewById(R.id.time_text);
TextView ly_style = view.findViewById(R.id.ly_style);
Circular_bar = view.findViewById(R.id.Circular_bar);
Circular_bar.setMax(600);
... ... @@ -510,13 +353,13 @@ public class FbtzA_ctivity extends BaseActivity {
RelativeLayout luyi_rl = view.findViewById(R.id.luyi_rl);
LinearLayout ly_li = view.findViewById(R.id.ly_li);
ViewGroup.LayoutParams layoutParams = ly_li.getLayoutParams();
layoutParams.height = layoutParams.height+M.getNavigationBarHeight(this);
layoutParams.height = layoutParams.height + M.getNavigationBarHeight(this);
ly_li.setLayoutParams(layoutParams);
popupWindow.setOutsideTouchable(true);
popupWindow.setTouchable(true);
popupWindow.setFocusable(true);
setBackgroundAlpha(0.5f);//设置屏幕透明度
popupWindow.showAtLocation(view,Gravity.BOTTOM,0,M.getNavigationBarHeight(this));
popupWindow.showAtLocation(view, Gravity.BOTTOM, 0, M.getNavigationBarHeight(this));
Circular_bar.setVisibility(View.GONE);
AudioUtils audioUtils = new AudioUtils(FbtzA_ctivity.this);
luyi_rl.setOnClickListener(new View.OnClickListener() {
... ... @@ -527,8 +370,8 @@ public class FbtzA_ctivity extends BaseActivity {
int checkSelfPermission = ContextCompat.checkSelfPermission(FbtzA_ctivity.this,
Manifest.permission.RECORD_AUDIO);
if (permission == PackageManager.PERMISSION_GRANTED) {
if (checkSelfPermission==PackageManager.PERMISSION_GRANTED){
if (ly_but.isEnabled()){
if (checkSelfPermission == PackageManager.PERMISSION_GRANTED) {
if (ly_but.isEnabled()) {
ly_but.setEnabled(false);
Circular_bar.setVisibility(View.VISIBLE);
ly_style.setText("点击结束录音");
... ... @@ -536,18 +379,18 @@ public class FbtzA_ctivity extends BaseActivity {
audioUtils.StratAudio();
popupWindow.dismiss();
}else {
} else {
ly_but.setEnabled(true);
Circular_bar.setVisibility(View.GONE);
audioUtils.EndAudio();
String filePath = audioUtils.getFilePath();
postFile(filePath,3,"");
postFile(filePath, 3, "");
ly_style.setText("点击录音");
// Log.i(TAG, "onClick: "+filePath);
handler.removeCallbacks(runnable);
endTime();
}
}else {
} else {
//没有权限,申请权限。
ActivityCompat.requestPermissions(FbtzA_ctivity.this,
new String[]{Manifest.permission.RECORD_AUDIO}, 1);
... ... @@ -576,7 +419,6 @@ public class FbtzA_ctivity extends BaseActivity {
}
/*--------------------------------------------查看大图详情----------------------------------------------------------*/
float x1 = 0, x2 = 0; // 滑动坐标轴
int pageSze; // 页数
... ... @@ -741,8 +583,175 @@ public class FbtzA_ctivity extends BaseActivity {
@Override
protected void setEvent() {
includeBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
classSelect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(FbtzA_ctivity.this, JsjlActivity.class);
startActivityForResult(intent, STRAT_ID);
}
});
addTzmb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(FbtzA_ctivity.this, Tzmb_Activity.class);
startActivity(intent);
startActivityForResult(intent, TZXZ_ID);
}
});
fabutzBut.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!classId.equals("")) {
if (!parentIds.equals("")) {
name = etTzzt.getText().toString();
if (!name.equals("")) {
content = contentEd.getText().toString();
if (!content.equals("")) {
WaitDialog.show(FbtzA_ctivity.this, "请稍候...");
ArrayList<String> videos = new ArrayList<>();
for (int i = 0; i < frequencyUrl.size(); i++) {
videos.add(frequencyUrl.get(i).getVideoPath());
}
audio = TextUtils.join(",", videos);
img = TextUtils.join(",", ImagesUrl);
video = TextUtils.join(",", videoUrl);
links = TextUtils.join(",", links_list);
Log.i("录音", "onClick: " + audio);
Api().fbtz(Config.Token, classId, teacherIds, parentIds, name, content, tzmb_item.getCall(), tzmb_item.getInscription(), img, audio, video, links).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<FbtzEntity>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(FbtzEntity fbtzEntity) {
if (fbtzEntity.getCode() == M.success) {
finish();
} else {
Toast.makeText(ctx, "" + fbtzEntity.getMsg(), Toast.LENGTH_SHORT).show();
WaitDialog.dismiss();
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
} else {
Toast.makeText(ctx, "请输入通知内容", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请输入通知的标题", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请选择接收通知的家长", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(ctx, "请选择接受的班级", Toast.LENGTH_SHORT).show();
}
}
});
addTzmb.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(FbtzA_ctivity.this, Tzmb_Activity.class);
startActivityForResult(intent, TZXZ_ID);
}
});
imageAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
imgPop(picAndVideo, position);
}
});
audioAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
text_time = view.findViewById(R.id.text_time);
List<VideoEntity> data = audioAdapter.getData();
for (int i = 0; i < data.size(); i++) {
data.get(i).setChecked(false);
}
try {
if (mediaPlayer.isPlaying()) {
mediaPlayer.reset();
data.get(position).setChecked(true);
mediaPlayer.setDataSource(data.get(position).getVideoPath());
mediaPlayer.prepare();
mediaPlayer.start();
updateDescTv();
} else {
mediaPlayer.reset();
mediaPlayer.setDataSource(data.get(position).getVideoPath());
mediaPlayer.prepare();
mediaPlayer.start();
updateDescTv();
}
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
int duration = mediaPlayer.getDuration();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss");
Date date = new Date(duration);
String format = simpleDateFormat.format(date);
text_time.setText(format);
}
});
} catch (IOException e) {
e.printStackTrace();
}
adapter.notifyDataSetChanged();
}
});
audioAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
List<VideoEntity> data = audioAdapter.getData();
data.remove(position);
mediaPlayer.stop();
audioAdapter.notifyDataSetChanged();
}
});
imgRecycle.setLayoutManager(new GridLayoutManager(this, 3));
imgRecycle.setAdapter(imageAdapter);
imageAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
switch (view.getId()) {
case R.id.v_delete:
if (picAndVideo.get(position).getType() == 1) {
ImagesUrl.remove(picAndVideo.get(position).getPath());
} else if (picAndVideo.get(position).getType() == 2) {
videoUrl.remove(picAndVideo.get(position).getPath());
} else if (picAndVideo.get(position).getType() == 3) {
frequencyUrl.remove(picAndVideo.get(position).getPath());
}
picAndVideo.remove(position);
adapter.notifyDataSetChanged();
break;
case R.id.item_select_pic_video:
break;
}
}
});
}
@RequiresApi(api = Build.VERSION_CODES.O)
... ... @@ -827,9 +836,6 @@ public class FbtzA_ctivity extends BaseActivity {
}
/*--------------------------------------------------------------------------图片适配器----------------------------------------------------------------*/
class ImageAdapter extends BaseQuickAdapter<JxtImageEntity, BaseViewHolder> {
public ImageAdapter(int layoutResId, @Nullable List<JxtImageEntity> data) {
... ... @@ -897,6 +903,7 @@ public class FbtzA_ctivity extends BaseActivity {
String format = simpleDateFormat.format(date);
time_text.setText(format);
}
private void endTime() {
time = 0;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss");
... ...
... ... @@ -46,8 +46,14 @@ public class Tzmb_Activity extends BaseActivity {
@Override
protected void initData() {
includeBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
includeName.setText("通知模板");
Api().tzmb(Config.Token)
Api().tzmb(Config.Token)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<TzMbBean>() {
@Override
... ... @@ -78,13 +84,6 @@ public class Tzmb_Activity extends BaseActivity {
@Override
protected void setEvent() {
includeBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
addMoban.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
... ... @@ -95,6 +94,40 @@ public class Tzmb_Activity extends BaseActivity {
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode==000&&resultCode==RESULT_OK){
Api().tzmb(Config.Token)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<TzMbBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(TzMbBean tzMbBean) {
if (tzMbBean.getCode() == M.success){
tzmbAdapter.setNewData(tzMbBean.getData());
tzmbAdapter.notifyDataSetChanged();
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
}
class TzmbAdapter extends BaseQuickAdapter< TzMbBean.DataBean, BaseViewHolder> {
... ...
... ... @@ -69,17 +69,19 @@ public class TzmbxqActivity extends BaseActivity {
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(TzmbxqActivity.this, FbtzA_ctivity.class);
intent.putExtra("title",itemBean.getTitle());
intent.putExtra("contextText",itemBean.getContent());
Bundle bundle = new Bundle();
bundle.putSerializable("tzmb_item", itemBean);
intent.putExtra("title",itemBean.getTitle());
intent.putExtra("contextText",itemBean.getContent());
intent.putExtras(bundle);
startActivity(intent);
}
});
}
@OnClick(R.id.hd_button_tj)
public void onViewClicked() {
finish();
}
}
... ...
... ... @@ -47,7 +47,6 @@ import okhttp3.RequestBody;
@Layout(R.layout.fragment_tz_rv)
public class Tz_Rv_Fragment extends BaseFragment {
Jxt_Tz_Adapter jxt_tz_adapter;
Jxt_Tz_jzAdapter jxt_tz_jzAdapter;
@BindView(R.id.jxt_matter_li)
... ... @@ -338,10 +337,10 @@ public class Tz_Rv_Fragment extends BaseFragment {
}else {
massage_num.setText(item.getUncomment_num()+"");
}
if (item.getIs_online() ==0){
state_tv.setText("已查看");
}else {
if (item.getIs_online() == 0){
state_tv.setText("未查看");
}else {
state_tv.setText("已查看");
}
}
... ...
... ... @@ -90,7 +90,7 @@
android:id="@+id/select_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请选择"
android:text=""
android:textColor="#8C9198"
android:textSize="@dimen/sp_16" />
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="#F7F7F7"
tools:context=".ui.jxt.activity.Fbtz_Activity">
<include layout="@layout/include_title" android:id="@+id/title"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginBottom="@dimen/dp_60">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:gravity="center_vertical"
android:background="#FFFFFF"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#F57F17"
android:layout_marginLeft="@dimen/dp_16"
android:textSize="@dimen/sp_16"
android:text="接收班级"/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="@dimen/dp_23"
android:layout_marginRight="@dimen/dp_16"
android:visibility="invisible"></androidx.recyclerview.widget.RecyclerView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请选择"
android:textSize="@dimen/sp_16"
android:visibility="gone"
android:textColor="#8C9198"/>
<ImageView
android:layout_marginLeft="@dimen/dp_6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_right"
android:layout_marginRight="@dimen/dp_16"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#EBEBEB"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_marginTop="@dimen/dp_16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#F57F17"
android:layout_marginLeft="@dimen/dp_16"
android:textSize="@dimen/sp_16"
android:text="通知模板"/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<ImageView
android:layout_marginLeft="@dimen/dp_6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_right"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="@dimen/dp_8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_16"></androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/dp_8"
android:layout_width="match_parent"
android:orientation="vertical"
android:background="#FFFFFF"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_54"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#F57F17"
android:layout_marginLeft="@dimen/dp_16"
android:textSize="@dimen/sp_16"
android:text="通知主题"/>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="right"
android:layout_marginRight="@dimen/dp_16"
android:hint="请输入"
android:background="@null"
android:textSize="@dimen/sp_16"
android:textColor="#8C9198"/>
</LinearLayout>
<EditText
android:background="@null"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_120"
android:gravity="top"
android:hint="请输入内容..."
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:paddingTop="@dimen/dp_16"/>
<androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="@dimen/dp_12"
android:layout_width="match_parent"
android:layout_height="wrap_content"></androidx.recyclerview.widget.RecyclerView>
<androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="@dimen/dp_12"
android:layout_width="match_parent"
android:layout_height="wrap_content"></androidx.recyclerview.widget.RecyclerView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_16"
android:src="@mipmap/ic_voice"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_20"
android:src="@mipmap/ic_image"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_20"
android:src="@mipmap/icon_play"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_20"
android:src="@mipmap/ic_link"/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0/1000"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/dp_16"
android:textSize="@dimen/sp_12"
android:textColor="#8C9198"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#EBEBEB"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"/>
<LinearLayout
android:background="#FFFFFF"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#F57F17"
android:layout_marginRight="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:textSize="@dimen/sp_16"
android:layout_marginLeft="@dimen/dp_16"
android:text="喜报加分"
/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+0分"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/dp_16"
android:textSize="@dimen/sp_12"
android:textColor="#3D444D"/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:orientation="vertical"
android:gravity="center"
android:background="#FFFFFF"
android:layout_alignParentBottom="true">
<Button
android:layout_width="@dimen/dp_343"
android:layout_height="@dimen/dp_44"
android:gravity="center"
android:textColor="#FFFFFF"
android:textSize="@dimen/sp_14"
android:text="发布通知"
android:background="@drawable/dot_yellow"/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
... ... @@ -97,6 +97,8 @@
android:layout_weight="1" />
<TextView
android:text=""
android:id="@+id/select_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#8C9198"
... ... @@ -225,7 +227,40 @@
android:layout_weight="1"
/>
</LinearLayout>
<LinearLayout
android:background="#FFFFFF"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#F57F17"
android:layout_marginRight="@dimen/dp_16"
android:layout_gravity="center_vertical"
android:textSize="@dimen/sp_16"
android:layout_marginLeft="@dimen/dp_16"
android:text="喜报加分"
/>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>
<TextView
android:id="@+id/tv_xbjf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="+0分"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_marginRight="@dimen/dp_16"
android:textSize="@dimen/sp_12"
android:textColor="#3D444D"/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
... ...
... ... @@ -135,6 +135,6 @@
android:textColor="#FFFFFF"
android:textSize="@dimen/sp_14"
android:text="添加"
android:background="@drawable/dot_yellow1"/>
android:background="@drawable/dot_yellow"/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
... ...
... ... @@ -139,10 +139,10 @@
android:text="已查看"
/>
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
... ...