设计书 #11

Merged
meickrq7f merged 1 commits from dev into master 3 years ago

Binary file not shown.

@ -16,15 +16,18 @@
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/tab_menu_text.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/translucent_button.xml" value="0.194" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/drawable/translucent_edit.xml" value="0.1135" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_history.xml" value="0.22" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_main.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_main2.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_menu.xml" value="0.33" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_no_pick.xml" value="0.2" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/activity_sign_up.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/buttom.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/fragment_my.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/item.xml" value="0.22" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment1.xml" value="0.1" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment2.xml" value="0.18489583333333334" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment3.xml" value="0.18489583333333334" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/my_fragment3.xml" value="0.2" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/pickup.xml" value="0.5" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/tab1.xml" value="0.10235507246376811" />
<entry key="..\:/shijianer/xcr_se/src/Logistics/app/src/main/res/layout/top.xml" value="0.3717105263157895" />

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.logistics",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.logistics"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
package="com.example.logistics">
<uses-permission android:name="android.permission.INTERNET" />
@ -11,13 +11,19 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Logistics" >
android:theme="@style/Theme.Logistics">
<activity
android:name=".ui.HistoryActivity"
android:exported="false" />
<activity
android:name=".ui.NoPickActivity"
android:exported="false" />
<activity
android:name=".ui.MenuActivity"
android:exported="false" />
<activity
android:name=".ui.MainActivity"
android:exported="true" >
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

@ -13,7 +13,10 @@ import com.example.logistics.ui.MenuActivity;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class goodDao {
@ -24,6 +27,7 @@ public class goodDao {
Connection connection = DBOpenHelper.getConn();
int msg = 0;
try{
String sql = "select * from goods where id = ?";
@ -83,4 +87,83 @@ public class goodDao {
}
return msg;
}
public boolean delete(String pickupcode){
Connection connection = DBOpenHelper.getConn();
try{
String sql = "delete from goods where id = ?";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
Log.e(TAG, "pickupcode: " + pickupcode);
ps.setString(1,pickupcode);
ps.executeUpdate();
connection.close();
ps.close();
return true;
}else{
Log.e(TAG, "ps is null");
return false;
}
}else{
Log.e(TAG, "connection is null");
return false;
}
}catch(Exception e){
e.printStackTrace();
Log.d(TAG, "delete bug" + e.getMessage());
}
return false;
}
public List<Map<String, Object>> nopick(String phonenum){
Connection connection = DBOpenHelper.getConn();
List<Map<String, Object>> datalist;
datalist = new ArrayList<Map<String, Object>>();
try{
String sql = "select * from goods where phonenum = ?";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
Log.e(TAG, "phonenum: " + phonenum);
ps.setString(1,phonenum);
ResultSet rs = ps.executeQuery();
int count = rs.getMetaData().getColumnCount();
while(rs.next()){
Map<String, Object> map = new HashMap<String, Object>();
for(int i = 1; i <= count; i++){
String field = rs.getMetaData().getColumnName(i);
if(field.equals("id")){
map.put(field, rs.getString(field));
}
if(field.equals("time")) {
map.put(field, rs.getString(field));
}
}
datalist.add(map);
}
connection.close();
ps.close();
}else{
Log.e(TAG, "ps is null");
}
}else{
Log.e(TAG, "connection is null");
}
}catch (Exception e){
e.printStackTrace();
Log.d(TAG, "search bug: " + e.getMessage());
}
return datalist;
}
}

@ -8,9 +8,13 @@ import com.example.logistics.tools.MD5Utils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class operationDao {
private static final String TAG = "operationDao";
@ -54,4 +58,49 @@ public class operationDao {
return false;
}
}
public List<Map<String, Object>> history(String phonenum){
Connection connection = DBOpenHelper.getConn();
List<Map<String, Object>> datalist;
datalist = new ArrayList<Map<String, Object>>();
try{
String sql = "select * from operations where phonenum = ?";
if(connection != null){
PreparedStatement ps = connection.prepareStatement(sql);
if(ps != null){
Log.e(TAG, "phonenum: " + phonenum);
ps.setString(1,phonenum);
ResultSet rs = ps.executeQuery();
int count = rs.getMetaData().getColumnCount();
while(rs.next()){
Map<String, Object> map = new HashMap<String, Object>();
for(int i = 1; i <= count; i++){
String field = rs.getMetaData().getColumnName(i);
if(field.equals("pickupcode")){
map.put(field, rs.getString(field));
}
if(field.equals("time")) {
map.put(field, rs.getString(field));
}
}
datalist.add(map);
}
connection.close();
ps.close();
}else{
Log.e(TAG, "ps is null");
}
}else{
Log.e(TAG, "connection is null");
}
}catch (Exception e){
e.printStackTrace();
Log.d(TAG, "search bug: " + e.getMessage());
}
return datalist;
}
}

