提交 d29aa356 编写于 作者: S suhy

debug

上级 d5f1880f
......@@ -77,11 +77,11 @@
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/drawable/edit_background.xml" value="0.275" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/font/swanky_and_moo_moo.xml" value="0.2171875" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_add_bottle.xml" value="0.264" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_add_message.xml" value="0.24609375" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_add_message.xml" value="0.3180396246089677" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_ar.xml" value="0.13858695652173914" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_bottle_details.xml" value="0.25885416666666666" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_change_password.xml" value="0.264" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_draft_details.xml" value="0.15677083333333333" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_draft_details.xml" value="0.2" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_evalute.xml" value="0.2" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_historical_records.xml" value="0.13858695652173914" />
<entry key="..\:/Users/suhy/Desktop/github/drift-bottle/MyHomeWork/app/src/main/res/layout/activity_login.xml" value="0.2" />
......
......@@ -53,6 +53,10 @@ public class MapRecordAdapter extends RecyclerView.Adapter<MapRecordAdapter.View
return new ViewHolder(view);
}
private double toArc(double role){
return role*3.1415926/180.0;
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.setIsRecyclable(false);
......@@ -65,8 +69,9 @@ public class MapRecordAdapter extends RecyclerView.Adapter<MapRecordAdapter.View
itemMaprecordBinding.imageView.setImageResource(R.drawable.bottle);
}
double d,R = 6371;
d=R*Math.acos(Math.cos(Longitude) * Math.cos(mapRecord.getY())*Math.cos(Latitude - mapRecord.getX())
+Math.sin(Longitude) * Math.sin(mapRecord.getY()));
d=R*Math.acos(Math.cos(toArc(Longitude)) * Math.cos(toArc(mapRecord.getY()))*Math.cos(toArc(Latitude) - toArc(mapRecord.getX()))
+Math.sin(toArc(Longitude)) * Math.sin(toArc(mapRecord.getY())));
String str;
if(d > 1){
str = String.format("%.2f",d);
......@@ -90,8 +95,6 @@ public class MapRecordAdapter extends RecyclerView.Adapter<MapRecordAdapter.View
activity.startActivity(intent);
}
}else {
UiUtil.ShowToast(activity, "当前距离过远,请靠近地点再拾取");
LatLng latLng = new LatLng(mapRecord.getX(), mapRecord.getY());
......
package com.example.myhomework.fragment;
import static com.example.myhomework.global.GlobalMemory.Latitude;
import static com.example.myhomework.global.GlobalMemory.Longitude;
import static com.example.myhomework.global.GlobalMemory.MapRecordList;
import android.content.IntentFilter;
......@@ -78,12 +77,6 @@ public class MapFragment extends Fragment {
MapUtil.initLocationOption(getActivity(),binding.map);
initRecycleView();
initPoint();
/**动态注册广播*/
IntentFilter iFilter = new IntentFilter();
iFilter.addAction(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR);
iFilter.addAction(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_OK);
SDKReceiver mReceiver = new SDKReceiver();
getActivity().registerReceiver(mReceiver, iFilter);
return binding.getRoot();
}
......
......@@ -25,6 +25,12 @@ public class MineFragment extends Fragment {
super.onCreate(savedInstanceState);
}
@Override
public void onResume(){
super.onResume();
binding.userName.setText(GlobalMemory.NickName);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
......
......@@ -24,7 +24,7 @@ public class GlobalMemory {
public static String Address = "未知地点";
public static List<String> PoiNameList = new ArrayList<>();
public static List<Poi> PoiList = new ArrayList<>();
public static double Limit = 500;
public static double Limit = 300;
public static void PrintLog(String msg){
Log.d(TAG,msg);
}
......
......@@ -35,12 +35,13 @@ public class BottleService extends Service {
public static void showBottle(int id, Activity activity, TextView title, BaiduMap baiduMap, EditText describe){
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "SELECT * from point where id =" + id;
String sql = "SELECT * from point where id = ?";
GlobalMemory.PrintLog(TAG+sql);
PreparedStatement preparedStatement;
ResultSet resultSet;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setInt(1,id);
resultSet = preparedStatement.executeQuery();
resultSet.next();
activity.runOnUiThread(()->{
......
......@@ -86,12 +86,17 @@ public class MapService extends Service {
public static void addBottle(double x, double y, String title, String address, String describe, String author, Activity context) {
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "INSERT into point values(null,"+x+","+y+",'"+title+"','"
+address+"','"+describe+"','Bottle','"+author+"')";
String sql = "INSERT into point values(null,?,?,?,?,?,'Bottle',?)";
GlobalMemory.PrintLog(TAG+sql);
PreparedStatement preparedStatement;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setDouble(1,x);
preparedStatement.setDouble(2,y);
preparedStatement.setString(3,title);
preparedStatement.setString(4,address);
preparedStatement.setString(5,describe);
preparedStatement.setString(6,author);
preparedStatement.executeUpdate();
}catch (Exception e){
GlobalMemory.PrintLog(TAG+e.getMessage());
......@@ -105,12 +110,17 @@ public class MapService extends Service {
public static void addBoard(double x, double y, String title, String address, String describe, String author, Activity context) {
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "INSERT into point values(null,"+x+","+y+",'"+title+"','"
+address+"','"+describe+"','Board','"+author+"')";
String sql = "INSERT into point values(null,?,?,?,?,?,'Board',?)";
GlobalMemory.PrintLog(TAG+sql);
PreparedStatement preparedStatement;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setDouble(1,x);
preparedStatement.setDouble(2,y);
preparedStatement.setString(3,title);
preparedStatement.setString(4,address);
preparedStatement.setString(5,describe);
preparedStatement.setString(6,author);
preparedStatement.executeUpdate();
}catch (Exception e){
GlobalMemory.PrintLog(TAG+e.getMessage());
......
......@@ -38,11 +38,12 @@ public class MessageService extends Service {
public static void showBoard(int id, Activity activity, TextView title, BaiduMap baiduMap, MessageAdapter adapter){
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "SELECT * from point where id =" + id;
String sql = "SELECT * from point where id =?";
PreparedStatement preparedStatement;
ResultSet resultSet;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setInt(1,id);
resultSet = preparedStatement.executeQuery();
resultSet.next();
activity.runOnUiThread(()->{
......@@ -65,8 +66,9 @@ public class MessageService extends Service {
UiUtil.ShowToast(activity,e.getMessage());
}
});
sql = "SELECT * from message where board =" + id;
sql = "SELECT * from message where board =?";
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setInt(1,id);
ResultSet resultSet1 = preparedStatement.executeQuery();
MessageActivity.messageList.clear();
while (resultSet1.next()){
......@@ -89,12 +91,14 @@ public class MessageService extends Service {
public static void addMessage(String message, String author, int board, Activity activity) {
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "INSERT into message values(null,'"+message+"','"
+author+"',"+board+")";
String sql = "INSERT into message values(null,?,?,?)";
GlobalMemory.PrintLog(TAG+sql);
PreparedStatement preparedStatement;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setString(1,message);
preparedStatement.setString(2,author);
preparedStatement.setInt(3,board);
preparedStatement.executeUpdate();
}catch (Exception e){
GlobalMemory.PrintLog(TAG+e.getMessage());
......@@ -108,16 +112,18 @@ public class MessageService extends Service {
public static void showMessage(int id, Activity activity, TextView title, BaiduMap baiduMap, EditText describe){
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql = "SELECT * from message where id =" + id;
String sql = "SELECT * from message where id =?";
GlobalMemory.PrintLog(TAG+sql);
PreparedStatement preparedStatement,mapPre;
ResultSet resultSet, mapResultSet;
try {
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setInt(1,id);
resultSet = preparedStatement.executeQuery();
resultSet.next();
String mapSql = "SELECT * from point where id =" + resultSet.getInt("board");
String mapSql = "SELECT * from point where id = ?";
mapPre = connection.prepareStatement(mapSql);
mapPre.setInt(1,resultSet.getInt("board"));
mapResultSet = mapPre.executeQuery();
mapResultSet.next();
activity.runOnUiThread(()->{
......
......@@ -32,15 +32,17 @@ public class UserService extends Service {
public static void Login(String id, String password, AppCompatActivity activity) {
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql="SELECT * from user where uid='"+id+"' and password='"+password+"'";
String sql="SELECT * from user where uid = ? and password = ?";
PreparedStatement preparedStatement;
ResultSet resultSet;
try {
preparedStatement=connection.prepareStatement(sql);
preparedStatement.setString(1,id);
preparedStatement.setString(2,password);
resultSet=preparedStatement.executeQuery();
if(resultSet.next()){
GlobalMemory.NickName = resultSet.getString("nickname");
GlobalMemory.UserId = resultSet.getString("uid");
UserId = resultSet.getString("uid");
activity.startActivity(new Intent(activity, MainActivity.class));
GlobalMemory.PrintLog(TAG+"登陆成功");
activity.finish();
......@@ -58,18 +60,22 @@ public class UserService extends Service {
public static void Register(String id, String password, String nickname, AppCompatActivity activity) {
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql="SELECT * from user where uid='"+id+"'";
String sql="SELECT * from user where uid=?";
PreparedStatement preparedStatement;
ResultSet resultSet;
try {
preparedStatement=connection.prepareStatement(sql);
preparedStatement.setString(1,id);
resultSet=preparedStatement.executeQuery();
if(resultSet.next()){
activity.runOnUiThread(()-> Toast.makeText(activity,"邮箱已被注册",Toast.LENGTH_LONG).show());
GlobalMemory.PrintLog(TAG+"邮箱已被注册");
}else{
sql = "INSERT into user values('"+id+"','"+password+"','"+nickname+"')";
sql = "INSERT into user values(?,?,?)";
preparedStatement = connection.prepareStatement(sql);
preparedStatement.setString(1,id);
preparedStatement.setString(2,password);
preparedStatement.setString(3,nickname);
preparedStatement.executeUpdate();
activity.startActivity(new Intent(activity, LoginActivity.class));
activity.runOnUiThread(()-> Toast.makeText(activity,"注册成功",Toast.LENGTH_LONG).show());
......@@ -86,10 +92,13 @@ public class UserService extends Service {
public static void ChangePassWord(String nickname, String password, Activity activity){
new Thread(() -> {
Connection connection = JDBCUtil.Connection();
String sql="UPDATE user set nickname='"+nickname+"', password = '"+password +"' where uid ='"+UserId+"'";
String sql="UPDATE user set nickname = ?, password = ? where uid = ?";
PreparedStatement preparedStatement;
try {
preparedStatement=connection.prepareStatement(sql);
preparedStatement.setString(1,nickname);
preparedStatement.setString(2,password);
preparedStatement.setString(3,UserId);
preparedStatement.executeUpdate();
UiUtil.ShowToast(activity,"修改成功");
Intent intent=new Intent(activity, MainActivity.class);
......
......@@ -29,9 +29,11 @@
tools:ignore="MissingConstraints" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:paddingStart="40dp"
android:paddingEnd="40dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -39,21 +41,19 @@
app:layout_constraintTop_toTopOf="parent">
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginTop="75dp"
android:layout_marginTop="25dp"
app:cardCornerRadius="15dp">
<EditText
android:id="@+id/title"
android:layout_marginStart="10dp"
android:textSize="15sp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:background="#00FFFFFF"
android:hint="请输入标题"
android:textColor="@color/label_text"
android:textSize="15sp" />
android:hint="请输入标题" />
</androidx.cardview.widget.CardView>
......@@ -61,16 +61,15 @@
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="left"
android:layout_marginStart="35dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:text="投放地点"
android:layout_gravity="center_vertical"
android:text="投放位置"
android:textColor="@color/label_text"
android:textSize="15sp" />
......@@ -78,19 +77,20 @@
<com.baidu.mapapi.map.MapView
android:id="@+id/map"
android:layout_width="340dp"
android:layout_height="160dp"
android:layout_gravity="center"
android:layout_marginTop="10dp" />
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="10dp"
/>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
<Spinner
android:layout_marginStart="15dp"
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -100,96 +100,90 @@
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_marginStart="35dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp"
android:text="投放内容"
android:textColor="@color/label_text"
android:textSize="16sp" />
android:text="漂流瓶内容" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="35dp"
android:orientation="vertical">
android:orientation="vertical"
android:layout_weight="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Switch
android:id="@+id/switchAnon"
android:layout_gravity="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="15dp" />
android:layout_marginTop="15dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_gravity="end"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:text="匿名"
android:textColor="@color/label_text"
android:textSize="16sp" />
android:text="匿名" />
</LinearLayout>
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_gravity="center"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
<EditText
android:id="@+id/describe"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="5dp"
android:background="#00FFFFFF"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:enabled="true"
android:inputType="textMultiLine"
android:maxLines="10"
android:minLines="8"
android:maxLines="10"
android:scrollbars="vertical"
android:background="#00FFFFFF"
android:textColor="@color/label_text" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="20dp">
<Button
android:id="@+id/finish"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryVariant"
android:text="完成"
android:text="完 成"
android:textColor="@color/white"
android:textSize="20sp" />
android:textSize="18sp" />
</androidx.cardview.widget.CardView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -31,6 +31,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="50dp"
android:paddingStart="40dp"
android:paddingEnd="40dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -38,10 +41,9 @@
app:layout_constraintTop_toTopOf="parent">
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="75dp"
android:layout_gravity="center"
android:layout_marginTop="25dp"
app:cardCornerRadius="15dp">
<EditText
android:id="@+id/title"
......@@ -59,7 +61,6 @@
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="left"
android:layout_marginStart="35dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
......@@ -77,13 +78,13 @@
<com.baidu.mapapi.map.MapView
android:id="@+id/map"
android:layout_gravity="center"
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="10dp"
/>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_gravity="center"
android:layout_marginTop="15dp"
......@@ -102,10 +103,10 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_marginStart="35dp"
android:layout_marginTop="15dp"
app:cardCornerRadius="15dp">
<TextView
......@@ -118,15 +119,15 @@
android:text="留言板描述" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_marginEnd="35dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_weight="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Switch
android:id="@+id/switchAnon"
android:layout_gravity="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="15dp"
/>
<TextView
......@@ -143,10 +144,9 @@
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_marginTop="15dp"
android:layout_gravity="center"
app:cardCornerRadius="15dp">
<EditText
android:id="@+id/describe"
......@@ -166,10 +166,9 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="40dp"
app:cardCornerRadius="20dp">
<Button
android:id="@+id/finish"
......
......@@ -31,6 +31,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="40dp"
android:paddingEnd="40dp"
android:layout_marginTop="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
......@@ -38,10 +40,9 @@
app:layout_constraintTop_toTopOf="parent">
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="35dp"
android:layout_gravity="center"
app:cardCornerRadius="15dp">
<TextView
android:id="@+id/title"
......@@ -61,7 +62,6 @@
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="left"
android:layout_marginStart="35dp"
android:layout_marginTop="25dp"
app:cardCornerRadius="15dp">
......@@ -79,16 +79,15 @@
<com.baidu.mapapi.map.MapView
android:id="@+id/map"
android:layout_gravity="center"
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_marginTop="20dp"
/>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_marginTop="25dp"
android:layout_gravity="center"
app:cardCornerRadius="15dp">
<EditText
android:id="@+id/describe"
......@@ -108,10 +107,9 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="45dp"
android:layout_marginLeft="40dp"
app:cardCornerRadius="20dp">
<Button
android:id="@+id/finish"
......
......@@ -21,6 +21,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="50dp"
android:paddingStart="40dp"
android:paddingEnd="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
......@@ -29,9 +32,8 @@
app:layout_constraintVertical_bias="1.0">
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="75dp"
app:cardCornerRadius="15dp">
......@@ -47,7 +49,7 @@
<androidx.cardview.widget.CardView
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_marginLeft="40dp"
android:layout_gravity="start"
android:layout_marginTop="30dp"
app:cardCornerRadius="15dp">
......@@ -65,9 +67,8 @@
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="380dp"
android:layout_marginLeft="40dp"
android:layout_marginTop="30dp"
app:cardCornerRadius="15dp">
......@@ -93,7 +94,6 @@
<androidx.cardview.widget.CardView
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginLeft="40dp"
app:cardCornerRadius="15dp">
<Button
......
......@@ -25,7 +25,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="50dp"
android:layout_gravity="center"
android:layout_marginTop="40dp"
android:text="CAMPUS DRIFTING BOTTLE"
android:textSize="24dp"
......@@ -36,7 +36,7 @@
android:layout_height="35dp"
android:background="@drawable/edit_background"
android:layout_marginTop="40dp"
android:layout_marginLeft="50dp"
android:layout_gravity="center"
android:textAlignment="center"
android:textColor="@color/label_text"
android:hint="请输入账号" />
......@@ -45,7 +45,7 @@
android:id="@+id/password"
android:layout_width="300dp"
android:layout_height="35dp"
android:layout_marginLeft="50dp"
android:layout_gravity="center"
android:layout_marginTop="30dp"
android:textAlignment="center"
android:background="@drawable/edit_background"
......
......@@ -32,13 +32,15 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="50dp"
android:paddingStart="40dp"
android:paddingEnd="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="20dp"
android:layout_gravity="center"
......@@ -61,7 +63,6 @@
android:layout_width="110dp"
android:layout_height="45dp"
android:layout_gravity="left"
android:layout_marginStart="35dp"
android:layout_marginTop="20dp"
app:cardCornerRadius="15dp">
......@@ -79,21 +80,21 @@
<com.baidu.mapapi.map.MapView
android:id="@+id/map"
android:layout_gravity="center"
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_marginTop="10dp"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="190dp"
android:layout_marginTop="25dp"
android:layout_gravity="center"
app:cardCornerRadius="15dp" />
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginTop="25dp"
android:layout_gravity="center"
......@@ -119,37 +120,39 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="35dp"
android:gravity="start"
android:layout_marginStart="40dp"
android:gravity="top"
android:layout_weight="5"
android:orientation="vertical">
<Switch
android:id="@+id/switchAnon"
android:layout_gravity="start"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_gravity="start"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:text="匿名"
android:textColor="@color/label_text"
android:textSize="16sp" />
</LinearLayout>
<androidx.cardview.widget.CardView
<com.example.myhomework.view.RadiusCardView
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginStart="100dp"
app:cardCornerRadius="20dp">
app:rcv_bottomRightRadiu="20dp"
app:rcv_bottomLeftRadiu="20dp"
app:rcv_topRightRadiu="20dp"
app:rcv_topLeftRadiu="20dp"
android:layout_weight="1">
<Button
android:id="@+id/finish"
android:layout_width="match_parent"
......@@ -158,7 +161,9 @@
android:text="添加留言"
android:textColor="@color/white"
android:textSize="18sp" />
</androidx.cardview.widget.CardView>
</com.example.myhomework.view.RadiusCardView>
</LinearLayout>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册