Android90 안드로이드 초보자가 생각못할수도 있는 OnClickListener(온클릭 리스너) 왼만한 View에는 OnClickListener를 사용 할 수 있습니다. 간혹 생각을 못하시고 어찌해야하는지 고민하는 분들이 있습니다. import androidx.appcompat.app.AppCompatActivity; import android.media.Image; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toa.. 2020. 1. 21. Android(안드로이드) 벨소리,진동,무음 제어하기 현재 스마트폰의 상태를 벨소리,진동,무음으로 변경이 가능하게 하고싶으실때 유용합니다. 우선 퍼미션먼저 넣어줄게요. 저는 이렇게 3개 넣어줬습니다. 무음상태까지 제어를 하기위해선 별도의 작업이 하나 더 필요합니다. NotificationManager notificationManager; notificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); if (!notificationManager.isNotificationPolicyAccessGranted()) { Toast.makeText(getApplicationContext(), "권한을 허용해주세요", Toast.LENGTH_LONG).show.. 2020. 1. 14. 안드로이드 Ctrl+F 기능 확장 (프로젝트 전체에서 찾아보기) 안드로이드 스튜디오에서뿐만 아니라 다른 인터넷창에서도 자주 활용하는 Ctrl+F를 활용합니다. 이번에는 이 기능의 확장기능인 Ctrl+Shift+F 기능을 살펴볼건데요 누르면 이런화면이 뜹니다. intent를 검색해보았습니다. 현재 프로젝트파일 전체에서 intent가 들어간 곳을 다 찾아주는 기능입니다. 해당 줄에서 Enter를 입력하시면 바로 그 파일로 이동도 가능합니다. 궁금하신 사항은 댓글 남겨주세요. 2020. 1. 13. 블루투스 활성화 여부에따라 앱종료 및 계속 실행하기. 핸드폰에는 이처럼 블루투스 기능이있는데요. 이 기능이 켜져있으면 예정대로 앱이 실행되고, 블루투스 기능이 꺼져있다면 실행여부를 물어봐서 거부를 한다면 앱이 종료되는걸 해보도록 하겠습니다. public static BluetoothAdapter bluetoothAdapter; public final static int BLUETOOTH_REQUEST = 1004; public BluetoothService(Activity activity) { //생성자입니다. this.activity = activity; bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); } public static void BluetoothCheck() { //블루투스가 켜져있는지 안켜.. 2019. 12. 30. 이전 1 ··· 12 13 14 15 16 17 18 ··· 23 다음