@ -0,0 +1,123 @@
package com.example.logistics.ui;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.media.Image;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Toast;
import com.example.logistics.R;
import com.example.logistics.dao.goodDao;
import com.example.logistics.dao.operationDao;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class HistoryActivity extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener {
private String TAG = "HistoryActivity";
private ListView lv_history;
private ArrayAdapter<String> arr_adapter;
private SimpleAdapter simp_adapter;
private String phonenum;
private List<Map<String, Object>> dataList;
private ImageButton sync_his;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_history);
sync_his = (ImageButton) findViewById(R.id.sync_his);
dataList=new ArrayList<Map<String,Object>>();
lv_history = (ListView) findViewById(R.id.lv_history);
simp_adapter=new SimpleAdapter(this, dataList, R.layout.item, new String[]{"pickupcode","time"}, new int[]{R.id.np_id,R.id.np_time});
lv_history.setAdapter(simp_adapter);
lv_history.setOnItemClickListener(this);
lv_history.setOnScrollListener(this);
sync_his.setOnClickListener(this);
Intent intent = getIntent();
phonenum = intent.getStringExtra("user");
sync();
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// TODO Auto-generated method stub
String text=lv_history.getItemAtPosition(position)+"";
Toast.makeText(this, "position="+position+" text="+text, Toast.LENGTH_SHORT).show();
}
@Override
public void onClick(View v){
switch(v.getId()){
case R.id.sync_his:
sync();
Toast.makeText(this, "同步成功", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState){
// TODO Auto-generated method stub
switch(scrollState){
case SCROLL_STATE_FLING:
Log.i(TAG, "用户在手指离开屏幕之前,由于用力划了一下,试图仍依靠惯性继续滑动");
break;
case SCROLL_STATE_IDLE:
Log.i(TAG, "视图已经停止滑动");
break;
case SCROLL_STATE_TOUCH_SCROLL:
Log.i(TAG, "手指没有离开屏幕,视图正在滑动");
break;
default:
break;
}
}
@Override
public void onScroll(AbsListView view, int arg1, int arg2, int arg3){
// TODO Auto-generated method stub
}
public void sync(){
new Thread(){
@Override
public void run(){
operationDao operationDao = new operationDao();
dataList = operationDao.history(phonenum);
int msg = 1;
hand1.sendEmptyMessage(msg);
}
}.start();
}
@SuppressLint("HandlerLeak")
final Handler hand1 = new Handler(){
@Override
public void handleMessage(Message msg){
if(msg.what == 1){
simp_adapter=new SimpleAdapter(HistoryActivity.this, dataList, R.layout.item, new String[]{"pickupcode","time"}, new int[]{R.id.np_id,R.id.np_time});
lv_history.setAdapter(simp_adapter);
}
}
};
}

@ -29,8 +29,7 @@ public class MainActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(MainActivity.this, MenuActivity.class);
startActivity(intent);
Button loginButton = (Button) this.findViewById(R.id.LoginButton);
Button signUpButton = (Button) this.findViewById(R.id.SignUpButton);
@ -68,8 +67,9 @@ public class MainActivity extends Activity {
if(msg == 1){
User owner = userDao.findUser(userName.getText().toString().trim());
Intent intent = new Intent(MainActivity.this, MenuActivity.class);
intent.putExtra("name", owner.getPhoneNum());
intent.putExtra("user", owner.getPhoneNum());
startActivity(intent);
finish();
}
}
}.start();

@ -35,7 +35,7 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
bindView();
Intent intent = getIntent();
owner = intent.getStringExtra("name");
owner = intent.getStringExtra("user");
selectTab(0);
}
@ -94,6 +94,8 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
mTextNum1.setVisibility(View.INVISIBLE);
if (mFrag1 == null) {
mFrag1 = new MyFragment1();
transaction.add(R.id.fragment_container, mFrag1);
} else {
//如果第一页对应的Fragment已经实例化则直接显示出来
@ -119,6 +121,10 @@ public class MenuActivity extends AppCompatActivity implements View.OnClickListe
mTextNum3.setVisibility(View.INVISIBLE);
if (mFrag3 == null) {
mFrag3 = new MyFragment3();
Bundle bundle = new Bundle();
bundle.putString("user", owner);
mFrag3.setArguments(bundle);
transaction.add(R.id.fragment_container, mFrag3);
} else {
transaction.show(mFrag3);

@ -21,6 +21,7 @@ import android.widget.Toast;
import androidx.annotation.Nullable;
import com.example.logistics.R;
import com.example.logistics.dao.goodDao;
import com.example.logistics.dao.operationDao;
import com.example.logistics.dao.userDao;
import com.example.logistics.entity.User;
@ -91,33 +92,52 @@ public class MyFragment2 extends Fragment implements View.OnClickListener{
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(mContext, "取件成功", Toast.LENGTH_LONG).show();
String pickupcode = PickUpCode.getText().toString().trim();
String phonenum = PhoneNum.getText().toString().trim();
Log.d("onclick", "123");
String QR_pickup = result.split(" ")[0];
String QR_phone = result.split(" ")[1];
if (pickupcode.equals(QR_pickup) && pickupcode.equals(QR_phone)) {
Toast.makeText(mContext, "取件成功", Toast.LENGTH_LONG).show();
if (pickupcode.equals(QR_pickup) && phonenum.equals(QR_phone)) {
new Thread() {
@Override
public void run() {
int msg = 0;
operationDao operationDao = new operationDao();
goodDao goodDao = new goodDao();
Bundle bundle = getArguments();
String user = bundle.getString("user");
boolean flag = operationDao.add(pickupcode, user);
boolean flag1 = operationDao.add(pickupcode, user);
boolean flag2 = goodDao.delete(pickupcode);
boolean flag = flag1 & flag2;
if (flag) {
Log.d("add", "success");
} else {
Log.d("add", "failed");
msg = 1;
}
hand1.sendEmptyMessage(msg);
}
}.start();
} else {
Toast.makeText(mContext, "取件失败", Toast.LENGTH_LONG).show();
}
}
});
}
@SuppressLint("HandlerLeak")
final Handler hand1 = new Handler() {
@Override
public void handleMessage(Message msg) {
if (msg.what == 1) {
Toast.makeText(mContext, "取件成功", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(mContext, "取件失败", Toast.LENGTH_SHORT);
}
}
};
}

@ -1,16 +1,30 @@
package com.example.logistics.ui;
import androidx.fragment.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.Nullable;
import com.example.logistics.R;
import org.w3c.dom.Text;
public class MyFragment3 extends Fragment implements View.OnClickListener{
private LinearLayout ll_waiting;
private LinearLayout ll_history;
private LinearLayout ll_exit;
private Context mContext;
private String user;
public MyFragment3(){
}
@ -20,12 +34,44 @@ public class MyFragment3 extends Fragment implements View.OnClickListener{
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.my_fragment3,container,false);
ll_waiting = (LinearLayout) view.findViewById(R.id.waiting);
ll_history = (LinearLayout) view.findViewById(R.id.history);
ll_exit = (LinearLayout) view.findViewById(R.id.exit);
ll_waiting.setOnClickListener(this);
ll_history.setOnClickListener(this);
ll_exit.setOnClickListener(this);
mContext = getActivity();
Bundle bundle = getArguments();
user = bundle.getString("user");
return view;
}
@Override
public void onClick(View view) {
Intent intent;
switch(view.getId()){
case R.id.waiting:
intent = new Intent(mContext, NoPickActivity.class);
intent.putExtra("user", user);
startActivity(intent);
break;
case R.id.history:
intent = new Intent(mContext, HistoryActivity.class);
intent.putExtra("user", user);
startActivity(intent);
break;
case R.id.exit:
Toast.makeText(mContext, "exit", Toast.LENGTH_SHORT).show();
intent = new Intent(mContext, MainActivity.class);
startActivity(intent);
getActivity().finish();
break;
}
}
}

