添加商品,分支合并

master
fangshicai 3 years ago
commit 175fef36d5

@ -7,11 +7,11 @@
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\fangshicai\.android\avd\Pixel_2_XL_API_30.avd" />
<value value="C:\Android\.android\avd\Pixel_XL_API_30.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-06-15T13:04:33.385030900Z" />
<timeTargetWasSelectedWithDropDown value="2022-06-23T08:11:20.809936600Z" />
</component>
</project>

@ -7,7 +7,6 @@
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$PROJECT_DIR$/../../programfile/gradleFile/gradle-7.4-all/gradle-7.4" />
<option name="gradleJvm" value="Android Studio java home" />
<option name="modules">
<set>

@ -3,6 +3,13 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/activity_delivery.xml" value="0.2" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/activity_delivery_detail.xml" value="0.22" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/fragment_goods_type.xml" value="0.36614583333333334" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/fragment_my_page.xml" value="0.21875" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/item_delivery.xml" value="0.21875" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/item_delivery_select.xml" value="0.21875" />
<entry key="..\:/Android/Projects/android_-design/app/src/main/res/layout/item_stagger.xml" value="0.2536231884057971" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/drawable/add_shopping_cart_24.xml" value="0.108" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/drawable/baseline_account_circle_18.xml" value="0.1345" />
<entry key="..\:/andriod/Android_Couser_Design/app/src/main/res/drawable/baseline_account_circle_20.xml" value="0.1345" />

@ -3,12 +3,13 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /><!-- 获取sd卡写的权限用于文件上传和下载 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><!-- 获取sd卡读的权限用于文件上传和下载 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 获取sd卡写的权限用于文件上传和下载 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- 获取sd卡读的权限用于文件上传和下载 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 允许联网 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取GSM2g、WCDMA联通3g等网络状态的信息 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 获取wifi网络状态的信息 -->
<uses-permission android:name="android.permission.WAKE_LOCK" /> <!-- 以便 CPU 在屏幕关闭时保持运行状态,用于文件上传和下载 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- 允许读取手机状态 用于创建BmobInstallation -->
<permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<permission android:name="android.permission.WRITE_SETTINGS" />
@ -31,6 +32,12 @@
android:supportsRtl="true"
android:theme="@style/Theme.Android_Couser_Design"
tools:targetApi="31">
<activity
android:name=".activity.DetailDeliveryActivity"
android:exported="false" />
<activity
android:name=".activity.DeliverActivity"
android:exported="false" />
<activity
android:name=".activity.ConfirmPurchaseActivity"
android:exported="false" />
@ -44,24 +51,23 @@
>
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- -->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name=".activity.LoginActivity"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.android.MainActivity" />
requestLegacyExternalStorage=true
</application>
<queries package="${applicationId}">

@ -4,7 +4,7 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity{
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

@ -0,0 +1,80 @@
package com.android.SQL;
import android.content.ContentValues;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.view.View;
import com.android.R;
import com.android.bean.DeliveryAdr;
public class MySQLiteOpenHelper extends SQLiteOpenHelper {
View view;
private static final String SQL_CREATE_ENTRIES =
"CREATE TABLE " + DeliveryAdr.DeliveryEntry.TABLE_NAME + " (" +
DeliveryAdr.DeliveryEntry._ID + " INTEGER PRIMARY KEY, " +
DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_NAME + " VARCHAR(200), " +
DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_TELE + " VARCHAR(200), " +
DeliveryAdr.DeliveryEntry.COLUMN_DETAIL_ADR + " VARCHAR(100), " +
DeliveryAdr.DeliveryEntry.COLUMN_IS_RAW + " VARCHAR(100) " +
")" ;
private static final String SQL_DELETE_ENTRIES =
"DROP TABLE IF EXISTS " + DeliveryAdr.DeliveryEntry.TABLE_NAME;
public static final int DATABASE_VERSION = 1;
public static final String DATABASE_NAME = "deliverys.db";
private Context mContext;
public MySQLiteOpenHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
sqLiteDatabase.execSQL(SQL_CREATE_ENTRIES);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase,
int oldVersion, int newVersion) {
sqLiteDatabase.execSQL(SQL_DELETE_ENTRIES);
onCreate(sqLiteDatabase);
}
// private void initDb(SQLiteDatabase sqLiteDatabase) {
//
// Resources resources = mContext.getResources();
// String[] titles = resources.getStringArray(R.array.titles);
// String[] authors = resources.getStringArray(R.array.authors);
// String[] contents = resources.getStringArray(R.array.contents);
// TypedArray images = resources.obtainTypedArray(R.array.images);
//
// int length = 0;
// length = Math.min(titles.length, authors.length);
// length = Math.min(length, contents.length);
// length = Math.min(length, images.length());
//
// for (int i = 0; i < length; i++) {
// ContentValues values = new ContentValues();
// values.put(DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_NAME ,
// titles[i]);
// values.put(DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_TELE,
// authors[i]);
// values.put(DeliveryAdr.DeliveryEntry.COLUMN_DETAIL_ADR ,
// contents[i]);
// values.put(DeliveryAdr.DeliveryEntry.COLUMN_IS_RAW ,
// images.getString(i));
//
// long r = sqLiteDatabase.insert(
// DeliveryAdr.DeliveryEntry.TABLE_NAME,
// null,
// values);
// }
// }
}

