개발/안드로이드6 how to get activity's content view this.getWindow().getDecorView().findViewById(android.R.id.content)orthis.findViewById(android.R.id.content)orthis.findViewById(android.R.id.content).getRootView() 출처 : http://stackoverflow.com/questions/5273436/how-to-get-activitys-content-view 2016. 11. 8. android insufficient permissions error 9 개발시 record audio 권한을 manifest 에 선언해놓았는데insufficient error 가 발생했다. 해결방법은 2가지인데, 그 중 한가지는 runtime 에서 권한 요청을 한다.요청 코드 예제는 아래와 같다. // Here, thisActivity is the current activity if (ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if (ActivityCompat.shouldShowRequestPermissionRationale(thisActi.. 2016. 11. 6. android studio github error (non-fast-forward) 출처 : http://stackoverflow.com/questions/11696295/rejected-master-master-non-fast-forward 1) Try this: git push -f origin master 2) ! [rejected] master -> master (non-fast-forward)Don’t panic, this is extremely easy to fix. All you have to do is issue a pull and your branch will be fast-forward:$ git pull myrepo masterThen retry your push and everything should be fine:$ git push github master 2016. 10. 24. 안드로이드 button 클릭 이벤트 처리 4가지 출처 : http://jizard.tistory.com/9 # button xml [1] listener 구현 객체 변수 지정 public class MainActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewById(R.id.btn_start).setOnClickListener(mClickListener); } Button.OnClickListener mClickListener = new View.OnClickListener() { public void onClick(.. 2016. 10. 20. 이전 1 2 다음