Android?Studio實(shí)現(xiàn)簡易計(jì)算器設(shè)計(jì)
本文實(shí)例為大家分享了Android Studio實(shí)現(xiàn)簡易計(jì)算器的具體代碼,供大家參考,具體內(nèi)容如下
一、題目
1、如圖所示(實(shí)際設(shè)計(jì),類似此界面樣式即可,全屏?xí)r,按鈕將會(huì)縱向拉伸),利用網(wǎng)格布局管理器設(shè)計(jì)一個(gè)居中、滿屏計(jì)算器,項(xiàng)目名稱:clc666b;(666,改成自己的實(shí)際編號(hào))
2、加、乘分別用2個(gè)單選按鈕進(jìn)行選擇;
3、為clc666b編寫程序(clc666a不需要編程,只設(shè)計(jì)界面即可),根據(jù)選擇的加(乘)單選按鈕,實(shí)現(xiàn)兩個(gè)數(shù)的加法和乘法的簡單計(jì)算。
4、為了簡化程序設(shè)計(jì),上方的數(shù)據(jù)區(qū)也可以設(shè)計(jì)成3個(gè)文本框(如果一個(gè)文本框?qū)崿F(xiàn)功能,則更好),分別用作被(乘)加數(shù)、加(乘)數(shù)、合(積);

二、分析
1.首要的目標(biāo)是先做一個(gè)窗口,窗口設(shè)計(jì)需要滿屏平分,所以要修改每一個(gè)部件的權(quán)重。
2.java程序設(shè)計(jì),要監(jiān)聽不同種類的按鍵,網(wǎng)上基本上都是普通按鍵的程序,沒有radiobutton的,這個(gè)題目對(duì)于我這種新手來說有點(diǎn)不太友好,不能直接抄網(wǎng)上的,還要根據(jù)老師上課講的改一改。
(1)當(dāng)按下數(shù)字按鍵時(shí),把按鍵所對(duì)應(yīng)的數(shù)字存到一個(gè)字符串中,然后更新text。
(2)如果按下刪除的時(shí)候把字符串最后一個(gè)字符刪去即可,然后更新text.。
(3)當(dāng)按下運(yùn)算符號(hào)鍵時(shí),把前面的字符存在一個(gè)字符串a(chǎn)中,并保存運(yùn)算符號(hào)鍵的id地址。
(4)繼續(xù)進(jìn)行前兩步的操作,直到按下等于號(hào)鍵運(yùn)行(5)。
(5)把運(yùn)算符號(hào)后的給字符串b,根據(jù)id來對(duì)a和b進(jìn)行運(yùn)算,更新text。
三、代碼
1.更新后的xml代碼
<?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" ? ? xmlns:app="http://schemas.android.com/apk/res-auto" ? ? xmlns:tools="http://schemas.android.com/tools" ? ? android:layout_width="match_parent" ? ? android:layout_height="match_parent" ? ? android:layout_row="6" ? ? android:layout_column="3" ? ? android:background="#FF0097A7" ? ? tools:context=".MainActivity"> ? ? ? <TextView ? ? ? ? android:id="@+id/textview1" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="2" ? ? ? ? android:layout_columnSpan="3" ? ? ? ? android:layout_columnWeight="3" ? ? ? ? android:background="#F1D5A2" ? ? ? ? android:text=" " ? ? ? ? android:textSize="30sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/nm1" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="3" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="1" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/nm2" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="2" ? ? ? ? android:textSize="36sp" /> ? ? ? <RadioGroup ? ? ? ? android:id="@+id/radioGroup2" ? ? ? ? android:layout_width="wrap_content" ? ? ? ? android:layout_height="wrap_content" ? ? ? ? android:layout_rowSpan="2" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:layout_gravity="center"> ? ? ? ? ? <RadioButton ? ? ? ? ? ? android:id="@+id/mul" ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? android:layout_height="wrap_content" ? ? ? ? ? ? android:layout_rowWeight="1" ? ? ? ? ? ? android:layout_columnWeight="1" ? ? ? ? ? ? android:checked="false" ? ? ? ? ? ? android:text="×" ? ? ? ? ? ? android:textSize="36sp" /> ? ? ? ? ? <RadioButton ? ? ? ? ? ? android:id="@+id/add" ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? android:layout_height="wrap_content" ? ? ? ? ? ? android:layout_rowWeight="1" ? ? ? ? ? ? android:layout_columnWeight="1" ? ? ? ? ? ? android:checked="false" ? ? ? ? ? ? android:text="+" ? ? ? ? ? ? android:textSize="36sp" /> ? ? ? </RadioGroup> ? ? ? <Button ? ? ? ? android:id="@+id/nm3" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="4" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="3" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/del" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="DEL" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/equ" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="5" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="2" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="=" ? ? ? ? android:textSize="36sp" /> ? </GridLayout>
2.更新后的java代碼
package com.example.lenovo.clc231b;
?
import androidx.appcompat.app.AppCompatActivity;
?
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.view.View.OnClickListener;
import android.widget.TextView;
?
public class MainActivity extends AppCompatActivity {
?
? ? private String num = "";
? ? private String num_zong = "";
? ? private int fore,back,lenth,id;
? ? TextView textview1;
? ? Button nm1;
? ? Button nm2;
? ? Button nm3;
? ? Button del;
? ? Button equ;
? ? Button mul;
? ? Button add;
?
? ? @Override
? ? public void onCreate(Bundle savedInstanceState) {
? ? ? ? super.onCreate(savedInstanceState);
? ? ? ? setContentView(R.layout.activity_main);
?
? ? ? ? textview1=(TextView)findViewById(R.id.textview1);
?
? ? ? ? nm1 = (Button)findViewById(R.id.nm1);
? ? ? ? nm2 = (Button)findViewById(R.id.nm2);
? ? ? ? nm3 = (Button)findViewById(R.id.nm3);
? ? ? ? del = (Button)findViewById(R.id.del);
? ? ? ? equ = (Button)findViewById(R.id.equ);
? ? ? ? mul = (Button)findViewById(R.id.mul);
? ? ? ? add = (Button)findViewById(R.id.add);
?
? ? ? ? nm1.setOnClickListener(listener);
? ? ? ? nm2.setOnClickListener(listener);
? ? ? ? nm3.setOnClickListener(listener);
? ? ? ? del.setOnClickListener(listener);
? ? ? ? equ.setOnClickListener(listener);
? ? ? ? mul.setOnClickListener(listener);
? ? ? ? add.setOnClickListener(listener);
?
? ? }
? ? //監(jiān)聽按鈕
? ? public OnClickListener listener = new OnClickListener() {
? ? ? ? @Override
? ? ? ? public void onClick(View view) {
? ? ? ? ? ? switch (view.getId()){
? ? ? ? ? ? ? ? case R.id.nm1:
? ? ? ? ? ? ? ? ? ? number(1);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.nm2:
? ? ? ? ? ? ? ? ? ? number(2);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.nm3:
? ? ? ? ? ? ? ? ? ? number(3);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.del:
? ? ? ? ? ? ? ? ? ? delete();
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.equ:
? ? ? ? ? ? ? ? ? ? result();
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.mul:
? ? ? ? ? ? ? ? ? ? Get_mul_add(1);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.add:
? ? ? ? ? ? ? ? ? ? Get_mul_add(2);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? default:
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
? ? ? ? ? ? textview1.setText(num);
? ? ? ? }
? ? };
?
? ? private void Get_mul_add(int flag){
? ? ? ? fore = Integer.valueOf(num);
? ? ? ? if(flag == 1) {
? ? ? ? ? ? id = R.id.mul;
? ? ? ? ? ? num += "×";
? ? ? ? }
? ? ? ? else {
? ? ? ? ? ? id = R.id.add;
? ? ? ? ? ? num += "+";
? ? ? ? }
? ? ? ? textview1.setText(num);
? ? ? ? lenth = num.length();
? ? }
?
? ? private void result() {
? ? ? ? num_zong = num;
? ? ? ? num = num.substring(lenth);
? ? ? ? back = Integer.valueOf(num);
? ? ? ? if(id == R.id.mul)
? ? ? ? ? ? num = String.valueOf((fore*back));
? ? ? ? else
? ? ? ? ? ? num = String.valueOf((fore+back));
? ? ? ? num = num_zong + "=" + num;
? ? }
?
? ? private void delete() {
? ? ? ? num = num.substring(0,num.length()-1);
? ? }
?
? ? private void number(int i) {
? ? ? ? num += i;
? ? }
}3.原來的代碼
<?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" ? ? xmlns:app="http://schemas.android.com/apk/res-auto" ? ? xmlns:tools="http://schemas.android.com/tools" ? ? android:layout_width="match_parent" ? ? android:layout_height="match_parent" ? ? android:layout_row="6" ? ? android:layout_column="3" ? ? android:background="#FF0097A7" ? ? tools:context=".MainActivity"> ? ? ? <TextView ? ? ? ? android:id="@+id/textview1" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="3" ? ? ? ? android:layout_columnSpan="3" ? ? ? ? android:layout_columnWeight="3" ? ? ? ? android:background="#F1D5A2" ? ? ? ? android:text=" " ? ? ? ? android:textSize="30sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/button1" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="3" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="1" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/button2" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="2" ? ? ? ? android:textSize="36sp" /> ? ? ? <RadioGroup ? ? ? ? android:id="@+id/radioGroup2" ? ? ? ? android:layout_width="wrap_content" ? ? ? ? android:layout_height="wrap_content" ? ? ? ? android:layout_rowSpan="2" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:layout_gravity="center"> ? ? ? ? ? <RadioButton ? ? ? ? ? ? android:id="@+id/r1" ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? android:layout_height="wrap_content" ? ? ? ? ? ? android:layout_rowWeight="1" ? ? ? ? ? ? android:layout_columnWeight="1" ? ? ? ? ? ? android:checked="false" ? ? ? ? ? ? android:text="×" ? ? ? ? ? ? android:textSize="36sp" /> ? ? ? ? ? <RadioButton ? ? ? ? ? ? android:id="@+id/r2" ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? android:layout_height="wrap_content" ? ? ? ? ? ? android:layout_rowWeight="1" ? ? ? ? ? ? android:layout_columnWeight="1" ? ? ? ? ? ? android:checked="false" ? ? ? ? ? ? android:text="+" ? ? ? ? ? ? android:textSize="36sp" /> ? ? </RadioGroup> ? ? ? <Button ? ? ? ? android:id="@+id/button3" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="4" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="3" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/button4" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_columnSpan="1" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="DEL" ? ? ? ? android:textSize="36sp" /> ? ? ? <Button ? ? ? ? android:id="@+id/button5" ? ? ? ? android:layout_width="0dp" ? ? ? ? android:layout_height="0dp" ? ? ? ? android:layout_row="5" ? ? ? ? android:layout_rowSpan="1" ? ? ? ? android:layout_rowWeight="1" ? ? ? ? android:layout_column="0" ? ? ? ? android:layout_columnSpan="2" ? ? ? ? android:layout_columnWeight="1" ? ? ? ? android:text="=" ? ? ? ? android:textSize="36sp" /> ? </GridLayout>
package com.example.lenovo.clc231b;
?
import androidx.appcompat.app.AppCompatActivity;
?
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.view.View.OnClickListener;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
?
public class MainActivity extends AppCompatActivity {
?
? ? private String num = "";
? ? private String num_zong = "";
? ? private int fore,back,lenth,id;
? ? TextView textview1;
? ? RadioGroup question2;
? ? Button button1;
? ? Button button2;
? ? Button button3;
? ? Button button4;
? ? Button button5;
?
? ? @Override
? ? public void onCreate(Bundle savedInstanceState) {
? ? ? ? super.onCreate(savedInstanceState);
? ? ? ? setContentView(R.layout.activity_main);
?
? ? ? ? textview1=(TextView)findViewById(R.id.textview1);
?
? ? ? ? button1 = (Button)findViewById(R.id.button1);
? ? ? ? button2 = (Button)findViewById(R.id.button2);
? ? ? ? button3 = (Button)findViewById(R.id.button3);
? ? ? ? button4 = (Button)findViewById(R.id.button4);
? ? ? ? button5 = (Button)findViewById(R.id.button5);
? ? ? ? question2 = (RadioGroup) findViewById(R.id.radioGroup2);
?
? ? ? ? button1.setOnClickListener(listener);
? ? ? ? button2.setOnClickListener(listener);
? ? ? ? button3.setOnClickListener(listener);
? ? ? ? button4.setOnClickListener(listener);
? ? ? ? button5.setOnClickListener(listener);
? ? ? ? question2.setOnClickListener(listener);
?
? ? }
?
? ? public OnClickListener listener = new OnClickListener() {
? ? ? ? @Override
? ? ? ? public void onClick(View view) {
? ? ? ? ? ? switch (view.getId()){
? ? ? ? ? ? ? ? case R.id.button1:
? ? ? ? ? ? ? ? ? ? number(1);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.button2:
? ? ? ? ? ? ? ? ? ? number(2);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.button3:
? ? ? ? ? ? ? ? ? ? number(3);
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.button4:
? ? ? ? ? ? ? ? ? ? delete();
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? case R.id.button5:
? ? ? ? ? ? ? ? ? ? result();
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? ? ? default:
? ? ? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
?
? ? ? ? ? ? question2.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
? ? ? ? ? ? ? ? @Override
? ? ? ? ? ? ? ? public void onCheckedChanged(RadioGroup group, int checkedId) {
? ? ? ? ? ? ? ? ? ? //獲取被選擇的單選按鈕
? ? ? ? ? ? ? ? ? ? RadioButton r = (RadioButton) findViewById(checkedId);
? ? ? ? ? ? ? ? ? ? //Toast.makeText(MainActivity.this,"你的愛好是:" + r.getText(), Toast.LENGTH_SHORT).show();
? ? ? ? ? ? ? ? ? ? id = r.getId();
? ? ? ? ? ? ? ? ? ? textview1.setText(num + r.getText());
? ? ? ? ? ? ? ? ? ? fore = Integer.valueOf(num);
? ? ? ? ? ? ? ? ? ? num = num+ r.getText();
? ? ? ? ? ? ? ? ? ? lenth = num.length();
? ? ? ? ? ? ? ? }
? ? ? ? ? ? });
? ? ? ? ? ? textview1.setText(num);
? ? ? ? }
? ? };
//乘號(hào)id是2131165311 ?加號(hào)id是2131165312
? ? private void result()
? ? {
? ? ? ? num_zong = num;
? ? ? ? num = num.substring(lenth);
? ? ? ? back = Integer.valueOf(num);
? ? ? ? if(id == 2131165311)
? ? ? ? ? ? num = String.valueOf((fore*back));
? ? ? ? else
? ? ? ? ? ? num = String.valueOf((fore+back));
? ? ? ? num = num_zong + "=" + num;
? ? }
?
? ? private void delete(){
? ? ? ? num = num.substring(0,num.length()-1);
? ? }
?
? ? private void number(int i){
? ? ? ? num = num + i;
? ? }
}四、總結(jié)
運(yùn)行必須按照流程來,不然app會(huì)崩潰,不想改了,累了,對(duì)我這樣的新手不太友好。
五、參考文章
(更新后,更改了一些參數(shù)定義名稱,更加直觀,更改了一些函數(shù)內(nèi)容,減少冗余度)
以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- Android?Studio實(shí)現(xiàn)帶三角函數(shù)對(duì)數(shù)運(yùn)算功能的高級(jí)計(jì)算器
- Android Studio實(shí)現(xiàn)簡易進(jìn)制轉(zhuǎn)換計(jì)算器
- android?studio實(shí)現(xiàn)簡單的計(jì)算器小功能
- Android studio實(shí)現(xiàn)簡易計(jì)算器App功能
- 用Android?studio實(shí)現(xiàn)簡易計(jì)算器功能
- android?studio?項(xiàng)目?:UI設(shè)計(jì)高精度實(shí)現(xiàn)簡單計(jì)算器
- Android studio實(shí)現(xiàn)簡單的計(jì)算器
- Android Studio實(shí)現(xiàn)簡單計(jì)算器功能
- Android Studio實(shí)現(xiàn)簡易計(jì)算器(表格布局TableLayout)
- Android?Studio實(shí)現(xiàn)簡易計(jì)算器App?(Java語言版)
相關(guān)文章
自定義一個(gè)theme在不同的sdk環(huán)境下繼承不同的值
可能很多在高版本下編繹apk的同學(xué),可能都曾有和我一樣的困惑,就是如何讓低版本的用戶也能有高版本的體驗(yàn)?zāi)?/div> 2013-01-01
Android EditText限制輸入整數(shù)和小數(shù)的位數(shù)的方法示例
這篇文章主要介紹了Android EditText限制輸入整數(shù)和小數(shù)的位數(shù)的方法示例,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-08-08
Android利用滑動(dòng)菜單框架實(shí)現(xiàn)滑動(dòng)菜單效果
這篇文章主要介紹了Android實(shí)現(xiàn)滑動(dòng)菜單特效之滑動(dòng)菜單框架完全解析,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-05-05
Android實(shí)現(xiàn)圖片自動(dòng)輪播并且支持手勢左右無限滑動(dòng)
這篇文章給大家介紹android實(shí)現(xiàn)圖片自動(dòng)輪播并且支持手勢左右無限滑動(dòng),代碼簡單易懂,非常不錯(cuò),具有參考借鑒價(jià)值,感興趣的朋友一起看看吧2016-10-10
Android SharedPreferences實(shí)現(xiàn)記住密碼和自動(dòng)登錄界面
本篇文章主要介紹了Android記住密碼和自動(dòng)登錄界面的實(shí)現(xiàn)(SharedPreferences),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2017-02-02
Android仿微信朋友圈點(diǎn)贊和評(píng)論功能
這篇文章主要為大家詳細(xì)介紹了Android仿微信朋友圈點(diǎn)贊和評(píng)論功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-06-06
Android冷啟動(dòng)優(yōu)化的3個(gè)小案例分享
為了提高App的冷啟動(dòng)耗時(shí),除了在常規(guī)的業(yè)務(wù)側(cè)進(jìn)行耗時(shí)代碼優(yōu)化之外,為了進(jìn)一步縮短啟動(dòng)耗時(shí),需要在純技術(shù)測做一些優(yōu)化探索,本期我們從類預(yù)加載、Retrofit 、ARouter方面進(jìn)行了進(jìn)一步的優(yōu)化,感興趣的同學(xué)跟著小編一起來看看吧2023-07-07最新評(píng)論

