Compare commits
No commits in common. 'master' and 'my' have entirely different histories.
@ -1,7 +0,0 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="盛洁">
|
||||
<words>
|
||||
<w>sttmt</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -0,0 +1,55 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.widget.ListView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.record.Record;
|
||||
import hunnu.sj.raise_money.donate_record.DonateRecordAdapter;
|
||||
|
||||
public class BrowseDonateRecordActivity extends AppCompatActivity {
|
||||
private ArrayList<Record> records = new ArrayList<>();
|
||||
private ListView lv_record;
|
||||
private DonateRecordAdapter recordAdapter;
|
||||
private long user_id;
|
||||
private long stu_id;
|
||||
private Handler mhandler = new Handler(){
|
||||
@Override
|
||||
public void handleMessage(@NonNull Message msg) {
|
||||
super.handleMessage(msg);
|
||||
if(msg.what==1){
|
||||
recordAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
};
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_browse_record);
|
||||
Intent intent = getIntent();
|
||||
user_id = intent.getLongExtra("user_id",0);
|
||||
recordAdapter = new DonateRecordAdapter(this,records);
|
||||
lv_record = findViewById(R.id.lv_browse_denate_record);
|
||||
lv_record.setAdapter(recordAdapter);
|
||||
new BrowseDonateRecordThread().start();
|
||||
|
||||
}
|
||||
|
||||
class BrowseDonateRecordThread extends Thread{
|
||||
@Override
|
||||
public void run() {
|
||||
Message msg =mhandler.obtainMessage();
|
||||
int flags = InfoUtils.getDonateRecords(records,user_id);
|
||||
msg.what = flags;
|
||||
mhandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.widget.ListView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.donated_record.DonatedRecordAdapter;
|
||||
import hunnu.sj.raise_money.record.Record;
|
||||
|
||||
public class BrowseDonatedRecordActivity extends AppCompatActivity {
|
||||
private ArrayList<Record> records = new ArrayList<>();
|
||||
private ListView lv_record;
|
||||
private DonatedRecordAdapter donatedRecordAdapter;
|
||||
private long stu_id;
|
||||
private Handler mhandler = new Handler(){
|
||||
@Override
|
||||
public void handleMessage(@NonNull Message msg) {
|
||||
super.handleMessage(msg);
|
||||
if(msg.what==1){
|
||||
donatedRecordAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
};
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_browse_record);
|
||||
Intent intent = getIntent();
|
||||
stu_id = intent.getLongExtra("stu_id",0);
|
||||
donatedRecordAdapter = new DonatedRecordAdapter(this,records);
|
||||
lv_record = findViewById(R.id.lv_browse_denate_record);
|
||||
lv_record.setAdapter(donatedRecordAdapter);
|
||||
new BrowseDonateRecordThread().start();
|
||||
|
||||
}
|
||||
|
||||
class BrowseDonateRecordThread extends Thread{
|
||||
@Override
|
||||
public void run() {
|
||||
Message msg =mhandler.obtainMessage();
|
||||
int flags = InfoUtils.getDonatedRecords(records,stu_id);
|
||||
msg.what = flags;
|
||||
mhandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.DataBase.UserService;
|
||||
import hunnu.sj.raise_money.record.Record;
|
||||
import hunnu.sj.raise_money.news.News;
|
||||
|
||||
public class InfoUtils {
|
||||
public static int getAllNews(Context context,ArrayList<News> list){//从数据库获取信息到本地
|
||||
UserService uService = new UserService();
|
||||
uService.getAllNews(context,list);
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int getDonateRecords(ArrayList<Record> recordlist,long user_id){
|
||||
UserService uService = new UserService();
|
||||
uService.getDonateRecords(recordlist,user_id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int getDonatedRecords(ArrayList<Record> recordlist,long id){
|
||||
UserService uService = new UserService();
|
||||
uService.getDonatedRecords(recordlist,id);
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package hunnu.sj.raise_money;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.navigation.fragment.NavHostFragment;
|
||||
|
||||
public class MyFragment extends NavHostFragment {
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
FrameLayout frameLayout = new FrameLayout(inflater.getContext());
|
||||
// When added via XML, this has no effect (since this FrameLayout is given the ID
|
||||
// automatically), but this ensures that the View exists as part of this Fragment's View
|
||||
// hierarchy in cases where the NavHostFragment is added programmatically as is required
|
||||
// for child fragment transactions
|
||||
frameLayout.setId(getId());
|
||||
return frameLayout;
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
public class News {
|
||||
private String title;
|
||||
private String content;
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class NewsAdapter extends ArrayAdapter<News> {
|
||||
private int resourceId;
|
||||
public NewsAdapter(Context context, int textViewResourceId, List<News> objects) {
|
||||
super(context, textViewResourceId, objects);
|
||||
resourceId = textViewResourceId;
|
||||
}
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
News news = getItem(position);
|
||||
View view;
|
||||
if (convertView == null) {
|
||||
view = LayoutInflater.from(getContext()).inflate(resourceId, null);
|
||||
} else {
|
||||
view = convertView;
|
||||
}
|
||||
TextView newsTitleText =(TextView) view.findViewById(R.id.news_title);
|
||||
newsTitleText.setText(news.getTitle());
|
||||
return view;
|
||||
}
|
||||
}
|
@ -1,42 +1,62 @@
|
||||
package hunnu.sj.raise_money;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class User implements Serializable{
|
||||
private String name;
|
||||
private String pasd;
|
||||
|
||||
private String username;
|
||||
private String password;
|
||||
private String role;
|
||||
private String phone;
|
||||
private String name;
|
||||
private long user_id;
|
||||
public User(){
|
||||
super();
|
||||
name = null;
|
||||
}
|
||||
public User(String name,String pasd,String role){
|
||||
super();
|
||||
this.name = name;
|
||||
this.pasd = pasd;
|
||||
this.role = role;
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setPasd(String pasd) {
|
||||
this.pasd = pasd;
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPasd() {
|
||||
return pasd;
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public long getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(long user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
package hunnu.sj.raise_money.donate_record;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.R;
|
||||
import hunnu.sj.raise_money.record.Record;
|
||||
|
||||
public class DonateRecordAdapter extends BaseAdapter {
|
||||
private ArrayList<Record> recordlist;
|
||||
private Context context;
|
||||
public DonateRecordAdapter(Context context, ArrayList<Record> recordlist) {
|
||||
|
||||
this.context = context;
|
||||
this.recordlist = recordlist;
|
||||
}
|
||||
@Override
|
||||
public int getCount() {
|
||||
return recordlist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return recordlist.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = null;
|
||||
if(convertView != null){
|
||||
view = convertView;
|
||||
}else{
|
||||
view = View.inflate(context, R.layout.donate_record_item,null);
|
||||
}
|
||||
Record record = recordlist.get(position);
|
||||
TextView record_vw = view.findViewById(R.id.record_descri);
|
||||
String descri = "您于"+record.getTime()+"给"+record.getStu_name()+"捐赠"+record.getDonatemon()+"元";
|
||||
record_vw.setText(descri);
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package hunnu.sj.raise_money.donated_record;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.R;
|
||||
import hunnu.sj.raise_money.record.Record;
|
||||
|
||||
public class DonatedRecordAdapter extends BaseAdapter {
|
||||
private ArrayList<Record> recordlist;
|
||||
private Context context;
|
||||
public DonatedRecordAdapter(Context context, ArrayList<Record> recordlist) {
|
||||
|
||||
this.context = context;
|
||||
this.recordlist = recordlist;
|
||||
}
|
||||
@Override
|
||||
public int getCount() {
|
||||
return recordlist.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return recordlist.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = null;
|
||||
if(convertView != null){
|
||||
view = convertView;
|
||||
}else{
|
||||
view = View.inflate(context, R.layout.donate_record_item,null);
|
||||
}
|
||||
Record record = recordlist.get(position);
|
||||
TextView record_vw = view.findViewById(R.id.record_descri);
|
||||
String descri = "用户"+record.getUser_name()+"于"+record.getTime()+"捐赠了"+record.getDonatemon()+"元";
|
||||
record_vw.setText(descri);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
package hunnu.sj.raise_money.news;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
public class News {//主界面浏览的信息的类
|
||||
private long stu_id;
|
||||
private String name;
|
||||
private String descri;
|
||||
private Drawable head_icon;
|
||||
|
||||
public Drawable getHead_icon() {
|
||||
return head_icon;
|
||||
}
|
||||
public void setHead_icon(Drawable head_icon) {
|
||||
this.head_icon = head_icon;
|
||||
}
|
||||
|
||||
public long getStu_id() {
|
||||
return stu_id;
|
||||
}
|
||||
|
||||
public void setStu_id(long stu_id) {
|
||||
this.stu_id = stu_id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescri() {
|
||||
return descri;
|
||||
}
|
||||
|
||||
public void setDescri(String descri) {
|
||||
this.descri = descri;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package hunnu.sj.raise_money.news;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import hunnu.sj.raise_money.R;
|
||||
|
||||
//信息的适配器
|
||||
public class NewsAdapter extends BaseAdapter {
|
||||
private ArrayList<News> list;
|
||||
private Context context;
|
||||
public NewsAdapter(Context context,ArrayList<News> list) {
|
||||
|
||||
this.context = context;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position){
|
||||
return list.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
View view = null;
|
||||
if(convertView != null){
|
||||
view = convertView;
|
||||
}else{
|
||||
view = View.inflate(context, R.layout.info_item_layout,null);
|
||||
}
|
||||
ImageView item_icon = (ImageView) view.findViewById(R.id.item_head_icon);
|
||||
TextView item_title = (TextView) view.findViewById(R.id.item_info_title);
|
||||
TextView item_des = (TextView) view.findViewById(R.id.item_info_des);
|
||||
News news = list.get(position);
|
||||
item_icon.setImageDrawable(news.getHead_icon());
|
||||
item_title.setText(news.getName());
|
||||
item_des.setText(news.getDescri());
|
||||
return view;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package hunnu.sj.raise_money.record;
|
||||
|
||||
public class Record {
|
||||
private long user_id;
|
||||
private long stu_id;
|
||||
private float donatemon = 0;
|
||||
private String user_name;
|
||||
private String stu_name;
|
||||
private String time = null;
|
||||
|
||||
public float getDonatemon() {
|
||||
return donatemon;
|
||||
}
|
||||
|
||||
public void setDonatemon(float donatemon) {
|
||||
this.donatemon = donatemon;
|
||||
}
|
||||
|
||||
public long getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(long user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public long getStu_id() {
|
||||
return stu_id;
|
||||
}
|
||||
|
||||
public void setStu_id(long stu_id) {
|
||||
this.stu_id = stu_id;
|
||||
}
|
||||
|
||||
public String getUser_name() {
|
||||
return user_name;
|
||||
}
|
||||
|
||||
public void setUser_name(String user_name) {
|
||||
this.user_name = user_name;
|
||||
}
|
||||
|
||||
public String getStu_name() {
|
||||
return stu_name;
|
||||
}
|
||||
|
||||
public void setStu_name(String stu_name) {
|
||||
this.stu_name = stu_name;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<?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"
|
||||
tools:context=".BrowseDonateRecordActivity">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv_browse_denate_record"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,82 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="50dp">
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:text="姓名" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="请输入你的姓名"
|
||||
android:inputType="textPersonName" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/teleNumber"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLength="11"
|
||||
android:numeric="integer"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:text="电话号码" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/TeleNumber"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="请输入你的电话号码"
|
||||
android:inputType="textPersonName" />
|
||||
</LinearLayout>-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/money"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorAccent"
|
||||
|
||||
android:text="输入捐款金额" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Money"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="请输入捐赠金额"
|
||||
android:inputType="numberDecimal"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="onClick"
|
||||
android:text="提交">
|
||||
|
||||
</Button>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,92 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:text="姓名" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="请输入你的姓名"
|
||||
android:inputType="textPersonName" />
|
||||
</LinearLayout>
|
||||
|
||||
<!--
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/teleNumber"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_weight="1"
|
||||
android:maxLength="11"
|
||||
android:numeric="integer"
|
||||
android:textColor="@color/colorAccent"
|
||||
android:text="电话号码" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/TeleNumber"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="请输入你的电话号码"
|
||||
android:inputType="textPersonName" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/desp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/colorAccent"
|
||||
|
||||
android:text="输入你的信息描述" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Desp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:hint="信息描述"
|
||||
/>-->
|
||||
|
||||
<!-- <Button
|
||||
android:id="@+id/commit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="75dp"
|
||||
android:onClick="onToMain"
|
||||
android:text="跳转首页"></Button>
|
||||
-->
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="onClick"
|
||||
android:text="提交">
|
||||
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,26 @@
|
||||
<?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:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/record_descri"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|top"
|
||||
android:layout_marginStart="5sp"
|
||||
android:layout_marginTop="5sp"
|
||||
android:layout_marginBottom="5sp"
|
||||
android:layout_weight="1"
|
||||
android:text="record"
|
||||
android:textColor="@android:color/background_dark"
|
||||
android:textSize="24sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,26 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/visibility_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="invisible" >
|
||||
android:visibility="invisible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/news_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="61dp"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:textSize="20sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="161dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ph1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ph2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ph3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/news_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="457dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="15dp"
|
||||
android:scrollbars="vertical"
|
||||
android:textSize="18sp" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/browse_donated_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:text="捐助信息" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/longterm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:text="长期捐助" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:onClick="onToMain"
|
||||
android:text="捐助" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_head_icon"
|
||||
android:layout_width="68dp"
|
||||
android:layout_height="68dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="10dp"
|
||||
app:srcCompat="@mipmap/ic_launcher" />
|
||||
<LinearLayout
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
<TextView
|
||||
android:singleLine="true"
|
||||
android:id="@+id/item_info_title"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:text="title"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp" />
|
||||
<TextView
|
||||
android:maxLines="2"
|
||||
android:id="@+id/item_info_des"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="des"
|
||||
android:textColor="#666666"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Loading…
Reference in new issue