完整版11月13日 16:38

master
Toyga 3 years ago
parent 9611c4dda8
commit 0a2bf07c46

@ -107,9 +107,6 @@
<activity
android:name=".Activity.SendInvitationActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".Activity.GoAnswerActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<activity
android:name=".Activity.SendQuestionActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

@ -48,8 +48,9 @@ public class BlogDetailActivity extends BaseActivity {
TextView comComView;
ImageView detail_to;
ImageView search;
ImageView img_person;
ImageView bColImage;
Blog blog=new Blog();
Blog blog = new Blog();
User author;
List<Comment> commentList=new ArrayList<>();
CommentAdapter commentAdapter=new CommentAdapter();
@ -131,7 +132,6 @@ public class BlogDetailActivity extends BaseActivity {
String url = BaseActivity.SERVER_URL + "/main-servlet?action=getUserById";
Map<String,String> paramMap = new HashMap<String,String>();
paramMap.put("uid", String.valueOf(blog.getUid()));
Log.e("设置帖子的作者uid",uid);
OkHttpUtil.asyPost(url, paramMap, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
@ -145,11 +145,8 @@ public class BlogDetailActivity extends BaseActivity {
@Override
public void run() {
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
// 创建一个 TypeToken 的匿名子类对象,并调用对象的 getType()方法
// Log.e("Blog's Str",jsonStr);
Type listType = new TypeToken<User>() {}.getType();
author = gson.fromJson(jsonStr, listType);
// bAuthorNameView=findViewById(R.id.author);
bAuthorNameView.setText(author.getUsername());
}
});
@ -163,6 +160,7 @@ public class BlogDetailActivity extends BaseActivity {
}
private void initView(){
img_person = findViewById(R.id.img_person);
bTitleView=findViewById(R.id.detail_theme);
bAuthorNameView=findViewById(R.id.author);
bContentView=findViewById(R.id.bContent);
@ -180,7 +178,6 @@ public class BlogDetailActivity extends BaseActivity {
private void setData(){
setBlogAuthorName(String.valueOf(blog.getUid()));
// setBColNumViewImage(blog.getBid(),BaseActivity.owner.getNetId()); 需要传入登录用户的id
setBColNumViewImage(blog.getBid(),BaseActivity.owner.getNetId(),2);
bViewNumView.setText(String.valueOf(blog.getBbrowse()));
bTitleView.setText(blog.getBtittle());
@ -211,12 +208,21 @@ public class BlogDetailActivity extends BaseActivity {
}
}
});
System.out.println("更新collect表成功");
}
}).start();
}
private void initClick(){
img_person.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(BlogDetailActivity.this, ChatActivity.class);
intent.putExtra("friendNetId", blog.getUid());
intent.putExtra("friendName", bAuthorNameView.getText().toString());
startActivity(intent);
}
});
detail_to.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {

@ -106,6 +106,8 @@ public class ChatActivity extends BaseActivity {
addMsg(message,1);
edit_content.setText("");
wsClient.send(gson.toJson(jsonMap));
if(friendDao.findByNetId(friendNetId, owner.getNetId())==null)
friendDao.insert(currentFriend);
}
}
});
@ -121,12 +123,13 @@ public class ChatActivity extends BaseActivity {
//从intent中取出currentNetId并查出对象
Intent intent = getIntent();
friendNetId = intent.getIntExtra("friendNetId", -1);
Log.d("ChatActivity","当前聊天对象ID"+friendNetId);
currentFriend = friendDao.findByNetId(friendNetId, owner.getNetId());
Log.d("ChatActivity","当前聊天对象:"+currentFriend);
//从数据库中查找聊天记录-默认最近20条记录
if(friendDao.findByNetId(friendNetId, owner.getNetId())!=null)
currentFriend = friendDao.findByNetId(friendNetId, owner.getNetId());
else{
String friendName = intent.getStringExtra("friendName");
currentFriend = new Friend(friendNetId, friendName, owner.getNetId());
}
messageList = messageDao.findNearlyMessage(friendNetId, owner.getNetId());
//组装成MessageItemViw
msgItemView = new MessageItemView(currentFriend, owner, messageList);
}

