기본 콘텐츠로 건너뛰기

9월, 2014의 게시물 표시

[android] make number select dialog with DialogFragment

The DialogFragment class provides all the controls you need to create your dialog and manage its appearance, instead of calling methods on the Dialog object. The DialogFragment class was originally added with Android 3.0 (API level 11), for older API this class is provided with the Support Library. if use support library version & proguard, -keep class android.support.v4.app.** { *; } -keep interface android.support.v4.app.** { *; } should be added to proguard rule. Create NumberPickerDialogFragment Override onCreateDialog() method. the returned Dialog will be shown when NumberPickDialogFragment instance call show() method. for example in Activiry when click "Show Number Picker Dialog" Create NumberPicker set NumberPickDialogFragment view with NumberPicker now Dialog will be shown like this Create Interface Selected value will be handled by Activity that made the Dialog, so declare interface to pass the value. this interface ca

[android] disable from recent list

android:excludeFromRecents Whether or not the task initiated by this activity should be excluded from the list of recently used applications ("recent apps"). That is, when this activity is the root activity of a new task, this attribute determines whether the task should not appear in the list of recent apps. Set "true" if the task should be excluded from the list; set "false" if it should be included. The default value is "false". from http://developer.android.com/intl/ko/guide/topics/manifest/activity-element.html#exported korean reference for this attribute

[android] getting wifi ip

code from  http://chandan-tech.blogspot.it/2010/12/finding-ip-address-of-your-android.html result in android 2.3.7 android 4.4.2 code from  http://stackoverflow.com/questions/7975473/detect-wifi-ip-address-on-android result in android 2.3.7 android 4.4.2 android app using this method