@ -0,0 +1,83 @@
package com.android.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SwitchCompat;
import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
import com.android.R;
import com.android.SQL.MySQLiteOpenHelper;
import com.android.activity.adapter.DeliverysAdapter;
import com.android.bean.DeliveryAdr;
import com.android.model.Delivery;
import java.util.ArrayList;
import java.util.List;
public class DeliverActivity extends AppCompatActivity {
MySQLiteOpenHelper myDbHelper;
SQLiteDatabase db;
private List<Delivery> deliList = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_delivery);
Button new_addr = findViewById(R.id.btn_delivery_add);
new_addr.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(DeliverActivity.this,
DetailDeliveryActivity.class);
startActivity(intent);
}
});
//查询数据
myDbHelper = new MySQLiteOpenHelper(DeliverActivity.this);
db = myDbHelper.getReadableDatabase();
Cursor cursor = db.query(
DeliveryAdr.DeliveryEntry.TABLE_NAME,
null, null, null, null, null, null);
int nameIndex = cursor.getColumnIndex(
DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_NAME);
int teleIndex = cursor.getColumnIndex(
DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_TELE);
int adrIndex = cursor.getColumnIndex(
DeliveryAdr.DeliveryEntry.COLUMN_DETAIL_ADR);
int swIndex = cursor.getColumnIndex(
DeliveryAdr.DeliveryEntry.COLUMN_IS_RAW);
while (cursor.moveToNext()) {
Delivery delivers = new Delivery();
String name = cursor.getString(nameIndex);
String tel = cursor.getString(teleIndex);
String adr = cursor.getString(adrIndex);
String sw = cursor.getString(swIndex);
delivers.setReceiver(name);
delivers.setPhone(tel);
delivers.setLocation(adr);
deliList.add(delivers);
}
DeliverysAdapter deliAdapter = new DeliverysAdapter(
DeliverActivity.this,
R.layout.item_delivery,
deliList);
ListView lvdelisList = findViewById(R.id.rv_delivery);
lvdelisList.setAdapter(deliAdapter);
}
}

@ -0,0 +1,67 @@
package com.android.activity;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SwitchCompat;
import android.content.ContentValues;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.android.R;
import com.android.SQL.MySQLiteOpenHelper;
import com.android.bean.DeliveryAdr;
public class DetailDeliveryActivity extends AppCompatActivity {
MySQLiteOpenHelper myDbHelper;
SQLiteDatabase db;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_delivery_detail);
myDbHelper = new MySQLiteOpenHelper(DetailDeliveryActivity.this);
db = myDbHelper.getReadableDatabase();
Toast.makeText(this, "创建数据库", Toast.LENGTH_SHORT).show();
EditText evtel = findViewById(R.id.et_delivery_phone);
EditText evname = findViewById(R.id.et_delivery_receiver);
EditText evloc = findViewById(R.id.et_delivery_location);
SwitchCompat scdef = findViewById(R.id.sc_delivery_default);
Button btsave = findViewById(R.id.btn_save);
btsave.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
ContentValues values = new ContentValues();
values.put(DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_NAME ,
evname.getText().toString());
values.put(DeliveryAdr.DeliveryEntry.COLUMN_PEOPLE_TELE,
evtel.getText().toString());
values.put(DeliveryAdr.DeliveryEntry.COLUMN_DETAIL_ADR ,
evloc.getText().toString());
if(scdef.isChecked())
values.put(DeliveryAdr.DeliveryEntry.COLUMN_IS_RAW ,
"true");
else
values.put(DeliveryAdr.DeliveryEntry.COLUMN_IS_RAW ,
"false");
long r = db.insert(
DeliveryAdr.DeliveryEntry.TABLE_NAME,
null,
values);
db.close();
Log.e("TAG", "保存数据");
}
});
}
}