@ -0,0 +1,134 @@
package com.example.logistics.ui;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.NumberPicker;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import com.example.logistics.R;
import com.example.logistics.dao.goodDao;
import com.example.logistics.dao.userDao;
import com.example.logistics.entity.User;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
public class NoPickActivity extends Activity implements OnItemClickListener, OnScrollListener, View.OnClickListener {
private String TAG = "NoPickActivity";
private ListView lv_nopick;
private ArrayAdapter<String> arr_adapter;
private SimpleAdapter simp_adapter;
private String phonenum;
private List<Map<String, Object>> dataList;
private ImageButton sync_np;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_no_pick);
dataList=new ArrayList<Map<String,Object>>();
lv_nopick = (ListView) findViewById(R.id.lv_nopick);
sync_np = (ImageButton) findViewById(R.id.sync_np);
simp_adapter=new SimpleAdapter(this, dataList, R.layout.item, new String[]{"id","time"}, new int[]{R.id.np_id,R.id.np_time});
lv_nopick.setAdapter(simp_adapter);
lv_nopick.setOnItemClickListener(this);
lv_nopick.setOnScrollListener(this);
sync_np.setOnClickListener(this);
Intent intent = getIntent();
phonenum = intent.getStringExtra("user");
sync();
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// TODO Auto-generated method stub
String text=lv_nopick.getItemAtPosition(position)+"";
Toast.makeText(this, "position="+position+" text="+text, Toast.LENGTH_SHORT).show();
}
@Override
public void onClick(View v){
switch(v.getId()){
case R.id.sync_np:
sync();
Toast.makeText(this, "同步成功", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onScrollStateChanged(AbsListView view, int scrollState){
// TODO Auto-generated method stub
switch(scrollState){
case SCROLL_STATE_FLING:
Log.i(TAG, "用户在手指离开屏幕之前,由于用力划了一下,试图仍依靠惯性继续滑动");
break;
case SCROLL_STATE_IDLE:
Log.i(TAG, "视图已经停止滑动");
break;
case SCROLL_STATE_TOUCH_SCROLL:
Log.i(TAG, "手指没有离开屏幕,视图正在滑动");
break;
default:
break;
}
}
@Override
public void onScroll(AbsListView view, int arg1, int arg2, int arg3){
// TODO Auto-generated method stub
}
public void sync(){
new Thread(){
@Override
public void run(){
goodDao goodDao = new goodDao();
dataList = goodDao.nopick(phonenum);
int msg = 1;
hand1.sendEmptyMessage(msg);
}
}.start();
}
@SuppressLint("HandlerLeak")
final Handler hand1 = new Handler(){
@Override
public void handleMessage(Message msg){
if(msg.what == 1){
simp_adapter=new SimpleAdapter(NoPickActivity.this, dataList, R.layout.item, new String[]{"id","time"}, new int[]{R.id.np_id,R.id.np_time});
lv_nopick.setAdapter(simp_adapter);
}
}
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -0,0 +1,51 @@
<?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" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/blue">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" 取件码"
android:background="@color/blue"
android:textColor="#FFFFFF"
android:gravity="center_vertical"
android:textSize="25dp"/>
<ImageButton
android:id="@+id/sync_his"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/blue"
android:layout_marginLeft="100dp"
android:src="@drawable/sync" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="取件时间 "
android:background="@color/blue"
android:textColor="#FFFFFF"
android:textSize="25dp"
android:gravity="right|center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/lv_history"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,49 @@
<?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" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/blue">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text=" 取件码"
android:background="@color/blue"
android:textColor="#FFFFFF"
android:gravity="center_vertical"
android:textSize="25dp"/>
<ImageButton
android:id="@+id/sync_np"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/blue"
android:layout_marginLeft="100dp"
android:src="@drawable/sync" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="入库时间 "
android:background="@color/blue"
android:textColor="#FFFFFF"
android:textSize="25dp"
android:gravity="right|center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/lv_nopick"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,25 @@
<?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="horizontal"
>
<TextView
android:id="@+id/np_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="abc"
android:textColor="@color/black"
android:textSize="60dp" />
<TextView
android:id="@+id/np_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="abc"
android:gravity="right"
android:textSize="20dp"/>
</LinearLayout>

@ -3,12 +3,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="5dp">
android:padding="5dp"
android:background="#F5F5F5">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center">
<Button

@ -1,14 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="5dp">
android:orientation="vertical">
<TextView
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="50sp"
android:text="frag3" />
</LinearLayout>
android:layout_height="match_parent"
android:background="#F5F5F5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
<ImageView
android:id="@+id/userLogo"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="100dp"
android:src="@drawable/logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="100dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/waiting"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffffff"
android:text="待取件"
android:padding="15dp"
android:clickable="false"
android:textSize="24dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:gravity="right|center_vertical"
android:text="> "
android:clickable="false"
android:textSize="24dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/history"
android:layout_width="match_parent"
android:clickable="true"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffffff"
android:text="历史取件"
android:padding="15dp"
android:clickable="false"
android:textSize="24dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:gravity="right|center_vertical"
android:text="> "
android:clickable="false"
android:textSize="24dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/exit"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ffffff"
android:text="退出登录"
android:padding="15dp"
android:clickable="false"
android:textSize="24dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:gravity="right|center_vertical"
android:text="> "
android:clickable="false"
android:textSize="24dp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
Loading…
Cancel
Save