본문 바로가기

나의 플랫폼/안드로이드

cannot be cast to android.widget.HeaderViewListAdapter mListView.addFooterView(mFooterView); if (Build.VERSION.SDK_INT 더보기
[Android] View 위치 및 사이즈 알아 내기 (전체 레이아웃 View).getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { // 여기 에서 찾고 하는 View의 사이즈와 위치 함수를 호출 하면 됩니다. } }); ## 이블로그는 어디까지는 찾았던 부분을 잊지 않기 위해 올려놓은 것 입니다. 내용이 부실해도 이해해 주시길 바랍니다. 더보기
[Android] Unable to execute dex: method ID not in [0, 0xffff]: 65536 Unable to execute dex: method ID not in [0, 0xffff]: 65536 위와 같은 에러는 안드로이드에서 빌드시 메소드 갯수 제한(65K) 이 되어 있기 때문에 이 이상인 경우 빌드를 막아놓아서 발생한 것입니다.이부분을 피하기 위해 안드로이드 에서는 MultiDex를 지원해주고 있는데요. 지금 부터 MultiDex를 설정하는 방법을 알려 드리겠습니다. 1. app/build.gradle 에 아래 소스를 추가 시킵니다.defaultConfig { ... // Enabling multidex support. multiDexEnabled true } dependencies { compile 'com.android.support:multidex:1.0.0' }참고 : http:/.. 더보기
[Android] cannot merge new index xxxxx into a non-jumbo instruction 안드로이드 개발을 할 때, Library를 많이 사용할 경우 아래와 같은 에러가 발생하며 빌드가 되지 않습니다. cannot merge new index xxxxx into a non-jumbo instruction 이건 dex index를 초과해서 발생한 에러 라고 합니다.아래 방법 대로 해결 하시면 빌드가 잘 됩니다. [Android studio 사용시] 참고 : http://stackoverflow.com/questions/30515209/dexindexoverflowexception-cannot-merge-new-index-65772-into-a-non-jumbo-instruc I have tried to set jumboMode in gradle for my project, it seems ab.. 더보기
[Android] Https Setting with Volley 아래 소스 같이 newSslSocketFactory 함수를 넣어서 추가 하면 됩니다.인증서를 만드는 부분과 설정은 아래 내용을 참고 해주세요. public RequestQueue getRequestQueue() { if (mRequestQueue == null) { // getApplicationContext() is key, it keeps you from leaking the // Activity or BroadcastReceiver if someone passes one in. mRequestQueue = Volley.newRequestQueue(mCtx.getApplicationContext(), new HurlStack(null, newSslSocketFactory())); } return mR.. 더보기
[Android] Intent Flag 정리 Activity 생성시 Intent Flag 사용방법은 다들 알고 있겠지만 다음과 같음intent.addFlag(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); 1. FLAG_ACTIVITY_BROUGHT_TO_FRONT 시스템에서 설정하는 값이며, 같은 task에 Activity가 존재할 경우에 Activity의 실행모드가 singleTask이면 자동으로 설정됨 2. FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET 테스크가 리셋될 때 플래그가 사용된 액티비티부터 위의 액티비티가 모두 삭제됩니다. 예) ABCD -> B call - > AB FLAG_ACTIVITY_RESET_TASK_IF_NEEDED플래그의 설정에 의해 리셋이 이루어지게 됩니다. 시스템에 의해 홈.. 더보기
[Android] Image GridView 참고 Library https://github.com/felipecsl/AsymmetricGridView Screenshots: http://sysmagazine.com/posts/216591/Many plowing on open space Github, I found assemblage of interesting designs, source the codes, and libraries. And now the time came to share them. Meet assemblage vkusnostej under katom! 1. FreeFlow The design which allows to create that that napodobii mozajki or tiles from Windows Phone, with assem.. 더보기
[Android] EditText에서 Email 타입을 설정 할때 mEmail.setInputType(InputType.TYPE_CLASS_TEXT| InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); 위 형태로 두면 기본적으로 영문을 입력하도록 키보드가 셋팅이 됩니다.또한! 하단에 '@' 두둥! 보이게 되죠 ㅎㅎ 기본 적으로 InputType은 TYPE_CLASS_TEXT를 추가 해서 셋팅해야 한다고 하네요.참고하세요!! http://stackoverflow.com/questions/22693471/alertdialog-with-edittext-with-inputtype-email-android 더보기