Merge remote-tracking branch 'origin/master'

# Conflicts:
#	Code/LeudaemiaLikeMe/app/src/main/AndroidManifest.xml
master
Annnnnn 4 years ago
parent ff7af13a9e
commit c48d63dc3a

@ -9,7 +9,8 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.LeudaemiaLikeMe">
<activity android:name=".Activity.CommunityActivity"></activity>
<activity android:name=".Adapter.MessagePageFragmentAdapter"></activity>
<!--<activity android:name=".Activity.CommunityActivity" />-->
<activity android:name=".Activity.SendInvitationActivity" />
<activity android:name=".Activity.GoAnswerActivity" />
<activity android:name=".Activity.SendQuestionActivity" />

@ -0,0 +1,34 @@
package com.example.leudaemialikeme.Adapter;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import com.example.leudaemialikeme.Fragment.MessageChannelFragment;
public class MessagePageFragmentAdapter extends FragmentPagerAdapter {
private String[] channelList;
private FragmentManager fm;
public MessagePageFragmentAdapter(@NonNull FragmentManager fm, String[] channelList) {
super(fm);
this.channelList = channelList;
this.fm = fm;
}
@NonNull
@Override
public Fragment getItem(int position) {
String MessageCategoryTitle = channelList[position];
/* if(position == 0)
{return new PrivateMsgFragment();
}*/
return MessageChannelFragment.newInstance(MessageCategoryTitle);
}
@Override
public int getCount() {
return channelList.length;
}
}

@ -0,0 +1,123 @@
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);
}
}

@ -0,0 +1,123 @@
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);
}
}

@ -116,7 +116,7 @@ public class IndexFragment extends Fragment {
clockLinear.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
public void onClick(View view) {
Toast.makeText(view.getContext(),"x1233",Toast.LENGTH_SHORT).show();
}
});

@ -0,0 +1,64 @@
package com.example.leudaemialikeme.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.example.leudaemialikeme.R;
public class MessageChannelFragment extends Fragment {
private static final String ARG_CATEGORY_TITLE = "category_title";
private String messageCategoryTitle = "Default";
private TextView mTitleField;
public MessageChannelFragment() {
// Required empty public constructor
}
public static MessageChannelFragment newInstance(String messageCategoryTitle) {
MessageChannelFragment fragment = new MessageChannelFragment();
Bundle args = new Bundle();
args.putString(ARG_CATEGORY_TITLE,messageCategoryTitle);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try{
messageCategoryTitle = (String)getArguments().getString(ARG_CATEGORY_TITLE);
}catch (java.lang.NullPointerException e){
System.out.println("TesFragment getArg error!");
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view;
if(messageCategoryTitle.equals(" 私信 "))
{
view = inflater.inflate(R.layout.fragment_private_msg,container,false);
}
else if(messageCategoryTitle.equals(" 评论 ")){
view = inflater.inflate(R.layout.fragment_comment,container,false);
}
else if(messageCategoryTitle.equals(" 粉丝 ")){
view = inflater.inflate(R.layout.fragment_fans,container,false);
}
else if(messageCategoryTitle.equals(" 赞 ")){
view = inflater.inflate(R.layout.fragment_nice,container,false);
}
else{
view = inflater.inflate(R.layout.fragment_message_channel, container, false);
mTitleField = (TextView) view.findViewById(R.id.messageCategoryTitle);
mTitleField.setText(messageCategoryTitle);
}
return view;
}
}

@ -1,65 +1,112 @@
package com.example.leudaemialikeme.Fragment;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.HorizontalScrollView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.viewpager.widget.ViewPager;
import com.example.leudaemialikeme.Adapter.MessagePageFragmentAdapter;
import com.example.leudaemialikeme.R;
/**
* A simple {@link Fragment} subclass.
* Use the {@link MessageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class MessageFragment extends Fragment {
// 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;
public class MessageFragment extends Fragment implements ViewPager.OnPageChangeListener {
private static final String ARG_CHANNEL_LIST = "channel_list";
private View view=null; // 碎片的布局实例
private ViewPager viewPager; //内导航的碎片的容器
private RadioGroup rgChannel=null; // 内导航由单选按钮组构成
private HorizontalScrollView hvChannel=null; //单选按钮组可滚动动
private String[] channelList = {" 私信 "," 评论 ",
" 赞 "," 粉丝 "}; //默认的内导航栏目
private MessagePageFragmentAdapter adapter; //viewPager 的适配器
public MessageFragment() {
// 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 MessageFragment.
*/
// TODO: Rename and change types and number of parameters
public static MessageFragment newInstance(String param1, String param2) {
MessageFragment fragment = new MessageFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if(view==null){
view=inflater.inflate(R.layout.fragment_message, container, false);
viewPager=(ViewPager)view.findViewById(R.id.vpNewsList0);
initViewPager(); //设置 ViewPager
rgChannel=(RadioGroup)view.findViewById(R.id.rgChannel0);
hvChannel=(HorizontalScrollView)view.findViewById(R.id.hvChannel0);
initTab(inflater);
rgChannel.setOnCheckedChangeListener(
new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
viewPager.setCurrentItem(checkedId);
}
}
);
}
return view;
}
private void initTab(LayoutInflater inflater) {//初始化上面的
for(int i=0;i<channelList.length;i++){
RadioButton rb=(RadioButton)inflater.inflate(R.layout.invitation_tab_rb,null);
rb.setId(i);
rb.setText(channelList[i]);
RadioGroup.LayoutParams params = new
RadioGroup.LayoutParams(RadioGroup.LayoutParams.WRAP_CONTENT,
RadioGroup.LayoutParams.WRAP_CONTENT);
rgChannel.addView(rb,params);
}
rgChannel.check(0);
}
private void initViewPager() { //初始化ViewPager
FragmentManager fragmentManager = super.getActivity().getSupportFragmentManager();
// adapter=new MessagePageFragmentAdapter(fragmentManager, channelList);
adapter=new MessagePageFragmentAdapter(fragmentManager, channelList);
//参数 channelList 将被适配器用来在动态切换碎片的时候实时创建碎片 //设置 ViewPager 的适配器
viewPager.setAdapter(adapter);
viewPager.setOffscreenPageLimit(2);
//设置显示第 1 个碎片
viewPager.setCurrentItem(0);//这里设置显示第一个碎片
//设置 ViewPager 的切换监听
viewPager.addOnPageChangeListener(this);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_message, container, false);
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
setTab(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
private void setTab(int idx){
RadioButton rb=(RadioButton)rgChannel.getChildAt(idx);
rb.setChecked(true);
int left=rb.getLeft();
int width=rb.getMeasuredWidth();
DisplayMetrics metrics=new DisplayMetrics();
super.getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
int screenWidth=metrics.widthPixels;
// int len=left+width/2-screenWidth/2;
int len=left+width/2-screenWidth/2;
hvChannel.smoothScrollTo(len,0);
}
}

@ -25,9 +25,18 @@ public class MyFragment extends Fragment {
private String mParam1;
private String mParam2;
public MyFragment() {
// Required empty public constructor
}
public static PrivateMsgFragment newInstance(String param1, String param2) {
PrivateMsgFragment fragment = new PrivateMsgFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
/**
* Use this factory method to create a new instance of
@ -38,14 +47,7 @@ public class MyFragment extends Fragment {
* @return A new instance of fragment MyFragment.
*/
// TODO: Rename and change types and number of parameters
public static MyFragment newInstance(String param1, String param2) {
MyFragment fragment = new MyFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {

@ -0,0 +1,116 @@
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);
}
}

@ -0,0 +1,123 @@
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 PrivateMsgFragment 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 PrivateMsgFragment() {
// 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);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_checked="true" >
<layer-list >
<item >
<shape android:shape="rectangle">
<stroke android:width="5dp" android:color="#ff0000"/>
</shape>
</item>
<item android:bottom="5dp" >
<shape android:shape="rectangle" >
<solid android:color="#fff"/>
</shape>
</item>
</layer-list>
</item>
<item android:state_selected="true" >
<layer-list >
<item >
<shape android:shape="rectangle">
<stroke android:width="5dp" android:color="#ff0000"/>
</shape>
</item>
<item android:bottom="5dp" >
<shape android:shape="rectangle" >
<solid android:color="#fff"/>
</shape>
</item>
</layer-list>
</item>
<item >
<shape >
<solid android:color="#ffF"/>
</shape>
</item>
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,99 @@
<FrameLayout 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"
tools:context="com.example.leudaemialikeme.Fragment.PrivateMsgFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_user" />
</LinearLayout>
<LinearLayout
android:layout_width="350dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="未关注用户" />
<TextView
android:id="@+id/textView67"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="回复@用户yd5656" />
<TextView
android:id="@+id/textView30"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="你好,请问可以加一个好友吗" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_helper" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="小白快跑" />
<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="你好,请问医生是建议你的饮食习惯怎么培养呢?" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>

@ -0,0 +1,157 @@
<FrameLayout 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"
tools:context="com.example.leudaemialikeme.Fragment.PrivateMsgFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="215dp"
android:layout_height="58dp"
android:orientation="vertical" >
<TextView
android:id="@+id/textView28"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20dp"
android:gravity="center"
android:layout_margin="10dp"
android:text="新的好友" />
</LinearLayout>
<TextView
android:id="@+id/textView32"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20dp"
android:gravity="center"
android:layout_margin="10dp"
android:text="全部粉丝" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/user1" />
</LinearLayout>
<LinearLayout
android:layout_width="350dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="记者陈青青" />
<TextView
android:id="@+id/textView30"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="一个严谨的记者" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/user2" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="小白帮_新人助手" />
<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hi,你终于来啦,欢迎你加入......" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView22"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/user3" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/user3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="严蔚医生" />
<TextView
android:id="@+id/user3_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="你好,我能给你提供什么帮助吗?" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>

@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="30sp"
android:text="@string/hello_blank_fragment" />
android:textSize="30sp"></TextView>
<!-- android:text="@string/hello_blank_fragment"--> />
</FrameLayout>

@ -1,14 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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=".Fragment.MessageFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
android:layout_height="50dp"
android:orientation="horizontal">
</FrameLayout>
<LinearLayout
android:layout_width="265dp"
android:layout_height="match_parent"
android:layout_weight="20">
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/img_read_already" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="20"
android:gravity="center"
android:text="消息"
android:textSize="25dp" />
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/img_read_already" />
</LinearLayout>
</LinearLayout>
<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_marginTop="10dp">
<!-- 导航标签,包含一个单选按钮组-->
<!-- 任意数量不能显示时的缩略符号 -->
<HorizontalScrollView
android:id="@+id/hvChannel0"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/ivShowChannel"
android:scrollbars="none">
<RadioGroup
android:id="@+id/rgChannel0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
</HorizontalScrollView>
<ImageView
android:id="@+id/ivShowChannel"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_marginRight="1dp"
android:scaleType="fitXY"
android:src="@mipmap/channel_down_narrow" />
</RelativeLayout>
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/vpNewsList0"
android:layout_width="match_parent"
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>
</LinearLayout>

@ -0,0 +1,16 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.leudaemialikeme.Fragment.MessageChannelFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:id="@+id/messageCategoryTitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="30sp"
android:text="hello" />
</FrameLayout>

@ -0,0 +1,93 @@
<FrameLayout 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"
tools:context="com.example.leudaemialikeme.Fragment.PrivateMsgFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_reminding" />
</LinearLayout>
<LinearLayout
android:layout_width="350dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="系统通知" />
<TextView
android:id="@+id/textView30"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="恭喜你,验证身份通过,成功加入小白帮....." />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp">
<LinearLayout
android:layout_width="60dp"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView12"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="@drawable/img_helper" />
</LinearLayout>
<LinearLayout
android:layout_width="353dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="小白帮_新人助手" />
<TextView
android:id="@+id/textView31"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hi,你终于来啦,欢迎你加入......" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:text=""
android:background="@drawable/tab_selector"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:button="@null"
/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

@ -6,4 +6,6 @@
<color name="light_grey">#cdcdcd</color>
<color name="hair_grey">#66c18c</color>
<color name="white">#fff</color>
<color name="grey">#F1EEEE</color>
</resources>
Loading…
Cancel
Save