본문 바로가기
[android] login test 를 쉽게 하자! [android] login test 를 쉽게 하자! adb 는 신비롭다.현재 focus 를 가지고 있는 edittext 에 adb 로 input 도 가능하다. adb shell input text [typing]adb shell input keyevent 66 // enteradb shell input text [typing] 위의 typing 부분에 각각 id, password 를 넣으면 쉽게 login 테스트를 할 수 있다. batch 파일로 만들어서 로그인 할 때마다 실행하면 손쉽게 로그인 시킬 수 있다. 몰론.. debug 개발시에는 그냥 id, password 를 코드에 상수로 박아도 되지만,이렇게 adb 로 입력할 수 있다는 것을 안다는 것은 다른 곳에도 활용할 수 있어 알아야 할 지식 중 .. 2015. 12. 1.
[android] SoftKeyboard action btn custom 으로 만들기 [android] SoftKeyboard action btn custom 으로 만들기 https://plus.google.com/u/0/+CyrilMottier/posts/FBZrVnbUCXZ Action, EditText, imeaction, imeactionid, imeactionlabel, KEYBOARD, softkeyboard, [android] SoftKeyboard action btn custom 으로 만들기 2014. 5. 16.
[android] baselineAligned 속성의 정체. android, baselineAligned 속성의 정체. LinearLayout 에 포함되는, TextView 들은 글씨들의 first line 을 align 하도록 기본 설정이 되어 있다. 그래서 위와 같이 한줄짜리 text 를 가진 버튼들 중간에두줄짜리 text 를 가진 버튼이 추가되면 위와 같은 layout 이 보여진다. 이는 LinearLayout 을 상속하는 TableLayout, RadioGroup, SearchView 들과TextView 를 상속하는 Button, CheckBox, RadioButton, EditText 들도 이에 해당한다고 보면 된다. 따라서 이런 현상을 없애려면, 기본 true 로 되어있는 android:baselineAligned 값을 false 로 전환해주면 된다. .. 2014. 4. 10.
[android] 삼성 핸드폰 계열의 버그. ( EditText & SoftInput 관련 ) android, 삼성 핸드폰 계열의 버그. ( EditText & SoftInput 관련 ) 알려진 단말 : Galaxy Nexus, Galaxy S3 EditText 에 SoftInput 이 연결된 상황에서 Activity 를 종료했을 경우 Activity가 제대로 destroy 되지 않거나늦게 destroy 가 되어 memory leak 과 비슷한 현상을 보여주곤 한다. activity, activity destroy, activity 종료, android 삼성 핸드폰 계열의 버그. ( EditText & SoftInput 관련 ), destory, EditText, Galaxy Nexus, galaxy s3, memory leak, soft keyboard, softinput, 갤럭시 넥서스, 겔럭.. 2014. 3. 18.
[android] how to add comma in the EditText. android, how to add comma in the EditText. 1. xml 상 EditText 에 , 를 입력할 수 있게 한다. ( android:inputType = "numberDecimal" 로 가정 )"0123456789.," 2. EditText 에 TextWatcher 추가mEditText.addTextChangedListener( mEditTextTextWatcher ); private TextWatcher mTextTextWatcher = new TextWatcher() {@Overridepublic void onTextChanged(CharSequence s, int start, int before, int count) { }@Overridepublic void before.. 2013. 12. 30.
[android] CharSequence.equlas( CharSeqence ) 이야기 안드로이드, CharSequence.equals( CharSequence ) edittext 의 내용을 비교하기 위해 CharSeqeucne.equals( CharSequence ) 를 했는데,항상 false 를 내뿜는다. ex)edittext1.getText().equals( edittext2.getText() ) // return false always. 이번에는 같은 내용의 string 과 비교했지만 항상 false 를 내뱉는다. ex)edittext1.getText().equals( "Gamza" ) // return false always 같은 reference 를 가르키는 것이 아니라면 항상 false 를 내뱉는다. 그럼 어떻게 비교할까? 1. Charsequence 에 toString 값을 .. 2013. 8. 8.
[android] inputtype number 에 대한 버그 해결 방법 inputtype number 에 대한 버그 해결 방법 EditText InputType 을 Number 로 해도, EditText를 클릭하면 숫자 키보드가 아닌 일반 키보드가 나오곤 한다. 이 문제는 안드로이드 자체 버그로 보이는데, 이것을 해결하려면 windowSoftInputMode 를 adjustPan 으로 주면 된다. @Manifest activity tagandroid:windowSoftInputMode="adjustPan" windowSoftInputMode 의 기본은 adjustResize 이기 때문에 windowSoftInputMode 를 adjustResize 로 할 경우 해당 이슈는 계속 발생한다. adjustpan, adjustresize, Android, android:window.. 2013. 7. 3.
[android] EditText cursor 위치 조정하기. EditText cursor 위치 조정하기 - EditText.setSelection( int position ) 함수를 사용하면 된다. ex) editText.setSelection ( editText.length() ) // 마지막 위치로 커서 이동 도움이 되셨다면 손가락 꾸욱~ ( 로그인 필요 x ) 2012. 12. 12.
[android] EditText hint text single line 설정하기. EditText hint text single line 설정하기. - EditText 를 사용할 떄 hintText 가 길 경우 singleLine="true" 를 줘도 잘 먹히지 않는다. single line 으로 나오지 않는다는 말이다. 이 때 ellipsize 옵션을 함께 주면 해결된다. 2012. 12. 7.
반응형