Android开发实用小工具二——长度转换工具
生活随笔
收集整理的這篇文章主要介紹了
Android开发实用小工具二——长度转换工具
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
文章目錄
- 前言
- 一、效果展示
- 二、代碼
- 1.準(zhǔn)備工作
- 2.樣式布局
- 3.主代碼
- 總結(jié)
前言
長(zhǎng)度轉(zhuǎn)換工具的開(kāi)發(fā)與實(shí)現(xiàn)。
一、效果展示
二、代碼
1.準(zhǔn)備工作
res/drawable/ic_back.xml :
<vector xmlns:android="http://schemas.android.com/apk/res/android"android:width="24dp"android:height="24dp"android:tint="@color/black"android:viewportWidth="24"android:viewportHeight="24"><pathandroid:fillColor="@android:color/white"android:pathData="M11.67,3.87L9.9,2.1 0,12l9.9,9.9 1.77,-1.77L3.54,12z" /> </vector>res/drawable/ic_delete.xml :
<vector xmlns:android="http://schemas.android.com/apk/res/android"android:width="30dp"android:height="30dp"android:viewportWidth="24"android:viewportHeight="24"android:tint="#FF0080FF"><pathandroid:fillColor="@android:color/white"android:pathData="M22,3L7,3c-0.69,0 -1.23,0.35 -1.59,0.88L0,12l5.41,8.11c0.36,0.53 0.9,0.89 1.59,0.89h15c1.1,0 2,-0.9 2,-2L24,5c0,-1.1 -0.9,-2 -2,-2zM19,15.59L17.59,17 14,13.41 10.41,17 9,15.59 12.59,12 9,8.41 10.41,7 14,10.59 17.59,7 19,8.41 15.41,12 19,15.59z"/> </vector>res/drawable/shape_module.xml :
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"><!-- 指定了形狀內(nèi)部的填充顏色 --><solid android:color="#FFF4F4F4" /><!-- 指定了形狀四個(gè)圓角的半徑 --><cornersandroid:topLeftRadius="10dp"android:topRightRadius="10dp" /></shape>res/drawable/radio_button_selector.xml :
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"><item android:drawable="@drawable/shape_radio_button_pressed" android:state_pressed="true" /><item android:drawable="@drawable/shape_radio_button_unpressed" /></selector>res/drawable/shape_radio_button_unpressed.xml :
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"><!-- 指定了形狀內(nèi)部的填充顏色 --><solid android:color="#fcfcfc" /><!-- 指定了形狀輪廓的粗細(xì)與顏色 --><strokeandroid:width="1dp"android:color="#D6D6D6" /><!-- 指定了形狀四個(gè)圓角的半徑 --><corners android:radius="100dp" /></shape>res/drawable/shape_radio_button_pressed.xml :
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"><!-- 指定了形狀內(nèi)部的填充顏色 --><solid android:color="#e3e4e6" /><!-- 指定了形狀四個(gè)圓角的半徑 --><corners android:radius="100dp" /></shape>res/layout/item_value_conversion.xml :
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:id="@+id/ll_unit"android:layout_width="match_parent"android:layout_height="wrap_content"android:padding="15dp"android:orientation="horizontal"><TextViewandroid:id="@+id/tv_name"android:layout_width="wrap_content"android:layout_height="match_parent"android:textColor="@color/black"android:textSize="17sp"android:layout_marginRight="15dp"tools:text="千米"/><TextViewandroid:id="@+id/tv_unit"android:layout_width="wrap_content"android:layout_height="match_parent"android:textColor="@color/black"android:textSize="17sp"tools:text="km"/></LinearLayout>2.樣式布局
res/layout/activity_value_conversion.xml :
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:background="#ffe9ecf1"android:orientation="vertical"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="50dp"android:background="#ffffffff"><ImageViewandroid:id="@+id/iv_back"android:layout_width="40dp"android:layout_height="match_parent"android:layout_alignParentLeft="true"android:padding="10dp"android:scaleType="fitCenter"android:src="@drawable/ic_back" /><TextViewandroid:id="@+id/tv_title"android:layout_width="wrap_content"android:layout_height="match_parent"android:layout_centerInParent="true"android:gravity="center"android:text="長(zhǎng)度轉(zhuǎn)換工具"android:textColor="#ff000000"android:textSize="17sp" /></RelativeLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Spinnerandroid:id="@+id/sp_select1"android:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="5"android:dropDownWidth="215dp"android:popupBackground="@drawable/shape_module"android:spinnerMode="dropdown" /><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="6"android:orientation="vertical"><TextViewandroid:id="@+id/tv_value1"android:layout_width="match_parent"android:layout_height="0dp"android:layout_marginRight="10dp"android:layout_weight="2"android:gravity="right|bottom"android:text="0"android:textColor="#ffff8800"android:textSize="30sp" /><TextViewandroid:id="@+id/tv_unit1"android:layout_width="match_parent"android:layout_height="0dp"android:layout_marginRight="10dp"android:layout_weight="1"android:gravity="right"android:textColor="#FF959595"android:textSize="13sp"tools:text="m" /></LinearLayout></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Spinnerandroid:id="@+id/sp_select2"android:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="5"android:dropDownWidth="215dp"android:popupBackground="@drawable/shape_module"android:spinnerMode="dropdown" /><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="6"android:orientation="vertical"><TextViewandroid:id="@+id/tv_value2"android:layout_width="match_parent"android:layout_height="0dp"android:layout_marginRight="10dp"android:layout_weight="2"android:gravity="right|bottom"android:text="0"android:textColor="#ff000000"android:textSize="30sp" /><TextViewandroid:id="@+id/tv_unit2"android:layout_width="match_parent"android:layout_height="0dp"android:layout_marginRight="10dp"android:layout_weight="1"android:gravity="right"android:textColor="#FF959595"android:textSize="13sp"tools:text="chi" /></LinearLayout></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:background="@drawable/shape_module"android:orientation="horizontal"android:padding="20dp"><LinearLayoutandroid:layout_width="0dp"android:layout_height="wrap_content"android:layout_weight="3"android:orientation="vertical"><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Buttonandroid:id="@+id/btn_7"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="7"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_8"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="8"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_9"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="9"android:textColor="#ff000000"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Buttonandroid:id="@+id/btn_4"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="4"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_5"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="5"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_6"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="6"android:textColor="#ff000000"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Buttonandroid:id="@+id/btn_1"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="1"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_2"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="2"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_3"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="3"android:textColor="#ff000000"android:textSize="35sp" /></LinearLayout><LinearLayoutandroid:layout_width="match_parent"android:layout_height="0dp"android:layout_weight="1"android:orientation="horizontal"><Buttonandroid:id="@+id/btn_0"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="2"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="0"android:textColor="#ff000000"android:textSize="35sp" /><Buttonandroid:id="@+id/btn_pt"android:layout_width="0dp"android:layout_height="match_parent"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="."android:textColor="#ff000000"android:textSize="35sp" /></LinearLayout></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:orientation="vertical"><Buttonandroid:id="@+id/btn_clr"android:layout_width="match_parent"android:layout_height="0dp"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:text="C"android:textColor="#FF0080FF"android:textSize="35sp" /><ImageButtonandroid:id="@+id/iv_del"android:layout_width="match_parent"android:layout_height="0dp"android:layout_margin="6dp"android:layout_weight="1"android:background="@drawable/radio_button_selector"android:padding="10dp"android:src="@drawable/ic_delete" /></LinearLayout></LinearLayout></LinearLayout>3.主代碼
LengthConversionActivity.java :
public class LengthConversionActivity extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {// 定義下拉列表需要顯示的單位名稱private static final String[] nameArray = {"千米", "米", "分米", "厘米", "毫米", "微米","納米", "皮米", "海里", "英里", "弗隆", "英尋","碼", "英尺", "英寸", "公里", "里", "丈","尺", "寸", "分", "厘", "毫", "秒差距","月球距離", "天文單位", "光年"};// 定義下拉列表需要顯示的單位數(shù)組private static final String[] unitArray = {"km", "m", "dm", "cm", "mm", "μm","nm", "pm", "nmi", "mi", "fur", "ftm","yd", "ft", "in", "gongli", "li", "zhang","chi", "cun", "fen", "lii", "hao", "pc","ld", "A.U.", "ly"};private Spinner sp_select1;private Spinner sp_select2;TextView tv_value1;TextView tv_unit1;TextView tv_value2;TextView tv_unit2;private List<Button> buttonList = new ArrayList<>();ImageButton iv_del;// 單位一private String unit1 = "千米";// 單位二private String unit2 = "米";// 數(shù)值一private String value1 = "0";// 數(shù)值二private String value2 = "0";// 臨時(shí)數(shù)值private BigDecimal tempValue;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_value_conversion);// 獲取控件,并添加點(diǎn)擊事件findViewById(R.id.iv_back).setOnClickListener(this);sp_select1 = findViewById(R.id.sp_select1);sp_select2 = findViewById(R.id.sp_select2);tv_value1 = findViewById(R.id.tv_value1);tv_unit1 = findViewById(R.id.tv_unit1);tv_value2 = findViewById(R.id.tv_value2);tv_unit2 = findViewById(R.id.tv_unit2);buttonList.add(findViewById(R.id.btn_0));buttonList.add(findViewById(R.id.btn_1));buttonList.add(findViewById(R.id.btn_2));buttonList.add(findViewById(R.id.btn_3));buttonList.add(findViewById(R.id.btn_4));buttonList.add(findViewById(R.id.btn_5));buttonList.add(findViewById(R.id.btn_6));buttonList.add(findViewById(R.id.btn_7));buttonList.add(findViewById(R.id.btn_8));buttonList.add(findViewById(R.id.btn_9));buttonList.add(findViewById(R.id.btn_pt));buttonList.add(findViewById(R.id.btn_clr));iv_del = findViewById(R.id.iv_del);// 給按鈕設(shè)置的點(diǎn)擊事件for (Button button : buttonList) {button.setOnClickListener(this);}iv_del.setOnClickListener(this);// 聲明一個(gè)映射對(duì)象的列表,用于保存名稱與單位配對(duì)信息List<Map<String, Object>> list = new ArrayList<>();// name是名稱,unit是單位for (int i = 0; i < nameArray.length; i++) {Map<String, Object> item = new HashMap<>();item.put("name", nameArray[i]);item.put("unit", unitArray[i]);list.add(item);}// 聲明一個(gè)下拉列表的簡(jiǎn)易適配器,其中指定了名稱與單位兩組數(shù)據(jù)SimpleAdapter adapter = new SimpleAdapter(this, list,R.layout.item_value_conversion,new String[]{"name", "unit"},new int[]{R.id.tv_name, R.id.tv_unit});sp_select1.setAdapter(adapter);sp_select2.setAdapter(adapter);// 設(shè)置下拉列表默認(rèn)顯示sp_select1.setSelection(0);sp_select2.setSelection(1);// 給下拉框設(shè)置選擇監(jiān)聽(tīng)器,一旦用戶選中某一項(xiàng),就觸發(fā)監(jiān)聽(tīng)器的 onItemSelected 方法sp_select1.setOnItemSelectedListener(this);sp_select2.setOnItemSelectedListener(this);}@Overridepublic void onClick(View v) {if (v.getId() != R.id.iv_back && v.getId() != R.id.iv_del && v.getId() != R.id.btn_clr && value1.length() >= 20)return;String inputText = "";// 如果不是刪除按鈕和返回按鈕if (v.getId() != R.id.iv_del && v.getId() != R.id.iv_back) {inputText = ((TextView) v).getText().toString();}switch (v.getId()) {// 點(diǎn)擊了返回按鈕case R.id.iv_back:finish();break;// 點(diǎn)擊了清除按鈕case R.id.btn_clr:clear();break;// 點(diǎn)擊了刪除按鈕case R.id.iv_del:delete();break;// 點(diǎn)擊了小數(shù)點(diǎn)按鈕case R.id.btn_pt:if (value1.indexOf(".") == -1)value1 = value1 + ".";refreshText();break;// 點(diǎn)擊了數(shù)字按鈕default:if (value1.equals("0")) {value1 = inputText;} else {value1 = value1 + inputText;}operation();refreshText();break;}}// 清空并初始化private void clear() {value1 = value2 = "0";refreshText();}// 刷新文本顯示private void refreshText() {tv_value1.setText(value1);tv_value2.setText(value2);}// 回退private void delete() {if (value1.length() != 0) {value1 = value1.substring(0, value1.length() - 1);if (value1.length() == 0)value1 = "0";operation();refreshText();}}// 運(yùn)算private void operation() {// 將value1轉(zhuǎn)換為臨時(shí)數(shù)值tempValue(米)BigDecimal d1 = new BigDecimal(value1);switch (unit1) {case "千米":tempValue = d1.multiply(new BigDecimal(1000));break;case "米":tempValue = d1;break;case "分米":tempValue = d1.divide(new BigDecimal(10), 20, BigDecimal.ROUND_HALF_UP);break;case "厘米":tempValue = d1.divide(new BigDecimal(100), 20, BigDecimal.ROUND_HALF_UP);break;case "毫米":tempValue = d1.divide(new BigDecimal(1000), 20, BigDecimal.ROUND_HALF_UP);break;case "微米":tempValue = d1.divide(new BigDecimal("1.0E6"), 20, BigDecimal.ROUND_HALF_UP);break;case "納米":tempValue = d1.divide(new BigDecimal("1.0E9"), 20, BigDecimal.ROUND_HALF_UP);break;case "皮米":tempValue = d1.divide(new BigDecimal("1.0E12"), 20, BigDecimal.ROUND_HALF_UP);break;case "海里":tempValue = d1.multiply(new BigDecimal(1852));break;case "英里":tempValue = d1.multiply(new BigDecimal(1609.344));break;case "弗隆":tempValue = d1.multiply(new BigDecimal(201.168));break;case "英尋":tempValue = d1.multiply(new BigDecimal(1.8288));break;case "碼":tempValue = d1.multiply(new BigDecimal(0.9144));break;case "英尺":tempValue = d1.multiply(new BigDecimal(0.3048));break;case "英寸":tempValue = d1.multiply(new BigDecimal(0.0254));break;case "公里":tempValue = d1.multiply(new BigDecimal(1000));break;case "里":tempValue = d1.multiply(new BigDecimal(500));break;case "丈":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(0.3), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "尺":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(3), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "寸":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(30), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "分":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(300), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "厘":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(3000), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "毫":tempValue = d1.multiply(new BigDecimal(new BigDecimal(1).divide(new BigDecimal(30000), 50, BigDecimal.ROUND_DOWN).doubleValue()));break;case "秒差距":tempValue = d1.multiply(new BigDecimal(30856775814913672.79));break;case "月球距離":tempValue = d1.multiply(new BigDecimal(384401000));break;case "天文單位":tempValue = d1.multiply(new BigDecimal(149597870700.0));break;case "光年":tempValue = d1.multiply(new BigDecimal("9.460730472580800E15"));break;}// 將臨時(shí)數(shù)值tempValue(米)轉(zhuǎn)換為value2BigDecimal d2 = new BigDecimal(0);switch (unit2) {case "千米":d2 = tempValue.divide(new BigDecimal(1000), 20, BigDecimal.ROUND_HALF_UP);break;case "米":d2 = tempValue;break;case "分米":d2 = tempValue.multiply(new BigDecimal(10));break;case "厘米":d2 = tempValue.multiply(new BigDecimal(100));break;case "毫米":d2 = tempValue.multiply(new BigDecimal(1000));break;case "微米":d2 = tempValue.multiply(new BigDecimal("1.0E6"));break;case "納米":d2 = tempValue.multiply(new BigDecimal("1.0E9"));break;case "皮米":d2 = tempValue.multiply(new BigDecimal("1.0E12"));break;case "海里":d2 = tempValue.divide(new BigDecimal(1852), 20, BigDecimal.ROUND_HALF_UP);break;case "英里":d2 = tempValue.divide(new BigDecimal(1609.344), 20, BigDecimal.ROUND_HALF_UP);break;case "弗隆":d2 = tempValue.divide(new BigDecimal(201.168), 20, BigDecimal.ROUND_HALF_UP);break;case "英尋":d2 = tempValue.divide(new BigDecimal(1.8288), 20, BigDecimal.ROUND_HALF_UP);break;case "碼":d2 = tempValue.divide(new BigDecimal(0.9144), 20, BigDecimal.ROUND_HALF_UP);break;case "英尺":d2 = tempValue.divide(new BigDecimal(0.3048), 20, BigDecimal.ROUND_HALF_UP);break;case "英寸":d2 = tempValue.divide(new BigDecimal(0.0254), 20, BigDecimal.ROUND_HALF_UP);break;case "公里":d2 = tempValue.divide(new BigDecimal(1000), 20, BigDecimal.ROUND_HALF_UP);break;case "里":d2 = tempValue.divide(new BigDecimal(500), 20, BigDecimal.ROUND_HALF_UP);break;case "丈":d2 = tempValue.multiply(new BigDecimal(0.3));break;case "尺":d2 = tempValue.multiply(new BigDecimal(3));break;case "寸":d2 = tempValue.multiply(new BigDecimal(30));break;case "分":d2 = tempValue.multiply(new BigDecimal(300));break;case "厘":d2 = tempValue.multiply(new BigDecimal(3000));break;case "毫":d2 = tempValue.multiply(new BigDecimal(30000));break;case "秒差距":d2 = tempValue.divide(new BigDecimal(30856775814913672.79), 20, BigDecimal.ROUND_HALF_UP);break;case "月球距離":d2 = tempValue.divide(new BigDecimal(384401000), 20, BigDecimal.ROUND_HALF_UP);break;case "天文單位":d2 = tempValue.divide(new BigDecimal(149597870700.0), 20, BigDecimal.ROUND_HALF_UP);break;case "光年":d2 = tempValue.divide(new BigDecimal("9.460730472580800E15"), 20, BigDecimal.ROUND_HALF_UP);break;}String str = String.valueOf(d2.doubleValue());String str1 = str.substring(str.length() - 2);if (str1.equals(".0"))str = str.substring(0, str.length() - 2);value2 = str;}// 選中某一項(xiàng)之后觸發(fā)的回調(diào)方法@SuppressLint("ResourceAsColor")@Overridepublic void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {TextView tv_unit = adapterView.findViewById(R.id.tv_unit);tv_unit.setVisibility(GridView.GONE);if (adapterView.getId() == R.id.sp_select1) {tv_unit1.setText(unitArray[i]);unit1 = nameArray[i];operation();refreshText();} else {tv_unit2.setText(unitArray[i]);unit2 = nameArray[i];operation();refreshText();}}// 什么也沒(méi)選執(zhí)行的回調(diào)方法@Overridepublic void onNothingSelected(AdapterView<?> adapterView) {} }總結(jié)
以上就是長(zhǎng)度轉(zhuǎn)換工具的開(kāi)發(fā)與實(shí)現(xiàn)的內(nèi)容。
總結(jié)
以上是生活随笔為你收集整理的Android开发实用小工具二——长度转换工具的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。