[Android] String형 ↔ Double형 변환
The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double. In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double. 1. double 형 숫자를 String으로 변환 String strTemp = Double.toString(1.23456..
프로그래밍/JAVA & Android
2018. 6. 29. 20:56
[Android] 배터리 정보 가져오기
import android.content.Intent;import android.content.IntentFilter; Intent bat = registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); String battLevel = bat.getIntExtra("level", -1)+"%"; TextView textView = (TextView)findViewById(R.id.textView4);textView.setText( "배터리 : " + battLevel );
프로그래밍/JAVA & Android
2018. 6. 28. 22:22
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday