# Conflicts: # Code/LeudaemiaLikeMe/app/src/main/AndroidManifest.xml # Code/LeudaemiaLikeMe/app/src/main/java/com/example/leudaemialikeme/Fragment/IndexFragment.javamaster
@ -0,0 +1,16 @@
|
||||
package com.example.leudaemialikeme.Activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
public class APNActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_apn);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.example.leudaemialikeme.Activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
public class DetailActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_detail);
|
||||
|
||||
ImageView detail_to=findViewById(R.id.detail_to);
|
||||
detail_to.setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
ImageView search=findViewById(R.id.detail_to_search);
|
||||
search.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(DetailActivity.this,SearchActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.example.leudaemialikeme.Activity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.example.leudaemialikeme.Adapter.EventAdapter;
|
||||
import com.example.leudaemialikeme.Event;
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EventActivity extends AppCompatActivity {
|
||||
|
||||
private List<Event> mData = new ArrayList<>();
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_event);
|
||||
getData();//获得数据
|
||||
RecyclerView recycleView = (RecyclerView) findViewById(R.id.eventList);//获得视图
|
||||
LinearLayoutManager layoutManager;
|
||||
layoutManager = new LinearLayoutManager(this);
|
||||
recycleView.setLayoutManager(layoutManager);//建立线性布局
|
||||
EventAdapter adapter = new EventAdapter(mData);//创建适配器
|
||||
recycleView.setAdapter(adapter);//将视图与适配器连接起来
|
||||
}
|
||||
|
||||
private void getData() {
|
||||
Event event1 = new Event("04","10月","第三次化疗","08:00");
|
||||
mData.add(event1);
|
||||
Event event2 = new Event("11","5月","检查","09:00");
|
||||
mData.add(event2);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.example.leudaemialikeme.Activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Switch;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.leudaemialikeme.R;
|
||||
import com.example.leudaemialikeme.Adapter.AdapterClock;
|
||||
|
||||
|
||||
public class MdctRmdActivity extends AppCompatActivity {
|
||||
|
||||
private ListView lv;
|
||||
private AdapterClock adapter;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_mdctrmd);
|
||||
|
||||
ImageView back;
|
||||
back =findViewById(R.id.back_to_index);
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent i = new Intent(MdctRmdActivity.this, MainActivity.class);
|
||||
i.putExtra("flag",1);
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
|
||||
lv=(ListView)findViewById(R.id.lv_list_data);
|
||||
adapter=new AdapterClock(MdctRmdActivity.this);
|
||||
|
||||
|
||||
lv.setAdapter(adapter);
|
||||
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
Switch aSwitch=adapter.getaSwitch(i);
|
||||
if(aSwitch.isChecked()){
|
||||
aSwitch.setChecked(false);
|
||||
//进行业务处理
|
||||
}else {
|
||||
aSwitch.setChecked(true);
|
||||
//进行业务处理
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.example.leudaemialikeme.Activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
public class SearchActivity extends AppCompatActivity {
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search);
|
||||
ImageView back;
|
||||
back =findViewById(R.id.search_to_index);
|
||||
|
||||
back.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent i = new Intent(SearchActivity.this, MainActivity.class);
|
||||
i.putExtra("flag",1);
|
||||
startActivity(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.example.leudaemialikeme.Adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AdapterClock extends BaseAdapter {
|
||||
|
||||
private String[] names={"甘露聚糖肽胶囊","消癌平糖浆"};
|
||||
private String[] time={"每天 8:00 14:00 19:00","每天 8:00 14:00 19:00"};
|
||||
private List<Switch> list_switch;
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private TextView tv1,tv2;
|
||||
private Switch aSwitch;
|
||||
|
||||
public AdapterClock(Context context) {
|
||||
mContext=context;
|
||||
list_switch=new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
public Switch getaSwitch(int position){
|
||||
|
||||
return list_switch.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return names.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return names[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
|
||||
view= LayoutInflater.from(mContext).inflate(R.layout.list_item,null);
|
||||
tv1=(TextView)view.findViewById(R.id.md_name);
|
||||
tv2=(TextView)view.findViewById(R.id.md_time);
|
||||
aSwitch=(Switch)view.findViewById(R.id.sw);
|
||||
|
||||
list_switch.add(aSwitch);
|
||||
|
||||
tv1.setText(names[i]);
|
||||
tv2.setText(time[i]);
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.example.leudaemialikeme.Adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.leudaemialikeme.Event;
|
||||
import com.example.leudaemialikeme.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EventAdapter extends RecyclerView.Adapter<EventAdapter.ViewHolder>{
|
||||
private List<Event> meventList;
|
||||
|
||||
//重写构造方法
|
||||
public EventAdapter(List<Event> meventList){
|
||||
this.meventList = meventList;
|
||||
}
|
||||
public int getItemCount(){
|
||||
return meventList.size();
|
||||
}
|
||||
//内部类
|
||||
static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView event_day,event_month,event_info,event_time;
|
||||
|
||||
public ViewHolder(@NonNull View itemView){
|
||||
super(itemView);
|
||||
this.event_day = (TextView)itemView.findViewById(R.id.event_day);
|
||||
this.event_month = (TextView)itemView.findViewById(R.id.event_month);
|
||||
this.event_info = (TextView)itemView.findViewById(R.id.event_info);
|
||||
this.event_time = (TextView)itemView.findViewById(R.id.event_time);
|
||||
}
|
||||
}
|
||||
//重写 onCreateViewHolder()方法
|
||||
@Override
|
||||
public EventAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.event_item,parent,false);
|
||||
EventAdapter.ViewHolder holder=new EventAdapter.ViewHolder(view);
|
||||
return holder;
|
||||
}
|
||||
//重写onBindViewHolder()方法
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder,int position){
|
||||
Event event = meventList.get(position);
|
||||
holder.event_day.setText(event.getEvent_day());
|
||||
holder.event_month.setText(event.getEvent_month());
|
||||
holder.event_info.setText(event.getEvent_info());
|
||||
holder.event_time.setText(event.getEvent_time());
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package com.example.leudaemialikeme.Adapter;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.leudaemialikeme.Activity.DetailActivity;
|
||||
import com.example.leudaemialikeme.R;
|
||||
import com.example.leudaemialikeme.Recnews;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class InfoAdapter extends RecyclerView.Adapter<InfoAdapter.ViewHolder> {
|
||||
private List<Recnews> mRecnewsList;
|
||||
|
||||
static class ViewHolder extends RecyclerView.ViewHolder{
|
||||
ImageView image;
|
||||
TextView theme;
|
||||
TextView intro;
|
||||
TextView visNum;
|
||||
TextView time;
|
||||
LinearLayout linear;
|
||||
public ViewHolder(View view){
|
||||
super(view);
|
||||
image=(ImageView)view.findViewById(R.id.recNews_image);
|
||||
theme=(TextView)view.findViewById(R.id.recNews_theme);
|
||||
intro=(TextView)view.findViewById(R.id.recNews_intro);
|
||||
visNum=(TextView)view.findViewById(R.id.recNews_visNum);
|
||||
time=(TextView)view.findViewById(R.id.recNews_time);
|
||||
linear=(LinearLayout)view.findViewById(R.id.info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public InfoAdapter(List<Recnews> recnewsList){
|
||||
mRecnewsList=recnewsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.info_item,parent,false);
|
||||
ViewHolder holder=new ViewHolder(view);
|
||||
holder.linear.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(view.getContext(), DetailActivity.class);
|
||||
//intent.putExtra("from",String.valueOf(view.getContext()));
|
||||
//Log.e("activity",String.valueOf(view.getContext()));
|
||||
view.getContext().startActivity(intent);
|
||||
}
|
||||
});
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull InfoAdapter.ViewHolder holder, int position) {
|
||||
Recnews recnews=mRecnewsList.get(position);
|
||||
holder.image.setImageResource(recnews.getImageNum());
|
||||
holder.visNum.setText(String.valueOf(recnews.getVisNum()));
|
||||
holder.intro.setText(recnews.getIntro());
|
||||
holder.theme.setText(recnews.getTheme());
|
||||
holder.time.setText(recnews.getTime());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mRecnewsList.size();
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.example.leudaemialikeme;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Event implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//声明所有的变量
|
||||
private String event_day;
|
||||
private String event_month;
|
||||
private String event_info;
|
||||
private String event_time;
|
||||
|
||||
public Event(String event_day,String event_month,String event_info,String event_time){
|
||||
this.event_day = event_day;
|
||||
this.event_info = event_info;
|
||||
this.event_month =event_month;
|
||||
this.event_time = event_time;
|
||||
}
|
||||
public String getEvent_day() {
|
||||
return event_day;
|
||||
}
|
||||
|
||||
public void setEvent_day(String event_day) {
|
||||
this.event_day = event_day;
|
||||
}
|
||||
|
||||
public String getEvent_month() {
|
||||
return event_month;
|
||||
}
|
||||
|
||||
public void setEvent_month(String event_month) {
|
||||
this.event_month = event_month;
|
||||
}
|
||||
|
||||
public String getEvent_info() {
|
||||
return event_info;
|
||||
}
|
||||
|
||||
public void setEvent_info(String event_info) {
|
||||
this.event_info = event_info;
|
||||
}
|
||||
|
||||
public String getEvent_time() {
|
||||
return event_time;
|
||||
}
|
||||
|
||||
public void setEvent_time(String event_time) {
|
||||
this.event_time = event_time;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 756 B |
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle"
|
||||
>
|
||||
<corners android:radius="25dp" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
<padding
|
||||
android:bottom="3dp"
|
||||
android:left="10dp"
|
||||
android:right="5dp"
|
||||
android:top="3dp" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/light_grey"/>
|
||||
</shape>
|
After Width: | Height: | Size: 3.0 KiB |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="#ffdfbe" />
|
||||
|
||||
|
||||
</shape>
|
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,114 @@
|
||||
<?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="com.example.leudaemialikeme.Activity.APNActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="20dp"
|
||||
android:src="@mipmap/img_go_answer_return"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:src="@mipmap/img_my_person"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView28"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18dp"
|
||||
android:layout_margin="5dp"
|
||||
android:text="小白帮" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView29"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="16dp"
|
||||
android:layout_margin="5dp"
|
||||
android:text="管住嘴,迈开腿,多喝水" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView31"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="收到 0 赞同" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/cardview_light_background"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="回答" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView33"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18dp"
|
||||
android:layout_marginLeft="-30dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="帖子" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,51 @@
|
||||
<?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="com.example.leudaemialikeme.Activity.EventActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="15dp"
|
||||
android:src="@mipmap/img_go_answer_return" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18dp"
|
||||
android:layout_margin="15dp"
|
||||
android:gravity="center"
|
||||
android:text="大事记" />
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="15dp"
|
||||
android:src="@mipmap/img_add"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,74 @@
|
||||
<?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"
|
||||
tools:context=".Activity.InfoActivity"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/background">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#ffffff"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/info_to_index"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="34dp"
|
||||
android:src="@drawable/back"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_linear"
|
||||
android:layout_width="266dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/search_background"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<SearchView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<EditText
|
||||
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="资讯查询" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/info_type"
|
||||
android:layout_width="98dp"
|
||||
android:layout_height="49dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginRight="5dp"
|
||||
|
||||
android:entries="@array/languages" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/info_background">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/info_recyclerView"
|
||||
android:layout_margin="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_to_index"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/head_rmd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="25dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="服药提醒" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/add_md"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="23dp"
|
||||
android:src="@drawable/add" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/dp_line"
|
||||
android:layout_height="1px"
|
||||
android:background="#000000"
|
||||
android:layout_width="fill_parent">
|
||||
</View>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle_clock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:textSize="20dp"
|
||||
android:text="闹钟" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:layout_margin="18dp"
|
||||
android:id="@+id/lv_list_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<!--定义一个SearchView-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_to_index"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="23dp"
|
||||
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="311dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<SearchView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
</SearchView>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EditText"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:text="请输入搜索内容" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18dp"
|
||||
android:text="搜索"
|
||||
android:textColor="#f47920"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="搜索发现"
|
||||
android:textSize="20dp"
|
||||
android:layout_margin="30dp"
|
||||
android:textColor="#000000"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:gravity="center"
|
||||
android:text="科普" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:gravity="center"
|
||||
android:text="食疗" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView5"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:gravity="center"
|
||||
android:text="政策" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView6"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:gravity="center"
|
||||
android:text="药物" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView7"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round_corner"
|
||||
android:gravity="center"
|
||||
android:text="暖心故事" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView8"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_round3_corner"
|
||||
android:textColor="#f47920"
|
||||
android:gravity="center"
|
||||
android:text="专家问答" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="10dp"
|
||||
android:gravity="right">
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/bar_send_invitation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_grey"
|
||||
android:text="发帖" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bar_send_question"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_grey"
|
||||
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>
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_day"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="28dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_month"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginLeft="-10dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="6"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="start"
|
||||
android:src="@mipmap/event_dot"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18dp"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="3"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/img_go_more" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="18dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="60dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/md_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="7dp"
|
||||
android:paddingTop="5dp"
|
||||
android:text="甘露聚糖肽胶囊"
|
||||
android:textSize="16dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/md_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="每天 8:00 14:00 19:00" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:focusable="false"
|
||||
android:clickable="false"
|
||||
android:padding="10dp"
|
||||
android:layout_alignParentRight="true"/>
|
||||
</LinearLayout>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#ffffff">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/list_community"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
||||
</LinearLayout>
|
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="languages">
|
||||
<item>全部</item>
|
||||
<item>公司</item>
|
||||
<item>红十字</item>
|
||||
<item>政府</item>
|
||||
<item>慈善</item>
|
||||
</string-array>
|
||||
</resources>
|