欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android實(shí)現(xiàn)房貸計(jì)算器功能

 更新時(shí)間:2022年01月12日 08:22:21   作者:Atomic_space  
這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)房貸計(jì)算器功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

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

package com.atomic.moretool;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MortgageCal extends AppCompatActivity {
? ? private EditText allLoan,yearInterestRate,loanYear;
? ? private Button calLoan;
? ? private ListView ShowDebx,ShowDebj;
? ? private TextView debxTotalInterest;
? ? private TextView debjTotalInterest;
? ? @Override
? ? protected void onCreate(Bundle savedInstanceState) {
? ? ? ? super.onCreate(savedInstanceState);
? ? ? ? setContentView(R.layout.activity_mortgagecal);
? ? ? ? findCompent();
? ? ? ? calLoan.setOnClickListener(new View.OnClickListener() {
? ? ? ? ? ? @Override
? ? ? ? ? ? public void onClick(View view) {
? ? ? ? ? ? ? ? showDebx();
? ? ? ? ? ? ? ? showDebj();
? ? ? ? ? ? }
? ? ? ? });
? ? }
? ? private void showDebx(){
? ? ? ? SimpleAdapter simpleAdapter=new SimpleAdapter(this,cal_debx(),R.layout.show_debx,
? ? ? ? ? ? ? ? new String[]{"debxmonth","debxmonthloan","debxmonthprincipal","debxmonthinterest"},
? ? ? ? ? ? ? ? new int[]{R.id.debx_month,R.id.listview_debx_month_loan,R.id.listview_debx_month_principal,R.id.listview_debx_month_interest});
? ? ? ? ShowDebx.setAdapter(simpleAdapter);
? ? }
? ? private void showDebj(){
? ? ? ? SimpleAdapter simpleAdapter=new SimpleAdapter(this,cal_debj(),R.layout.show_debj,
? ? ? ? ? ? ? ? new String[]{"debjmonth","debjmonthloan","debjmonthprincipal","debjmonthinterest","debjmonthdecrease"},
? ? ? ? ? ? ? ? new int[]{R.id.debj_month,R.id.listview_debj_month_loan,R.id.listview_debj_month_principal,R.id.listview_debj_month_interest,R.id.listview_debj_month_decrease});
? ? ? ? ShowDebj.setAdapter(simpleAdapter);
? ? }
? ? private void findCompent() {
? ? ? ? allLoan=findViewById(R.id.all_loan);
? ? ? ? yearInterestRate=findViewById(R.id.year_interest_rate);
? ? ? ? loanYear=findViewById(R.id.loan_year);
? ? ? ? allLoan.setSelectAllOnFocus(true);
? ? ? ? yearInterestRate.setSelectAllOnFocus(true);
? ? ? ? loanYear.setSelectAllOnFocus(true);
? ? ? ? calLoan=findViewById(R.id.cal_loan);
? ? ? ? ShowDebx=findViewById(R.id.show_debx);
? ? ? ? ShowDebj=findViewById(R.id.show_debj);
? ? ? ? debxTotalInterest=findViewById(R.id.debx_total_interest);
? ? ? ? debjTotalInterest=findViewById(R.id.debj_total_interest);
? ? }
? ? private List<Map<String,Object>> cal_debx(){
? ? ? ? /* ?<!--等額本息-->
? ? ? ? 每月還款總額=貸款本金×[月利率×(1+月利率)^還款月數(shù)]÷[(1+月利率)^還款月數(shù)-1]
? ? ? ? 每月應(yīng)還本金=貸款本金×月利率×(1+月利率)^(還款月序號(hào)-1)÷〔(1+月利率)^還款月數(shù)-1〕
? ? ? ? 每月應(yīng)還利息=貸款本金×月利率×〔(1+月利率)^還款月數(shù)-(1+月利率)^(還款月序號(hào)-1)〕÷〔(1+月利率)^還款月數(shù)-1〕
? ? ? ? 總利息=還款月數(shù)×每月還款總額-貸款本金
? ? ? ? ?*/

? ? ? ? String AllLoan=allLoan.getText().toString().trim();//貸款多少
? ? ? ? String YearInterestRate=yearInterestRate.getText().toString().trim();//年利率
? ? ? ? String LoanYear=loanYear.getText().toString().trim();//貸款年數(shù)
? ? ? ? if (!AllLoan.equals("") && !YearInterestRate.equals("") && !LoanYear.equals("")){
? ? ? ? ? ? double allloan=Double.parseDouble(AllLoan);//貸款多少
? ? ? ? ? ? double yearinterestrate=Double.parseDouble(YearInterestRate);//年利率
? ? ? ? ? ? double monthinterestrate=yearinterestrate/12;//月利率
? ? ? ? ? ? double loanyear=Double.parseDouble(LoanYear);//貸款年數(shù)
? ? ? ? ? ? double loanmonth=loanyear*12;//還款月數(shù)
? ? ? ? ? ? //......需要設(shè)置還款月序號(hào)
? ? ? ? ? ? //......需要已歸還本金累計(jì)額
? ? ? ? ? ? //......需要剩余本金
? ? ? ? ? ? List<Map<String,Object>> debx_list=new ArrayList<>();
? ? ? ? ? ? for (int i=1;i<=(int)loanmonth;i++){
? ? ? ? ? ? ? ? Map<String,Object> map=new HashMap<>();
? ? ? ? ? ? ? ? // <!--等額本息-->
? ? ? ? ? ? ? ? //每月還款總額=貸款本金×[月利率×(1+月利率)^還款月數(shù)]÷[(1+月利率)^還款月數(shù)-1]
? ? ? ? ? ? ? ? double DebxMonthLoan=new BigDecimal(allloan*monthinterestrate*Math.pow((1+monthinterestrate),loanmonth)/(Math.pow((1+monthinterestrate),loanmonth)-1)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? //每月應(yīng)還本金=貸款本金×月利率×(1+月利率)^(還款月序號(hào)-1)÷〔(1+月利率)^還款月數(shù)-1〕
? ? ? ? ? ? ? ? double DebxMonthPrincipal=new BigDecimal(allloan*monthinterestrate*Math.pow((1+monthinterestrate),(i-1))/(Math.pow((1+monthinterestrate),loanmonth)-1)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? //每月應(yīng)還利息=貸款本金×月利率×〔(1+月利率)^還款月數(shù)-(1+月利率)^(還款月序號(hào)-1)〕÷〔(1+月利率)^還款月數(shù)-1〕
? ? ? ? ? ? ? ? double DebxMonthInterest=new BigDecimal(allloan*monthinterestrate*((Math.pow((1+monthinterestrate),loanmonth))-Math.pow((1+monthinterestrate),(i-1)))/(Math.pow((1+monthinterestrate),loanmonth)-1)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? map.put("debxmonth",String.valueOf(i)+"月");
? ? ? ? ? ? ? ? map.put("debxmonthloan",String.valueOf(DebxMonthLoan));
? ? ? ? ? ? ? ? map.put("debxmonthprincipal",String.valueOf(DebxMonthPrincipal));
? ? ? ? ? ? ? ? map.put("debxmonthinterest",String.valueOf(DebxMonthInterest));
? ? ? ? ? ? ? ? debx_list.add(map);
? ? ? ? ? ? }
? ? ? ? ? ? //每月還款總額
? ? ? ? ? ? double DebxMonthLoan=new BigDecimal(allloan*monthinterestrate*Math.pow((1+monthinterestrate),loanmonth)/(Math.pow((1+monthinterestrate),loanmonth)-1)).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? //總利息=還款月數(shù)×每月還款總額-貸款本金
? ? ? ? ? ? double DebxInterest=new BigDecimal(loanmonth*DebxMonthLoan-allloan).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? debxTotalInterest.setText(String.valueOf(DebxInterest));
? ? ? ? ? ? return debx_list;
? ? ? ? }else{
? ? ? ? ? ? Toast.makeText(this, "先輸入與選擇內(nèi)容", Toast.LENGTH_SHORT).show();
? ? ? ? }
? ? ? ? return null;
? ? }
? ? private List<Map<String,Object>> cal_debj() {
? ? ? ? /* <!--等額本金-->
? ? ? ? 每月還款總額=(貸款本金÷還款月數(shù))+(貸款本金-已歸還本金累計(jì)額)×月利率
? ? ? ? 每月應(yīng)還本金=貸款本金÷還款月數(shù)
? ? ? ? 每月應(yīng)還利息=剩余本金×月利率=(貸款本金-已歸還本金累計(jì)額)×月利率。
? ? ? ? 每月月供遞減額=每月應(yīng)還本金×月利率=貸款本金÷還款月數(shù)×月利率
? ? ? ? 總利息=還款月數(shù)×(總貸款額×月利率-月利率×(總貸款額÷還款月數(shù))*(還款月數(shù)-1)÷2+總貸款額÷還款月數(shù))
? ? ? ? */
? ? ? ? String AllLoan = allLoan.getText().toString().trim();//貸款多少
? ? ? ? String YearInterestRate = yearInterestRate.getText().toString().trim();//年利率
? ? ? ? String LoanYear = loanYear.getText().toString().trim();//貸款年數(shù)
? ? ? ? if (!AllLoan.equals("") && !YearInterestRate.equals("") && !LoanYear.equals("")) {
? ? ? ? ? ? double allloan = Double.parseDouble(AllLoan);//貸款多少
? ? ? ? ? ? double yearinterestrate = Double.parseDouble(YearInterestRate);//年利率
? ? ? ? ? ? double monthinterestrate = yearinterestrate / 12;//月利率
? ? ? ? ? ? double loanyear = Double.parseDouble(LoanYear);//貸款年數(shù)
? ? ? ? ? ? double loanmonth = loanyear * 12;//還款月數(shù)
? ? ? ? ? ? //......需要已歸還本金累計(jì)額
? ? ? ? ? ? //......需要剩余本金
? ? ? ? ? ? List<Map<String, Object>> debj_list = new ArrayList<>();
? ? ? ? ? ? for (int i = 1; i <= (int) loanmonth; i++) {
? ? ? ? ? ? ? ? Map<String, Object> map = new HashMap<>();
? ? ? ? ? ? ? ? // <!--等額本金-->
? ? ? ? ? ? ? ? //每月應(yīng)還本金=貸款本金÷還款月數(shù)
? ? ? ? ? ? ? ? double DebjMonthPrincipal = new BigDecimal(allloan / loanmonth).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? //每月還款總額=(貸款本金÷還款月數(shù))+(貸款本金-累計(jì)已還款本金)×月利率
? ? ? ? ? ? ? ? double DebjMonthLoan = new BigDecimal((allloan / loanmonth) + (allloan - DebjMonthPrincipal*i) * monthinterestrate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? //每月應(yīng)還利息=剩余本金×月利率=(貸款本金-累計(jì)已還款本金)×月利率。
? ? ? ? ? ? ? ? double DebjMonthInterest = new BigDecimal((allloan-DebjMonthPrincipal*i) * monthinterestrate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? //每月月供遞減額=每月應(yīng)還本金×月利率=貸款本金÷還款月數(shù)×月利率
? ? ? ? ? ? ? ? double DebjMonthDecrease = new BigDecimal(DebjMonthPrincipal * monthinterestrate).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? ? ? map.put("debjmonth",String.valueOf(i)+"月");
? ? ? ? ? ? ? ? map.put("debjmonthloan",String.valueOf(DebjMonthLoan));
? ? ? ? ? ? ? ? map.put("debjmonthprincipal",String.valueOf(DebjMonthPrincipal));
? ? ? ? ? ? ? ? map.put("debjmonthinterest",String.valueOf(DebjMonthInterest));
? ? ? ? ? ? ? ? map.put("debjmonthdecrease",String.valueOf(DebjMonthDecrease));
? ? ? ? ? ? ? ? debj_list.add(map);
? ? ? ? ? ? }
? ? ? ? ? ? //總利息=還款月數(shù)×(總貸款額×月利率-月利率×(總貸款額÷還款月數(shù))*(還款月數(shù)-1)÷2+總貸款額÷還款月數(shù))
? ? ? ? ? ? double DebjInterest = new BigDecimal(((allloan/loanmonth+allloan*monthinterestrate)+allloan/loanmonth*(1+monthinterestrate))/2*loanmonth-allloan).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
? ? ? ? ? ? debjTotalInterest.setText(String.valueOf(DebjInterest));
? ? ? ? ? ? return debj_list;
? ? ? ? } else {
? ? ? ? ? ? Toast.makeText(this, "先輸入與選擇內(nèi)容", Toast.LENGTH_SHORT).show();
? ? ? ? }
? ? ? ? return null;
? ? }
}

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:orientation="vertical"
? ? android:layout_margin="15sp"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent">
? ? <LinearLayout
? ? ? ? android:layout_marginBottom="15sp"
? ? ? ? android:orientation="horizontal"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <TextView
? ? ? ? ? ? android:text="貸款年數(shù)"
? ? ? ? ? ? android:textSize="14sp"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <EditText
? ? ? ? ? ? android:text="20"
? ? ? ? ? ? android:inputType="number"
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:id="@+id/loan_year"
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"/>

? ? ? ? <TextView
? ? ? ? ? ? android:text="年利率"
? ? ? ? ? ? android:textSize="14sp"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <EditText
? ? ? ? ? ? android:text="0.0635"
? ? ? ? ? ? android:inputType="number"
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:id="@+id/year_interest_rate"
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>
? ? <LinearLayout
? ? ? ? android:gravity="center|left"
? ? ? ? android:layout_marginBottom="10sp"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? tools:ignore="RtlHardcoded">
? ? ? ? <TextView
? ? ? ? ? ? android:text="貸款多少"
? ? ? ? ? ? android:textSize="14sp"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <EditText
? ? ? ? ? ? android:inputType="number"
? ? ? ? ? ? android:layout_marginEnd="10sp"
? ? ? ? ? ? android:text="180000"
? ? ? ? ? ? android:id="@+id/all_loan"
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <Button
? ? ? ? ? ? android:background="@drawable/button_style"
? ? ? ? ? ? android:id="@+id/cal_loan"
? ? ? ? ? ? android:text="計(jì)算"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>
? ? <LinearLayout
? ? ? ? android:layout_marginBottom="5sp"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <TextView
? ? ? ? ? ? android:layout_marginEnd="10sp"
? ? ? ? ? ? android:text="[等額本息]"
? ? ? ? ? ? android:textSize="20sp"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:text="總利息: "
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:id="@+id/debx_total_interest"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>

? ? <LinearLayout
? ? ? ? android:orientation="horizontal"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="每月總還款"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="每月還本金"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="每月還利息"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>
? ? <ListView
? ? ? ? android:layout_weight="1"
? ? ? ? android:id="@+id/show_debx"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"/>
? ? <LinearLayout
? ? ? ? android:layout_marginTop="15sp"
? ? ? ? android:layout_marginBottom="5sp"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <TextView
? ? ? ? ? ? android:layout_marginEnd="15sp"
? ? ? ? ? ? android:text="[等額本金]"
? ? ? ? ? ? android:textSize="20sp"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:text="總利息:"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:id="@+id/debj_total_interest"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>

? ? <LinearLayout
? ? ? ? android:orientation="horizontal"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content">
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="月總還款"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="月還本金"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="月還利息"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? ? ? <TextView
? ? ? ? ? ? android:layout_weight="1"
? ? ? ? ? ? android:text="月供遞減"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"/>
? ? </LinearLayout>
? ? <ListView
? ? ? ? android:layout_weight="1"
? ? ? ? android:id="@+id/show_debj"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"/>
</LinearLayout>

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Android實(shí)現(xiàn)獲取未接來(lái)電和未讀短信數(shù)量的方法

    Android實(shí)現(xiàn)獲取未接來(lái)電和未讀短信數(shù)量的方法

    這篇文章主要介紹了Android實(shí)現(xiàn)獲取未接來(lái)電和未讀短信數(shù)量的方法,是Android程序開(kāi)發(fā)中非常常見(jiàn)的重要功能,需要的朋友可以參考下
    2014-08-08
  • Android 日志工具(log)的使用方法

    Android 日志工具(log)的使用方法

    這篇文章主要介紹了Android 日志工具的使用方法的相關(guān)資料,需要的朋友可以參考下
    2017-07-07
  • Android實(shí)現(xiàn)帶有刪除按鈕的EditText示例代碼

    Android實(shí)現(xiàn)帶有刪除按鈕的EditText示例代碼

    本文給大家介紹一個(gè)很實(shí)用的小控件,就是在Android系統(tǒng)的輸入框右邊加入一個(gè)小圖標(biāo),點(diǎn)擊小圖標(biāo)可以清除輸入框里面的內(nèi)容,IOS上面直接設(shè)置某個(gè)屬性就可以實(shí)現(xiàn)這一功能,但是Android原生EditText不具備此功能,所以要想實(shí)現(xiàn)這一功能我們需要重寫EditText。下面來(lái)看看吧。
    2016-12-12
  • Android Retrofit的使用詳解

    Android Retrofit的使用詳解

    本文介紹了Android Retrofit的使用詳解,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-01-01
  • Android Listview 滑動(dòng)過(guò)程中提示圖片重復(fù)錯(cuò)亂的原因及解決方法

    Android Listview 滑動(dòng)過(guò)程中提示圖片重復(fù)錯(cuò)亂的原因及解決方法

    android中l(wèi)istview是比較常見(jiàn)的組件,通過(guò)本文主要給大家分析Android中Listview滾動(dòng)過(guò)程造成的圖片顯示重復(fù)、錯(cuò)亂、閃爍的原因及解決方法,順便跟進(jìn)Listview的緩存機(jī)制,感興趣的朋友一起看下吧
    2016-08-08
  • Android中判斷是否有前置攝像頭、后置攝像頭的方法

    Android中判斷是否有前置攝像頭、后置攝像頭的方法

    這篇文章主要介紹了Android中判斷是否有前置攝像頭、后置攝像頭的方法,本文直接給出實(shí)現(xiàn)代碼,需要的朋友可以參考下
    2015-01-01
  • 詳解Android中Drawable方法

    詳解Android中Drawable方法

    這篇文章主要為大家詳細(xì)介紹了Android中Drawable方法,感興趣的朋友可以參考一下
    2016-05-05
  • Android中的WebView詳細(xì)介紹

    Android中的WebView詳細(xì)介紹

    這篇文章主要介紹了Android中的WebView詳細(xì)介紹,本文講解了WebView的概念、使用方法、各種使用實(shí)例等,需要的朋友可以參考下
    2015-06-06
  • Android四大組件之Service服務(wù)詳細(xì)講解

    Android四大組件之Service服務(wù)詳細(xì)講解

    Android的服務(wù)是開(kāi)發(fā)Android應(yīng)用程序的重要組成部分。不同于活動(dòng)Activity,服務(wù)是在后臺(tái)運(yùn)行,服務(wù)沒(méi)有接口,生命周期也與活動(dòng)Activity非常不同。通過(guò)使用服務(wù)我們可以實(shí)現(xiàn)一些后臺(tái)操作,比如想從遠(yuǎn)程服務(wù)器加載一個(gè)網(wǎng)頁(yè)等,下面來(lái)看看詳細(xì)內(nèi)容,需要的朋友可以參考下
    2022-07-07
  • Android自定義橫向滑動(dòng)菜單的實(shí)現(xiàn)

    Android自定義橫向滑動(dòng)菜單的實(shí)現(xiàn)

    這篇文章主要介紹了Android自定義橫向滑動(dòng)菜單的實(shí)現(xiàn),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-05-05

最新評(píng)論