@ -8,6 +8,7 @@ import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.android.R;
import com.android.bean.ResponseData;
@ -67,6 +68,8 @@ public class LoginActivity extends AppCompatActivity implements LoginListener, V
switch (v.getId()){
case R.id.bt_getCode:
loginModel.sendVerifyCode(account,this);
Toast.makeText(LoginActivity.this, "验证码发送成功!",
Toast.LENGTH_SHORT).show();
Log.e("TAG","验证码");break;
case R.id.bt_login:Log.e("TAG","登录");
password = etPwd.getText().toString();
@ -113,6 +116,8 @@ public class LoginActivity extends AppCompatActivity implements LoginListener, V
startActivity(intent);
}else {
Toast.makeText(LoginActivity.this, "登录信息有误!请仔细检查!",
Toast.LENGTH_SHORT).show();
Log.e("login",responseData.getMsg());
}
}

@ -0,0 +1,47 @@
package com.android.activity.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.R;
import com.android.activity.DeliverActivity;
import com.android.model.Delivery;
import java.util.List;
public class DeliverysAdapter extends ArrayAdapter<Delivery> {
private List<Delivery> mNewsData;
private Context mContext;
private int resourceId;
public DeliverysAdapter(Context context, int resourceId, List<Delivery> data) {
super(context, resourceId, data);
this.mContext = context;
this.mNewsData = data;
this.resourceId = resourceId;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Delivery deliverys = getItem(position);
View view ;
view = LayoutInflater.from(getContext()).inflate(resourceId, parent, false);
TextView tvreceiver = view.findViewById(R.id.tv_delivery_receiver);
TextView tvphone = view.findViewById(R.id.tv_delivery_phone);
TextView tvloc = view.findViewById(R.id.tv_delivery_location);
tvreceiver.setText(deliverys.getReceiver());
tvphone.setText(deliverys.getPhone());
tvloc.setText(deliverys.getLocation());
return view;
}
}

@ -1,5 +1,6 @@
package com.android.activity.fragment;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
@ -8,9 +9,12 @@ import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import com.android.activity.DeliverActivity;
import com.android.R;
import com.android.activity.LoginActivity;
import com.android.bean.ResponseData;
import com.android.bean.User;
@ -109,6 +113,22 @@ public class MyPageFragment extends Fragment {
// Inflate the layout for this fragment
view = inflater.inflate(R.layout.fragment_my_page, container, false);
TextView tvName = view.findViewById(R.id.tv_name);
Button rece_addr = view.findViewById(R.id.btn_my_recevive_goods);
rece_addr.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(getActivity(),
DeliverActivity.class);
startActivity(intent);
}
});
Button log_out = view.findViewById(R.id.btn_logout);
log_out.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(getActivity(),
LoginActivity.class);
startActivity(intent);
}
});
tvName.setText(user.getUserName());
return view;
}

@ -0,0 +1,16 @@
package com.android.bean;
import android.provider.BaseColumns;
public final class DeliveryAdr {
private DeliveryAdr() {}
public static class DeliveryEntry implements BaseColumns {
public static final String TABLE_NAME = "tbl_deli";
public static final String COLUMN_PEOPLE_NAME = "rece_people";
public static final String COLUMN_PEOPLE_TELE = "tele";
public static final String COLUMN_DETAIL_ADR = "adr";
public static final String COLUMN_IS_RAW = "false";
}
}

