본문 바로가기

전체 글

(173)
[Android] Visible, Invisible, Gone * Visible - 틀도 있고 이미지도 보여지는 것 * Invisible - 틀은 있는데 이미지는 안보여지는 것 * gone - 틀도 없고 이미지도 없음
토스트 메시지 띄우기, 웹페이지로 전환, 전화걸기
패딩, 마진
[Do it 안드로이드] Day 16 - 4 * 이해가 안됨.....쩝 package com.oneplus.gubong_kim.service; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity { EditText edt; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(save..
[Android] SharedPreferences * SharedPreferences - 스택이 없어 질 경우 값을 저장해 놨다가 불러올 때 사용한다. //전체를 뜻함 //거의 private 씀- SharedPreferences pref = getSharedPreferences("pref", Activity.MODE_PRIVATE); //수정해 줘야 하므로 Editor가 필요 SharedPreferences.Editor editor = pref.edit(); //String이라 putString메소드 이용해 값 넣기, key값과 value값 editor.putString("name", "소녀시대"); // 세팅 editor.commit(); //저장되어 있는 객체- SharedPreferences pref = getSharedPreferences("pr..
[Do it 안드로이드] Parcelable 예제 Parcelable 예제 * Day15-4 강의 내용인데 이해 못함..... ㅠ.ㅠ import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main)..
[Android] 권한 설정해주기, 권한 없애기 * 권한 설정해주기 - app -> manifests -> package 명 밑에 아래와 같이 원하는 권한을 설정해주면 된다. * 권한 없애는 법 - sdk 23 버전부터 권한을 설정하게 되었다. 즉 버전을 22로 낮추면 권한을 따로 설정해주지 않아도 된다.
[Android] EditText 입력 값 가져오기, ComponetName 사용법 * EditText에서 값 가져오기 - .getText() 로 가져와 String으로 변환해주는 방법이 밑에 나와있다. * ComponetName - 인텐트에 정보를 넣을 때 사용하는 방법 중 하나이다.- intent명.setComponent(new ComponentName("패키지명", "패키지명.컴포넌트 액티비티명"));package com.oneplus.callintent; import android.content.ComponentName; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.v..