@ -1,14 +0,0 @@
package com.example.leudaemialikeme.Activity;
import android.os.Bundle;
import com.example.leudaemialikeme.R;
public class GoAnswerActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_go_answer);
}
}

@ -5,9 +5,11 @@ import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.example.leudaemialikeme.Fragment.InfoFragment;
@ -74,8 +76,16 @@ public class InfoActivity extends BaseActivity {
.commit();
LinearLayout search = findViewById(R.id.search_linear);
search.setOnClickListener(new View.OnClickListener() {
TextView info_input = findViewById(R.id.info_input);
info_input.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(InfoActivity.this, NewsSearchActivity.class);
startActivity(intent);
}
});
LinearLayout search_news = findViewById(R.id.search_linear);
search_news.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(InfoActivity.this, NewsSearchActivity.class);

@ -86,13 +86,6 @@ public class NewsSearchResultActivity extends BaseActivity {
public void onFailure(Call call, IOException e) {
}
// @Override
// public void onResponse(Call call, Response response) throws IOException {
//
// }
// });
@Override
public void onResponse(Call call, Response response) throws IOException {
Gson gson = new Gson();

@ -1,7 +1,6 @@
package com.example.leudaemialikeme.Adapter;
import android.content.Intent;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -128,7 +127,6 @@ public class BlogAdapter extends RecyclerView.Adapter<BlogAdapter.ViewHolder> {
private void UpdateBrowseNum(String bid){
final String url = BaseActivity.SERVER_URL + "/browse-servlet?action=UpdateBrowse";
final Map<String,String> paramMap = new HashMap<String,String>();
Log.e("获取浏览量的返回结果","浏览量");
paramMap.put("id", bid);
//登录后需要将uid换为这部分
@ -140,16 +138,7 @@ public class BlogAdapter extends RecyclerView.Adapter<BlogAdapter.ViewHolder> {
new Thread(new Runnable() {
@Override
public void run() {
Log.e("获取浏览量的返回结果uid",String.valueOf(1));
String jsonStr = OkHttpUtil.synPost(url,paramMap);
Log.e("浏览量的返回结果",jsonStr);
// blog.setBbrowse(blog.getBbrowse()+1);
// ((AppCompatActivity) context).runOnUiThread(new Runnable(){
// @Override
// public void run() {
//// holder.visNum.setText(String.valueOf(blog.getBbrowse()));
// }
// });
}
}).start();
}

@ -1,6 +1,5 @@
package com.example.leudaemialikeme.Adapter;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

@ -1,123 +0,0 @@
package com.example.leudaemialikeme.Fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.R;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link PrivateMsgFragment.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link PrivateMsgFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class CommentFragment extends Fragment implements ViewPager.OnPageChangeListener {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private View view;
private OnFragmentInteractionListener mListener;
public CommentFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment PrivateMsgFragment.
*/
// TODO: Rename and change types and number of parameters
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
// return inflater.inflate(R.layout.fragment_private_msg2, container, false);
super.onCreate(savedInstanceState);
View view = inflater.inflate(R.layout.fragment_private_msg,container,false);
return view;
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}

@ -21,7 +21,6 @@ import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.Activity.BlogSearchActivity;
import com.example.leudaemialikeme.Activity.GoAnswerActivity;
import com.example.leudaemialikeme.Activity.SendInvitationActivity;
import com.example.leudaemialikeme.Activity.SendQuestionActivity;
import com.example.leudaemialikeme.Adapter.InvitationPageFragmentAdapter;
@ -44,7 +43,6 @@ public class CommunityFragment extends Fragment implements ViewPager.OnPageChang
private ImageButton tab_add;
private Button bar_send_invitation;
private Button bar_send_question;
private Button bar_answer;
private LinearLayout blog_search;
static List<List<Blog>> resourceList=new ArrayList<>();
static List<Blog> blogList=new ArrayList<>();
@ -99,7 +97,6 @@ public class CommunityFragment extends Fragment implements ViewPager.OnPageChang
});
bar_send_invitation = (Button)popupWindow_view.findViewById(R.id.bar_send_invitation);
bar_send_question = (Button)popupWindow_view.findViewById(R.id.bar_send_question);
bar_answer = (Button)popupWindow_view.findViewById(R.id.bar_answer);
bar_send_invitation.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -114,13 +111,6 @@ public class CommunityFragment extends Fragment implements ViewPager.OnPageChang
startActivity(intent);
}
});
bar_answer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(getActivity(), GoAnswerActivity.class);
startActivity(intent);
}
});
}
});

@ -1,123 +0,0 @@
package com.example.leudaemialikeme.Fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.R;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link PrivateMsgFragment.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link PrivateMsgFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class FansFragment extends Fragment implements ViewPager.OnPageChangeListener {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private View view;
private OnFragmentInteractionListener mListener;
public FansFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment PrivateMsgFragment.
*/
// TODO: Rename and change types and number of parameters
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
// return inflater.inflate(R.layout.fragment_private_msg2, container, false);
super.onCreate(savedInstanceState);
View view = inflater.inflate(R.layout.fragment_fans,container,false);
return view;
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}

@ -2,7 +2,6 @@ package com.example.leudaemialikeme.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -36,6 +35,8 @@ import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
//import android.util.Log;
public class IndexFragment extends Fragment {
@ -204,7 +205,6 @@ public class IndexFragment extends Fragment {
@Override
public void onResponse(Call call, Response response) throws IOException {
String jsonStr = response.body().string();//这里就调用InfoResponse响应
Log.e("首页Info的json", jsonStr);
getInfoResponse(jsonStr);
}
@ -226,9 +226,6 @@ public class IndexFragment extends Fragment {
}.getType();
// 把获取到的信息集合存到 newsList 中
newsLists = gson.fromJson(jsonStr, listType);
Log.e("jsonStr", jsonStr);
Log.e("object", String.valueOf(newsLists));
Log.e("newsLists最后", String.valueOf(newsLists));
newsLists = gson.fromJson(jsonStr, listType);
adapter.setRecnewsList(newsLists);//这里设置数据源
recyclerView.setAdapter(adapter);

@ -2,7 +2,6 @@ package com.example.leudaemialikeme.Fragment;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -168,7 +167,6 @@ public class InvitationChannelFragment extends Fragment {
@Override
public void onResponse(Call call, Response response) throws IOException {
String jsonStr = response.body().string();
Log.e("帖子推荐",jsonStr);
Gson gson = new Gson();
recommendBlog = gson.fromJson(jsonStr, new TypeToken<List<Blog>>(){}.getType());
getActivity().runOnUiThread(new Runnable(){
@ -378,7 +376,6 @@ public class InvitationChannelFragment extends Fragment {
@RequiresApi(api = Build.VERSION_CODES.O)
@Override
public void run() {
Log.e("jsonStr", jsonStr);
Gson gson = new Gson(); // 使用 gson 库解析 JSON 数据
Type listType = new TypeToken<List<List<Blog>>>() {
}.getType();

@ -26,7 +26,7 @@ public class MessageChannelFragment extends Fragment {
private TextView mTitleField;
private List<Chat> chatList = new ArrayList<Chat>();
private RecyclerView recyclerView;
private boolean isPause = false;
public MessageChannelFragment() {
// Required empty public constructor
}
@ -83,17 +83,7 @@ public class MessageChannelFragment extends Fragment {
chatList = chatService.findChatList(BaseActivity.owner.getNetId());
Log.d("chatlist:", String.valueOf(chatList.size()));
}
// @Override
// public void onResume() {
// System.out.println("-----------------------");
// super.onResume();
// System.out.println("-----------------------");
// getMsgList();
// MsgAdapter adapter = new MsgAdapter(chatList);
// System.out.println("onresume:" + recyclerView);
// recyclerView.setAdapter(adapter);
// recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
// }
public void updateUi(){
getMsgList();
getActivity().runOnUiThread(new Runnable() {
@ -107,4 +97,22 @@ public class MessageChannelFragment extends Fragment {
public String getMessageCategoryTitle(){
return messageCategoryTitle;
}
@Override
public void onPause() {
super.onPause();
isPause = true; //记录页面已经被暂停
}
@Override
public void onResume() {
super.onResume();
if (isPause) { //判断是否暂停
isPause = false;
if (messageCategoryTitle.equals(" 私信 ")) {
getMsgList();
updateUi();
}
}
}
}

@ -1,116 +0,0 @@
package com.example.leudaemialikeme.Fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.R;
public class NiceFragment extends Fragment implements ViewPager.OnPageChangeListener {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private View view;
private OnFragmentInteractionListener mListener;
public NiceFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment PrivateMsgFragment.
*/
// TODO: Rename and change types and number of parameters
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
// return inflater.inflate(R.layout.fragment_private_msg2, container, false);
super.onCreate(savedInstanceState);
View view = inflater.inflate(R.layout.fragment_nice,container,false);
return view;
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
}
@Override
public void onPageScrollStateChanged(int state) {
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}

@ -131,8 +131,13 @@ public class QuestionHistoryFragment extends Fragment {
if (message.equals("success")) {
List<Question> questionList = gson.fromJson(jsonMap.get("questionList"), new TypeToken <List<Question>>(){}.getType());
questionAllList = questionList;
HistoryQuestionAdapter adapter = new HistoryQuestionAdapter(questionAllList, getContext());//创建适配器
recyclerView.setAdapter(adapter);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
HistoryQuestionAdapter adapter = new HistoryQuestionAdapter(questionAllList, getContext());//创建适配器
recyclerView.setAdapter(adapter);
}
});
}
}
};

@ -57,27 +57,6 @@
</LinearLayout>
<!-- <LinearLayout-->
<!-- android:id="@+id/detail_to_answer"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal"-->
<!-- android:padding="10dp">-->
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="查看全部回答"-->
<!-- android:textColor="#66c18c"-->
<!-- android:textSize="15dp" />-->
<!-- <ImageView-->
<!-- android:layout_width="24dp"-->
<!-- android:layout_height="13dp"-->
<!-- android:layout_gravity="center"-->
<!-- android:src="@drawable/forwardgreen" />-->
<!-- </LinearLayout>-->
</LinearLayout>
<LinearLayout
@ -126,7 +105,7 @@
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView13"
android:id="@+id/img_person"
android:layout_width="104dp"
android:layout_height="40dp"
android:layout_weight="1"

@ -1,221 +0,0 @@
<?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:orientation="vertical"
tools:context=".Activity.GoAnswerActivity"
android:background="@mipmap/background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:background="@color/white"
android:orientation="horizontal">
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginLeft="15dp"
android:background="@mipmap/img_go_answer_return"
/>
<TextView
android:id="@+id/textView"
android:layout_width="320dp"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20dp"
android:text="小白帮回答"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:layout_marginBottom="10dp"
android:paddingTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/text_answer_title"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginBottom="10dp"
android:text="白血病的早期症状有什么?"
android:textColor="#000"
android:textSize="18dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:paddingLeft="20dp">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="展开"
android:textColor="@color/hair_grey"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/img_pull_down" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="20dp"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/text_concern"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="0关注" />
<TextView
android:id="@+id/scan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="64浏览" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/img_invite" />
<TextView
android:id="@+id/textView7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="邀请回答"
android:gravity="center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1">
<ImageView
android:id="@+id/imageView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/img_write_answer" />
<TextView
android:id="@+id/textView8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="回答问题"
android:gravity="center_horizontal" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="10dp"
android:layout_weight="1">
<ImageView
android:id="@+id/imageView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/img_concern_problem" />
<TextView
android:id="@+id/textView9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="关注问题"
android:gravity="center_horizontal" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white">
<View
android:layout_marginBottom="10dp"
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/light_grey"/>
<TextView
android:layout_marginLeft="20dp"
android:id="@+id/text_answer_num"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="回答0" />
<View
android:layout_marginTop="10dp"
android:id="@+id/view2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/light_grey"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_answer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>

@ -35,14 +35,14 @@
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<EditText
<TextView
android:id="@+id/info_input"
android:layout_width="146dp"
android:layout_height="42dp"
android:layout_marginRight="10dp"
android:background="#ffffff"
android:gravity="center_vertical"
android:text="资讯查询" />
android:hint="资讯查询" />
</LinearLayout>

@ -3,7 +3,7 @@
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_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
@ -14,10 +14,9 @@
android:layout_marginBottom="6dp"
android:background="@drawable/background"
android:elevation="10dp"
android:padding="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:padding="11dp"
tools:ignore="MissingConstraints">
<TextView

@ -3,8 +3,9 @@
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:background="@drawable/background"
android:layout_width="wrap_content"
android:background="@color/white"
android:layout_marginTop="10dp"
android:layout_height="wrap_content">
<LinearLayout
@ -12,19 +13,18 @@
android:layout_width="334dp"
android:layout_height="150dp"
android:layout_gravity="center"
android:paddingTop="10dp"
android:layout_marginBottom="6dp"
android:background="@color/white"
android:background="@drawable/background"
android:elevation="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical"
android:padding="11dp"
tools:ignore="MissingConstraints">
<TextView
android:id="@+id/News_title"
android:maxEms="40"
android:maxLines="2"
android:layout_marginLeft="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
@ -35,6 +35,7 @@
<LinearLayout
android:layout_width="312dp"
android:layout_height="71dp"
android:layout_marginLeft="10dp"
android:orientation="horizontal">
<TextView
@ -55,6 +56,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:orientation="horizontal">
<TextView

@ -11,20 +11,19 @@
android:id="@+id/bar_send_invitation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/light_grey"
android:background="#F5F5F5"
android:text="发帖" />
<View
android:layout_width="75dp"
android:layout_height="1dp"
android:layout_marginRight="5dp"
android:background="@color/white"/>
<Button
android:id="@+id/bar_send_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/light_grey"
android:background="#F5F5F5"
android:text="提问" />
<Button
android:id="@+id/bar_answer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/light_grey"
android:text="回答" />
</LinearLayout>

@ -16,7 +16,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/blogCollectList"
android:background="@drawable/background"
android:layout_marginLeft="40dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

@ -2,7 +2,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.example.leudaemialikeme.Fragment.BlogHistoryFragment">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
@ -16,8 +16,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/blogHistoryList"
android:background="@drawable/background"
android:layout_width="match_parent"
android:layout_marginLeft="40dp"
android:layout_height="match_parent" />
</LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

@ -69,7 +69,7 @@
android:id="@+id/vpNewsListCollect"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
/>

@ -76,16 +76,6 @@
android:orientation="horizontal" />
</HorizontalScrollView>
<ImageView
android:id="@+id/ivShowChannel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white"
android:layout_alignParentRight="true"
android:layout_marginRight="1dp"
android:layout_marginLeft="1dp"
android:scaleType="fitXY"
/>
</RelativeLayout>
</LinearLayout>
@ -95,13 +85,6 @@
android:layout_height="0dp"
android:layout_weight="1"
>
<!-- <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
</LinearLayout>-->
</androidx.viewpager.widget.ViewPager>

@ -17,6 +17,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/newsHistoryList"
android:layout_width="match_parent"
android:layout_marginLeft="40dp"
android:layout_height="match_parent" />
</LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

@ -9,7 +9,7 @@
<androidx.recyclerview.widget.RecyclerView
android:background="@color/white"
android:id="@+id/list_private_msg"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

@ -2,9 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background"
android:padding="10dp">
android:layout_height="wrap_content">
<LinearLayout
@ -12,8 +10,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:paddingLeft="7dp"
android:paddingRight="7dp"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:paddingTop="20dp"
android:background="@drawable/bubble_left"
android:orientation="horizontal">
@ -23,8 +22,6 @@
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:paddingTop="10dp"
android:layout_margin="10dp"
android:text="TextView" />
</LinearLayout>
@ -34,8 +31,9 @@
android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@drawable/bubble_right"
android:paddingLeft="7dp"
android:paddingRight="7dp"
android:paddingLeft="12dp"
android:paddingTop="20dp"
android:paddingRight="12dp"
android:orientation="horizontal">
<TextView
@ -43,9 +41,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="10dp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:text="TextView" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

Loading…
Cancel
Save