@ -0,0 +1,119 @@
package com.android.model;
import androidx.appcompat.widget.SwitchCompat;
public class Delivery {
private int id;
private String account;
private String receiver;
private String phone;
private String province;
private String city;
private String district;
private String location;
private SwitchCompat defaults;
public Delivery() {
}
public Delivery(int id, String account, String receiver, String phone, String province, String city, String district, String location, SwitchCompat defaults) {
this.id = id;
this.account = account;
this.receiver = receiver;
this.phone = phone;
this.province = province;
this.city = city;
this.district = district;
this.location = location;
this.defaults = defaults;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getReceiver() {
return receiver;
}
public void setReceiver(String receiver) {
this.receiver = receiver;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public SwitchCompat getDefaults() {
return defaults;
}
public void setDefaults(SwitchCompat defaults) {
this.defaults = defaults;
}
@Override
public String toString() {
return "Delivery{" +
"id=" + id +
", account='" + account + '\'' +
", receiver='" + receiver + '\'' +
", phone='" + phone + '\'' +
", province='" + province + '\'' +
", city='" + city + '\'' +
", district='" + district + '\'' +
", location='" + location + '\'' +
", defaults=" + defaults +
'}';
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -5,19 +5,19 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:left_btn_src="@drawable/icon_back"
app:left_btn_visible="true"
app:title_text="我的地址簿"
app:title_visible="true"
android:background="#E6E6E6">
<!-- app:left_btn_src="@drawable/icon_back"-->
<!-- app:left_btn_visible="true"-->
<!-- app:title_text="我的地址簿"-->
<!-- app:title_visible="true"-->
<androidx.recyclerview.widget.RecyclerView
<ListView
android:id="@+id/rv_delivery"
android:background="#E6E6E6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</androidx.recyclerview.widget.RecyclerView>
android:layout_weight="1"
/>
<Button
android:id="@+id/btn_delivery_add"

@ -7,13 +7,14 @@
android:orientation="vertical"
android:divider="@drawable/custom_rc_divider"
android:showDividers="middle|end"
android:background="#000000">
<!-- app:left_btn_src="@drawable/icon_back"-->
<!-- app:left_btn_visible="true"-->
<!-- app:title_text="新增地址"-->
<!-- app:title_visible="true"-->
<!-- app:right_tv_text="保存"-->
<!-- app:right_tv_visible="true"-->
android:background="@color/PureWhite"
app:left_btn_src="@drawable/icon_back"
app:left_btn_visible="true"
app:title_text="新增地址"
app:title_visible="true"
app:right_tv_text="保存"
app:right_tv_visible="true">
<LinearLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
@ -137,5 +138,25 @@
android:theme="@style/AppTheme" />
</LinearLayout>
<LinearLayout
android:layout_marginTop="15dp"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:gravity="center_horizontal">
<Button
android:id="@+id/btn_save"
android:layout_width="334dp"
android:layout_height="60dp"
android:background="@drawable/btn_selector"
android:text="保存"
android:textColor="@color/black"
android:textSize="23sp" />
</LinearLayout>
</LinearLayout>

@ -106,7 +106,7 @@
<Button
android:background="#00000000"
android:textColor="#33000000"
android:textColor="@color/black"
android:drawableTop="@drawable/my_released"
android:text="我发布的"
android:id="@+id/btn_my_released_goods"
@ -117,8 +117,8 @@
android:background="#00000000"
android:drawableTop="@drawable/receivegoods"
android:text="收货地址"
android:textColor="#33000000"
android:id="@+id/btn_my_served_goods"
android:textColor="@color/black"
android:id="@+id/btn_my_recevive_goods"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
@ -130,7 +130,7 @@
<Button
android:background="@drawable/btn_selector"
android:textColor="#33000000"
android:textColor="@color/black"
android:layout_marginTop="20dp"
android:text="退出登录"
android:id="@+id/btn_logout"

@ -67,34 +67,34 @@
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="设为默认"/>
<!-- <com.example.xmfy.yzubookshop.widget.RichText-->
<!-- android:id="@+id/tv_delivery_edit"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- app:drawable_src="@mipmap/icon_delivery_edit"-->
<!-- app:drawable_location="left"-->
<!-- app:drawable_height="25dp"-->
<!-- app:drawable_width="25dp"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:textColor="@color/text_clo"-->
<!-- android:textSize="18sp"-->
<!-- android:text="修改"/>-->
<TextView
android:id="@+id/tv_delivery_edi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:drawable_src="@mipmap/icon_delivery_edit"
app:drawable_location="left"
app:drawable_height="25dp"
app:drawable_width="25dp"
android:drawablePadding="5dp"
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="修改"/>
<!-- <com.example.xmfy.yzubookshop.widget.RichText-->
<!-- android:id="@+id/tv_delivery_delete"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- app:drawable_src="@mipmap/icon_delivery_delete"-->
<!-- app:drawable_location="left"-->
<!-- app:drawable_height="25dp"-->
<!-- app:drawable_width="25dp"-->
<!-- android:paddingLeft="5dp"-->
<!-- android:paddingRight="10dp"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:textColor="@color/text_clo"-->
<!-- android:textSize="18sp"-->
<!-- android:text="删除"/>-->
<TextView
android:id="@+id/tv_delivery_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:drawable_src="@mipmap/icon_delivery_delete"
app:drawable_location="left"
app:drawable_height="25dp"
app:drawable_width="25dp"
android:paddingLeft="5dp"
android:paddingRight="10dp"
android:drawablePadding="5dp"
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="删除"/>
</LinearLayout>
</LinearLayout>

@ -67,34 +67,34 @@
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="设为默认"/>
<!-- <com.example.xmfy.yzubookshop.widget.RichText-->
<!-- android:id="@+id/tv_delivery_edit"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- app:drawable_src="@mipmap/icon_delivery_edit"-->
<!-- app:drawable_location="left"-->
<!-- app:drawable_height="25dp"-->
<!-- app:drawable_width="25dp"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:textColor="@color/text_clo"-->
<!-- android:textSize="18sp"-->
<!-- android:text="修改"/>-->
<TextView
android:id="@+id/tv_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:drawable_src="@mipmap/icon_delivery_edit"
app:drawable_location="left"
app:drawable_height="25dp"
app:drawable_width="25dp"
android:drawablePadding="5dp"
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="修改"/>
<!-- <com.example.xmfy.yzubookshop.widget.RichText-->
<!-- android:id="@+id/tv_delivery_delete"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- app:drawable_src="@mipmap/icon_delivery_delete"-->
<!-- app:drawable_location="left"-->
<!-- app:drawable_height="25dp"-->
<!-- app:drawable_width="25dp"-->
<!-- android:paddingLeft="5dp"-->
<!-- android:paddingRight="10dp"-->
<!-- android:drawablePadding="5dp"-->
<!-- android:textColor="@color/text_clo"-->
<!-- android:textSize="18sp"-->
<!-- android:text="删除"/>-->
<TextView
android:id="@+id/tv_delivery_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
app:drawable_src="@mipmap/icon_delivery_delete"
app:drawable_location="left"
app:drawable_height="25dp"
app:drawable_width="25dp"
android:paddingLeft="5dp"
android:paddingRight="10dp"
android:drawablePadding="5dp"
android:textColor="@color/text_clo"
android:textSize="18sp"
android:text="删除"/>
</LinearLayout>
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="CustomToolBar">
<attr name="left_btn_visible" format="boolean"/>
<attr name="left_btn_src" format="reference|color"/>
<attr name="left_tv_visible" format="boolean"/>
<attr name="left_tv_text" format="string"/>
<attr name="right_btn_visible" format="boolean"/>
<attr name="right_btn_src" format="reference|color"/>
<attr name="right_tv_visible" format="boolean"/>
<attr name="right_tv_text" format="string"/>
<attr name="title_visible" format="boolean"/>
<attr name="title_text" format="string"/>
<attr name="barBackground" format="color|reference"/>
</declare-styleable>
<declare-styleable name="CircleImageView">
<attr name="border_width" format="dimension" />
<attr name="border_color" format="color" />
</declare-styleable>
<!-- 自定义TextView -->
<declare-styleable name="RichText">
<attr name="drawable_src" format="reference" />
<attr name="drawable_height" format="dimension" />
<attr name="drawable_width" format="dimension" />
<attr name="drawable_location">
<enum name="left" value="1" />
<enum name="top" value="2" />
<enum name="right" value="3" />
<enum name="bottom" value="4" />
</attr>
</declare-styleable>
</resources>
Loading…
Cancel
Save