最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android實現(xiàn)房貸計算器

 更新時間:2022年05月20日 17:04:25   作者:愛睡覺的小馨  
這篇文章主要為大家詳細介紹了Android實現(xiàn)房貸計算器,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了Android實現(xiàn)房貸計算器的具體代碼,供大家參考,具體內容如下

fangdai(activity)

package com.example.myapplication_one;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

public class fangdai extends AppCompatActivity {
? ? //聲明用到的所有控件
? ? Spinner spinner1;
? ? Spinner spinner2;
? ? EditText row1edit;
? ? EditText row2edit;
? ? Button total;
? ? RadioGroup radioGroup;
? ? CheckBox checkBox1;
? ? CheckBox checkBox2;
? ? EditText row4edit;
? ? EditText row5edit;
? ? Button detail;
? ? TextView totalcal;
? ? TextView alldetail;
? ? private void initSpinner(){
? ? ? ? //初始化控件
? ? ? ? spinner1= (Spinner) findViewById(R.id.sp1);
? ? ? ? spinner2= (Spinner) findViewById(R.id.sp2);
? ? ? ? //建立數(shù)據(jù)源
? ? ? ? String[] years=getResources().getStringArray(R.array.years);
? ? ? ? String[] baserates=getResources().getStringArray(R.array.baserate);
? ? ? ? //聲明一個下拉列表的數(shù)組適配器并綁定數(shù)據(jù)源
? ? ? ? ArrayAdapter<String> yearAdapter=new ArrayAdapter<String>(this,R.layout.support_simple_spinner_dropdown_item,years);
? ? ? ? ArrayAdapter<String> baserateAdapter=new ArrayAdapter<String>(this,R.layout.support_simple_spinner_dropdown_item,baserates);
? ? ? ? //綁定Adapter到控件
? ? ? ? spinner1.setAdapter(yearAdapter);
? ? ? ? spinner2.setAdapter(baserateAdapter);
? ? ? ? //設置默認選擇第一項
? ? ? ? spinner1.setSelection(0);
? ? ? ? spinner2.setSelection(0);
? ? ? ? //設置標題
? ? ? ? spinner1.setPrompt("請選擇貸款年限");
? ? ? ? spinner2.setPrompt("請選擇基準利率");
? ? }

? ? //聲明下列函數(shù)中要用到的變量
? ? double intotal,backtotal,extra,pertime;//貸款總額,還款總額,利息,每月還款總額
? ? int month;//月份
? ? String buytotal;//購房總額
? ? String percent;//貸款百分比
? ? @Override
? ? protected void onCreate(Bundle savedInstanceState) {
? ? ? ? super.onCreate(savedInstanceState);
? ? ? ? setContentView(R.layout.fangdai);
? ? ? ? //初始化控件
? ? ? ? initSpinner();
? ? ? ? row1edit= (EditText) findViewById(R.id.row1edit);
? ? ? ? row2edit= (EditText) findViewById(R.id.row2edit);
? ? ? ? total= (Button) findViewById(R.id.totalcal);
? ? ? ? radioGroup= (RadioGroup) findViewById(R.id.radiogroup);
? ? ? ? checkBox1= (CheckBox) findViewById(R.id.check1);
? ? ? ? checkBox2= (CheckBox) findViewById(R.id.check2);
? ? ? ? totalcal= (TextView) findViewById(R.id.showtotal);
? ? ? ? detail= (Button) findViewById(R.id.detail);
? ? ? ? alldetail= (TextView) findViewById(R.id.alldetail);
? ? ? ? row4edit= (EditText) findViewById(R.id.row4label);
? ? ? ? row5edit= (EditText) findViewById(R.id.row5label);

? ? ? ? //給第一個計算按鈕添加點擊監(jiān)聽
? ? ? ? total.setOnClickListener(new View.OnClickListener() {
? ? ? ? ? ? @Override
? ? ? ? ? ? public void onClick(View view) {
? ? ? ? ? ? ? ? buytotal=row1edit.getText().toString();
? ? ? ? ? ? ? ? percent=row2edit.getText().toString();
? ? ? ? ? ? ? ? if(TextUtils.isEmpty(buytotal)||TextUtils.isEmpty(percent))//判斷前兩個輸入框是否非空
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"購房總價和按揭部分信息填寫完整",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? }else if(fangdaitext.isNum(buytotal)==false||fangdaitext.isNum(percent)==false){//判斷輸入的是否是數(shù)字
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"包含不合法的輸入信息",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? } else if(Double.parseDouble(percent)>100){//判斷百分比部分輸入是否大于100%
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"按揭部分不能超過100%",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? } else if(fangdaitext.isNum(buytotal)&&fangdaitext.isNum(percent))
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? intotal=(Double.parseDouble(buytotal)*Double.parseDouble(percent)*0.01);
? ? ? ? ? ? ? ? ? ? totalcal.setText("您的貸款總額為"+String.format("%.2f",intotal)+"萬元");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? });

? ? ? ? detail.setOnClickListener(new View.OnClickListener() {
? ? ? ? ? ? @Override
? ? ? ? ? ? public void onClick(View view) {
? ? ? ? ? ? ? ? //first,second為商貸和公積金貸所填數(shù)值
? ? ? ? ? ? ? ? String first=row4edit.getText().toString();
? ? ? ? ? ? ? ? String second=row5edit.getText().toString();
? ? ? ? ? ? ? ? //firstrate和secondrate為商貸和公積金的年利率
? ? ? ? ? ? ? ? double firstrate=Double.parseDouble(spinner2.getSelectedItem().toString().substring(20,24))*0.01;
? ? ? ? ? ? ? ? double secondrate=Double.parseDouble(spinner2.getSelectedItem().toString().substring(31,35))*0.01;
? ? ? ? ? ? ? ? //獲取下拉列表的年份求得月份
? ? ? ? ? ? ? ? String year=spinner1.getSelectedItem().toString();
? ? ? ? ? ? ? ? month=Integer.parseInt(year.substring(0,year.length()-1))*12;
? ? ? ? ? ? ? ? //兩種貸款的月利率
? ? ? ? ? ? ? ? double firstmonthrate=firstrate/12;
? ? ? ? ? ? ? ? double secondmonthrate=secondrate/12;
? ? ? ? ? ? ? ? if(totalcal.getText().toString().equals("其中貸款部分為:***萬")){//判斷是否計算過貸款總額
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"請先計算貸款總額",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? }else if(row1edit.getText().toString().equals(buytotal)==false||row2edit.getText().toString().equals(percent)==false){//監(jiān)聽貸款總額和按揭部分數(shù)值是否發(fā)生變化
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"檢查到您的購房總價或按揭部分數(shù)據(jù)更改,請重新計算貸款總額",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? } else if(checkBox1.isChecked()==false&&checkBox2.isChecked()==false)//監(jiān)聽勾選的多選框
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"請勾選貸款種類",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? }else if(checkBox1.isChecked()&&checkBox2.isChecked()==false){
? ? ? ? ? ? ? ? ? ? //等額本息貸款算法
? ? ? ? ? ? ? ? ? ? if(radioGroup.getCheckedRadioButtonId()==R.id.btn1){
? ? ? ? ? ? ? ? ? ? ? ? pertime=intotal*firstmonthrate*Math.pow((1+firstmonthrate),month)/(Math.pow(1+firstmonthrate,month)-1);
? ? ? ? ? ? ? ? ? ? ? ? backtotal=pertime*month;
? ? ? ? ? ? ? ? ? ? ? ? extra=backtotal-intotal;
? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為"+String.format("%.2f",intotal)+"萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額為"+String.format("%.2f",pertime*10000)+"元");
? ? ? ? ? ? ? ? ? ? }else{//等額本金貸款算法
? ? ? ? ? ? ? ? ? ? ? ? double[] array=new double[month];
? ? ? ? ? ? ? ? ? ? ? ? double sum=0;
? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? array[i]=intotal/month+(intotal-sum)*firstmonthrate;
? ? ? ? ? ? ? ? ? ? ? ? ? ? sum+=array[i];
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? String text="";
? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++){
? ? ? ? ? ? ? ? ? ? ? ? ? ? text+="\n第"+(i+1)+"個月應還金額為:"+String.format("%.2f",array[i]*10000);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? backtotal=sum;
? ? ? ? ? ? ? ? ? ? ? ? extra=backtotal-intotal;
? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為"+String.format("%.2f",intotal)+"萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額如下:"+text);
? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? }else if(checkBox1.isChecked()==false&&checkBox2.isChecked()){
? ? ? ? ? ? ? ? ? ? if(radioGroup.getCheckedRadioButtonId()==R.id.btn1){
? ? ? ? ? ? ? ? ? ? ? ? pertime=intotal*secondmonthrate*Math.pow((1+secondmonthrate),month)/(Math.pow(1+secondmonthrate,month)-1);
? ? ? ? ? ? ? ? ? ? ? ? backtotal=pertime*month;
? ? ? ? ? ? ? ? ? ? ? ? extra = backtotal - intotal;
? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為" + String.format("%.2f",intotal) + "萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額為"+String.format("%.2f",pertime*10000)+"元");
? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? double[] array=new double[month];
? ? ? ? ? ? ? ? ? ? ? ? double sum=0;
? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++)
? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? array[i]=intotal/month+(intotal-sum)*secondmonthrate;
? ? ? ? ? ? ? ? ? ? ? ? ? ? sum+=array[i];
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? String text="";
? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++){
? ? ? ? ? ? ? ? ? ? ? ? ? ? text+="\n第"+(i+1)+"個月應還金額為:"+String.format("%.2f",array[i]*10000)+"元";
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? backtotal=sum;
? ? ? ? ? ? ? ? ? ? ? ? extra=backtotal-intotal;
? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為"+String.format("%.2f",intotal)+"萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額如下:"+text);
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }else if(checkBox1.isChecked()&&checkBox2.isChecked()){
? ? ? ? ? ? ? ? ? ? if(radioGroup.getCheckedRadioButtonId()==R.id.btn1){
? ? ? ? ? ? ? ? ? ? ? ? if(TextUtils.isEmpty(first)||TextUtils.isEmpty(second)){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"請將空信息填寫完整",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else if(fangdaitext.isNum(first)==false||fangdaitext.isNum(second)==false){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"包含不合法的輸入信息",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else if(Double.parseDouble(first)+Double.parseDouble(second)!=Double.parseDouble(String.format("%.2f",intotal))){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"填寫的兩項貸款總額不等于初始貸款額度,請重新填寫",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? ? ? double p1=Double.parseDouble(first);
? ? ? ? ? ? ? ? ? ? ? ? ? ? double p2=Double.parseDouble(second);
? ? ? ? ? ? ? ? ? ? ? ? ? ? double pertime1=p1*firstmonthrate*Math.pow((1+firstmonthrate),month)/(Math.pow(1+firstmonthrate,month)-1);
? ? ? ? ? ? ? ? ? ? ? ? ? ? double pertime2=p2*secondmonthrate*Math.pow((1+secondmonthrate),month)/(Math.pow(1+secondmonthrate,month)-1);
? ? ? ? ? ? ? ? ? ? ? ? ? ? pertime=pertime1+pertime2;
? ? ? ? ? ? ? ? ? ? ? ? ? ? backtotal=pertime*month;
? ? ? ? ? ? ? ? ? ? ? ? ? ? extra=backtotal-intotal;
? ? ? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為" + String.format("%.2f",intotal) + "萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額為"+String.format("%.2f",pertime*10000)+"元");
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? if(first.equals("請輸入商業(yè)貸款總額(單位萬)")||second.equals("請輸入公積金貸款總額(單位萬)")){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"請將空信息填寫完整",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else if(fangdaitext.isNum(first)==false||fangdaitext.isNum(second)==false){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"包含不合法的輸入信息",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else if(Double.parseDouble(first)+Double.parseDouble(second)!=Double.parseDouble(String.format("%.2f",intotal))){
? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,"填寫的兩項貸款總額不等于初始貸款額度,請重新填寫",Toast.LENGTH_LONG).show();
? ? ? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? ? ? double p1=Double.parseDouble(first);
? ? ? ? ? ? ? ? ? ? ? ? ? ? double p2=Double.parseDouble(second);
? ? ? ? ? ? ? ? ? ? ? ? ? ? double[] array1=new double[month];
? ? ? ? ? ? ? ? ? ? ? ? ? ? double[] array2=new double[month];
? ? ? ? ? ? ? ? ? ? ? ? ? ? double sum1=0,sum2=0;
? ? ? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++)
? ? ? ? ? ? ? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? array1[i]=p1/month+(p1-sum1)*firstmonthrate;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? array2[i]=p2/month+(p2-sum2)*secondmonthrate;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Toast.makeText(fangdai.this,array1[i]+" "+array2[i],Toast.LENGTH_LONG);
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sum1+=array1[i];
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sum2+=array2[i];
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? ? ? String text="";
? ? ? ? ? ? ? ? ? ? ? ? ? ? for(int i=0;i<month;i++){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? text+="\n第"+(i+1)+"個月應還金額為:"+String.format("%.2f",(array1[i]+array2[i])*10000)+"元";
? ? ? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? ? ? ? ? backtotal=sum1+sum2;
? ? ? ? ? ? ? ? ? ? ? ? ? ? extra=backtotal-intotal;
? ? ? ? ? ? ? ? ? ? ? ? ? ? alldetail.setText("您的貸款總額為"+String.format("%.2f",intotal)+"萬元\n還款總額為"+String.format("%.2f",backtotal)+"萬元\n其中利息總額為"+String.format("%.2f",extra)+"萬元\n還款總時間為"+month+"月\n每月還款金額如下:"+text);
? ? ? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? });

? ? ? ? row1edit.addTextChangedListener(new TextWatcher() {
? ? ? ? ? ? int oldlength=0;
? ? ? ? ? ? @Override
? ? ? ? ? ? public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {//強制用戶不能輸入非數(shù)字和小數(shù)點之外的字符
? ? ? ? ? ? ? ? int length = charSequence.length();
? ? ? ? ? ? ? ? if (length > oldlength) {
? ? ? ? ? ? ? ? ? ? char newchar = charSequence.charAt(i);
? ? ? ? ? ? ? ? ? ? if ((newchar < '0' && newchar > '9') && newchar != '.') {
? ? ? ? ? ? ? ? ? ? ? ? if (i != length - 1)
? ? ? ? ? ? ? ? ? ? ? ? ? ? row1edit.setText(charSequence.subSequence(0, i).toString() + charSequence.subSequence(i + 1, length).toString());
? ? ? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? ? ? row1edit.setText(charSequence.subSequence(0, length - 1));
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? oldlength=length;
? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void afterTextChanged(Editable editable) {

? ? ? ? ? ? }
? ? ? ? });

? ? ? ? row2edit.addTextChangedListener(new TextWatcher() {
? ? ? ? ? ? int oldlength=0;
? ? ? ? ? ? @Override
? ? ? ? ? ? public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
? ? ? ? ? ? ? ? int length=charSequence.length();
? ? ? ? ? ? ? ? if(length>oldlength) {
? ? ? ? ? ? ? ? ? ? char newchar = charSequence.charAt(i);
? ? ? ? ? ? ? ? ? ? if ((newchar < '0' && newchar > '9') && newchar != '.') {
? ? ? ? ? ? ? ? ? ? ? ? if (i != length - 1)
? ? ? ? ? ? ? ? ? ? ? ? ? ? row2edit.setText(charSequence.subSequence(0, i).toString() + charSequence.subSequence(i + 1, length).toString());
? ? ? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? ? ? row2edit.setText(charSequence.subSequence(0, length - 1));
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? oldlength=length;
? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void afterTextChanged(Editable editable) {

? ? ? ? ? ? }
? ? ? ? });

? ? ? ? row4edit.addTextChangedListener(new TextWatcher() {
? ? ? ? ? ? int oldlength=0;
? ? ? ? ? ? @Override
? ? ? ? ? ? public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
? ? ? ? ? ? ? ? int length=charSequence.length();
? ? ? ? ? ? ? ? if(length>oldlength) {
? ? ? ? ? ? ? ? ? ? char newchar = charSequence.charAt(i);
? ? ? ? ? ? ? ? ? ? if ((newchar < '0' && newchar > '9') && newchar != '.') {
? ? ? ? ? ? ? ? ? ? ? ? if (i != length - 1)
? ? ? ? ? ? ? ? ? ? ? ? ? ? row4edit.setText(charSequence.subSequence(0, i).toString() + charSequence.subSequence(i + 1, length).toString());
? ? ? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? ? ? row4edit.setText(charSequence.subSequence(0, length - 1));
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? oldlength=length;
? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void afterTextChanged(Editable editable) {

? ? ? ? ? ? }
? ? ? ? });

? ? ? ? row5edit.addTextChangedListener(new TextWatcher() {
? ? ? ? ? ? int oldlength=0;
? ? ? ? ? ? @Override
? ? ? ? ? ? public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
? ? ? ? ? ? ? ? int length=charSequence.length();
? ? ? ? ? ? ? ? if(length>oldlength) {
? ? ? ? ? ? ? ? ? ? char newchar = charSequence.charAt(i);
? ? ? ? ? ? ? ? ? ? if ((newchar < '0' && newchar > '9') && newchar != '.') {
? ? ? ? ? ? ? ? ? ? ? ? if (i != length - 1)
? ? ? ? ? ? ? ? ? ? ? ? ? ? row5edit.setText(charSequence.subSequence(0, i).toString() + charSequence.subSequence(i + 1, length).toString());
? ? ? ? ? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? ? ? ? ? ? ? row5edit.setText(charSequence.subSequence(0, length - 1));
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? oldlength=length;
? ? ? ? ? ? }

? ? ? ? ? ? @Override
? ? ? ? ? ? public void afterTextChanged(Editable editable) {

? ? ? ? ? ? }
? ? ? ? });
? ? }

}

fangdaitext(activity)

package com.example.myapplication_one;
public class fangdaitext {
? ? public static boolean isNum(String string){
? ? ? ? int flag=0;
? ? ? ? if(string.charAt(0)=='0'&&string.charAt(1)!='.')
? ? ? ? ? ? return false;
? ? ? ? if(string.charAt(0)=='.')
? ? ? ? ? ? return false;
? ? ? ? for(int i=0;i<string.length();i++)
? ? ? ? {
? ? ? ? ? ? if((string.charAt(i)<'0'||string.charAt(i)>'9')&&string.charAt(i)!='.')
? ? ? ? ? ? ? ? return false;
? ? ? ? ? ? else if(string.charAt(i)=='.')
? ? ? ? ? ? {
? ? ? ? ? ? ? ? flag++;
? ? ? ? ? ? ? ? if(flag>1)
? ? ? ? ? ? ? ? ? ? return false;
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? return true;
? ? }
}

fangdai.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
? ? android:paddingLeft="@dimen/activity_horizontal_margin"
? ? android:paddingRight="@dimen/activity_horizontal_margin"
? ? android:paddingTop="16dp"
? ? android:focusableInTouchMode="true"
? ? android:focusable="true"
? ? tools:context="com.example.myapplication_one.fangdai">
? ? <ScrollView
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <RelativeLayout
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content">
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout1">
? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:id="@+id/row1label"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="購房總價:"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? />
? ? ? ? ? ? ? ? <EditText
? ? ? ? ? ? ? ? ? ? android:id="@+id/row1edit"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:hint="請輸入購房總價(單位萬)"
? ? ? ? ? ? ? ? ? ? android:singleLine="true"
? ? ? ? ? ? ? ? ? ? android:textSize="16dp"
? ? ? ? ? ? ? ? ? ? android:background="@drawable/edittext_style"
? ? ? ? ? ? ? ? ? ? android:padding="5dp"
? ? ? ? ? ? ? ? ? ? android:gravity="right"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/row1label"
? ? ? ? ? ? ? ? ? ? android:layout_toLeftOf="@+id/row1endlabel"
? ? ? ? ? ? ? ? ? ? android:inputType="numberDecimal"/>

? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="萬"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentEnd="true"
? ? ? ? ? ? ? ? ? ? android:id="@+id/row1endlabel"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentRight="true" />
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout2"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout1"
? ? ? ? ? ? ? ? android:layout_marginTop="20dp">
? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:id="@+id/row2label"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="按揭部分:"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? />
? ? ? ? ? ? ? ? <EditText
? ? ? ? ? ? ? ? ? ? android:id="@+id/row2edit"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:hint="請輸入按揭百分比"
? ? ? ? ? ? ? ? ? ? android:singleLine="true"
? ? ? ? ? ? ? ? ? ? android:textSize="16dp"
? ? ? ? ? ? ? ? ? ? android:background="@drawable/edittext_style"
? ? ? ? ? ? ? ? ? ? android:padding="5dp"
? ? ? ? ? ? ? ? ? ? android:gravity="right"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/row2label"
? ? ? ? ? ? ? ? ? ? android:layout_toLeftOf="@+id/row2endlabel"
? ? ? ? ? ? ? ? ? ? android:inputType="numberDecimal"/>

? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text=" %"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentEnd="true"
? ? ? ? ? ? ? ? ? ? android:id="@+id/row2endlabel"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentRight="true" />
? ? ? ? ? ? </RelativeLayout>

? ? ? ? ? ? <Button
? ? ? ? ? ? ? ? android:id="@+id/totalcal"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout2"
? ? ? ? ? ? ? ? android:layout_marginTop="15dp"
? ? ? ? ? ? ? ? android:background="@drawable/btn_style"
? ? ? ? ? ? ? ? android:text="計算貸款總額" />
? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:text="其中貸款部分為:***萬"
? ? ? ? ? ? ? ? android:layout_below="@+id/totalcal"
? ? ? ? ? ? ? ? android:layout_marginTop="10dp"
? ? ? ? ? ? ? ? android:textSize="16sp"
? ? ? ? ? ? ? ? android:id="@+id/showtotal"/>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout3"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/showtotal"
? ? ? ? ? ? ? ? android:layout_marginTop="10dp">
? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:id="@+id/row3label"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="還款方式:"
? ? ? ? ? ? ? ? ? ? android:textSize="16sp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"/>
? ? ? ? ? ? ? ? <RadioGroup
? ? ? ? ? ? ? ? ? ? android:id="@+id/radiogroup"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/row3label"
? ? ? ? ? ? ? ? ? ? android:orientation="horizontal">
? ? ? ? ? ? ? ? ? ? <RadioButton
? ? ? ? ? ? ? ? ? ? ? ? android:id="@+id/btn1"
? ? ? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? ? ? android:text="等額本息"
? ? ? ? ? ? ? ? ? ? ? ? android:checked="true"/>
? ? ? ? ? ? ? ? ? ? <RadioButton
? ? ? ? ? ? ? ? ? ? ? ? android:id="@+id/btn2"
? ? ? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? ? ? android:text="等額本金"
? ? ? ? ? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"/>
? ? ? ? ? ? ? ? </RadioGroup>
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout4"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout3">
? ? ? ? ? ? ? ? <CheckBox
? ? ? ? ? ? ? ? ? ? android:id="@+id/check1"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="商貸: ? ?"/>
? ? ? ? ? ? ? ? <EditText
? ? ? ? ? ? ? ? ? ? android:id="@+id/row4label"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:hint="請輸入商業(yè)貸款總額(單位萬)"
? ? ? ? ? ? ? ? ? ? android:singleLine="true"
? ? ? ? ? ? ? ? ? ? android:textSize="16dp"
? ? ? ? ? ? ? ? ? ? android:background="@drawable/edittext_style"
? ? ? ? ? ? ? ? ? ? android:padding="5dp"
? ? ? ? ? ? ? ? ? ? android:gravity="right"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/check1"
? ? ? ? ? ? ? ? ? ? android:layout_toLeftOf="@+id/row4endlabel"
? ? ? ? ? ? ? ? ? ? android:inputType="numberDecimal"/>

? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="萬"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentEnd="true"
? ? ? ? ? ? ? ? ? ? android:id="@+id/row4endlabel"/>
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout5"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout4"
? ? ? ? ? ? ? ? android:layout_marginTop="5dp">
? ? ? ? ? ? ? ? <CheckBox
? ? ? ? ? ? ? ? ? ? android:id="@+id/check2"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="公積金:"/>
? ? ? ? ? ? ? ? <EditText
? ? ? ? ? ? ? ? ? ? android:id="@+id/row5label"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:hint="請輸入公積金貸款總額(單位萬)"
? ? ? ? ? ? ? ? ? ? android:singleLine="true"
? ? ? ? ? ? ? ? ? ? android:textSize="16dp"
? ? ? ? ? ? ? ? ? ? android:background="@drawable/edittext_style"
? ? ? ? ? ? ? ? ? ? android:padding="5dp"
? ? ? ? ? ? ? ? ? ? android:gravity="right"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/check2"
? ? ? ? ? ? ? ? ? ? android:layout_toLeftOf="@+id/row5endlabel"
? ? ? ? ? ? ? ? ? ? android:inputType="numberDecimal"/>

? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="萬"
? ? ? ? ? ? ? ? ? ? android:textSize="18sp"
? ? ? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_alignParentEnd="true"
? ? ? ? ? ? ? ? ? ? android:id="@+id/row5endlabel" />
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout6"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@id/relativeLayout5"
? ? ? ? ? ? ? ? android:layout_marginTop="10dp">
? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:id="@+id/row6label"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="貸款年限:"
? ? ? ? ? ? ? ? ? ? android:textSize="16sp"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"/>
? ? ? ? ? ? ? ? <Spinner
? ? ? ? ? ? ? ? ? ? android:id="@+id/sp1"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:spinnerMode="dialog"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/row6label">
? ? ? ? ? ? ? ? </Spinner>
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <RelativeLayout
? ? ? ? ? ? ? ? android:id="@+id/relativeLayout7"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout6"
? ? ? ? ? ? ? ? android:layout_marginTop="10dp">
? ? ? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? ? ? android:id="@+id/row7label"
? ? ? ? ? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:text="基準利率:"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:textSize="16sp"/>
? ? ? ? ? ? ? ? <Spinner
? ? ? ? ? ? ? ? ? ? android:id="@+id/sp2"
? ? ? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? ? ? android:spinnerMode="dialog"
? ? ? ? ? ? ? ? ? ? android:layout_centerVertical="true"
? ? ? ? ? ? ? ? ? ? android:layout_toRightOf="@+id/row7label">
? ? ? ? ? ? ? ? </Spinner>
? ? ? ? ? ? </RelativeLayout>
? ? ? ? ? ? <Button
? ? ? ? ? ? ? ? android:id="@+id/detail"
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:layout_below="@+id/relativeLayout7"
? ? ? ? ? ? ? ? android:layout_marginTop="15dp"
? ? ? ? ? ? ? ? android:background="@drawable/btn_style"
? ? ? ? ? ? ? ? android:text="計算還款明細"/>
? ? ? ? ? ? <TextView
? ? ? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? ? ? android:text="還款總額為:***萬\n其中利息總額為:***萬\n月供(每月還款額)為:***"
? ? ? ? ? ? ? ? android:layout_below="@+id/detail"
? ? ? ? ? ? ? ? android:layout_marginTop="10dp"
? ? ? ? ? ? ? ? android:textSize="16sp"
? ? ? ? ? ? ? ? android:id="@+id/alldetail"/>
? ? ? ? </RelativeLayout>
? ? </ScrollView>
</RelativeLayout>

edittext_style.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
? ? <item android:state_focused="true">
? ? ? ? <shape>
? ? ? ? ? ? <corners android:radius="5dp"/>
? ? ? ? ? ? <stroke android:width="1dp"
? ? ? ? ? ? ? ? android:color="#00DDFF"/>
? ? ? ? </shape>
? ? </item>
? ? <item android:state_focused="false">
? ? ? ? <shape>
? ? ? ? ? ? <corners android:radius="5dp"/>
? ? ? ? ? ? <stroke android:width="1dp"
? ? ? ? ? ? ? ? android:color="#000000"/>
? ? ? ? </shape>
? ? </item>
</selector>

btn_style.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
? ? <item android:state_pressed="true">
? ? ? ? <shape>
? ? ? ? ? ? <solid android:color="#808080"/>
? ? ? ? ? ? <corners android:radius="2dp"/>
? ? ? ? ? ? <stroke android:width="1dp"
? ? ? ? ? ? ? ? android:color="@color/teal_200"/>
? ? ? ? </shape>
? ? </item>
? ? <item android:state_pressed="false">
? ? ? ? <shape>
? ? ? ? ? ? <solid android:color="#33E3F3"/>
? ? ? ? ? ? <corners android:radius="2dp"/>
? ? ? ? ? ? <stroke android:width="1dp"
? ? ? ? ? ? ? ? android:color="#07AC78"/>
? ? ? ? </shape>
? ? </item>
</selector>

dimens.xml

<resources>
? ? <!-- Default screen margins, per the Android Design guidelines. -->
? ? <dimen name="activity_horizontal_margin">16dp</dimen>
? ? <dimen name="activity_vertical_margin">16dp</dimen>
</resources>

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關文章

  • Android指紋解鎖方法解析

    Android指紋解鎖方法解析

    這篇文章主要為大家詳細解析了Android指紋解鎖方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-10-10
  • Android之淘寶商品列表長按遮罩效果的實現(xiàn)

    Android之淘寶商品列表長按遮罩效果的實現(xiàn)

    這篇文章主要介紹了Android之淘寶商品列表長按遮罩效果的實現(xiàn),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-05-05
  • Kotlin?協(xié)程思維模型的引入使用建立

    Kotlin?協(xié)程思維模型的引入使用建立

    這篇文章主要為大家介紹了Kotlin?協(xié)程思維模型的引入使用及建立詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-12-12
  • 百度地圖實現(xiàn)小車規(guī)劃路線后平滑移動功能

    百度地圖實現(xiàn)小車規(guī)劃路線后平滑移動功能

    這篇文章主要介紹了百度地圖實現(xiàn)小車規(guī)劃路線后平滑移動功能,本文是小編寫的一個demo,通過效果圖展示的非常直白,需要的朋友可以參考下
    2020-01-01
  • android檢測SD卡讀寫權限方法

    android檢測SD卡讀寫權限方法

    今天小編就為大家分享一篇android檢測SD卡讀寫權限方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-08-08
  • Android ViewPager2 使用及自定義指示器視圖實現(xiàn)

    Android ViewPager2 使用及自定義指示器視圖實現(xiàn)

    這篇文章主要為大家介紹了Android ViewPager2 使用及自定義指示器視圖實現(xiàn)詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-09-09
  • Android Studio IDE升級4.1以后Start Failed

    Android Studio IDE升級4.1以后Start Failed

    這篇文章主要介紹了Android Studio IDE升級4.1以后Start Failed,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-10-10
  • Android中的深度鏈接技術實戰(zhàn)

    Android中的深度鏈接技術實戰(zhàn)

    本文主要介紹了Android中的深度鏈接技術實戰(zhàn),文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • Android如何禁止向EditText控件中輸入內容詳解

    Android如何禁止向EditText控件中輸入內容詳解

    EditText是接受用戶輸入信息的最重要控件。下面這篇文章主要給大家介紹了關于Android如何禁止向EditText控件中輸入內容的相關資料,文中通過示例代碼介紹的非常詳細,需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-09-09
  • Android自定義開關按鈕源碼解析

    Android自定義開關按鈕源碼解析

    這篇文章主要為大家詳細解析了Android自定義開關源碼,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-08-08

最新評論

泸西县| 武宣县| 甘孜县| 靖州| 屏边| 淮南市| 出国| 芮城县| 远安县| 石景山区| 佛坪县| 交城县| 蕲春县| 山丹县| 航空| 雷山县| 孟连| 靖边县| 武汉市| 常德市| 增城市| 宁明县| 塘沽区| 夏邑县| 怀远县| 大宁县| 英吉沙县| 满城县| 两当县| 中方县| 仁怀市| 蒙山县| 固始县| 宾川县| 荣成市| 鄂尔多斯市| 周口市| 白银市| 长寿区| 江华| 肇庆市|