먼저, EditText 의 커스텀 키보드를 제작하는 방법입니다. ↓EditText 커스텀 키보드 제작 키보드를 만들었다면 해당 메소드를 구현합니다. 1. 커서 위치부터 한칸 지우기. 커스텀 키보드의 BackSpace 등 개발자가 지우길 원하는 버튼을 눌렀을 경우의 이벤트.public void backBTN(EditText et){ // EditText 커서 position을 구합니다. int selection = et.getSelectionStart(); // 커서 position 이 0이라면, nullpointer exception occur.. 종료합니다. if(selection == 0){ return; } // position을 기준으로 두 구간 분리. // ex) "123456"에서 커서가 3 ..
테스트 결과 : 성공테스트 기기 : 갤럭시 노트3, 갤럭시 윈, 옵티머스 G테스트 OS : 4.x.x 버전 EditText 소프트 키보드 커스터 마이징 방법 1. EditText를 선언한다.EditText et = (EditText)findViewById(R.id.et); 2. 선언한 EditText 속성을 변경한다.et.setTextIsSelectable(true); 3. 키보드를 만든다. 4. 글이 적힐때마다 커서를 EditText의 맨끝으로 옮겨준다.et.setSelection(et.length()); 끝. 생각보다 엄청쉽다. 이렇게 하면 해당 EditText를 눌렀을때 키보드는 안올라오고 커서는 깜빡거리게 된다.setInputType(0) 을 주라는 말이있어서 그렇게 했더니,키보드는 안올라오지만 ..
1. TabActivity 참고 : http://developer.android.com/reference/android/app/TabActivity.html This class was deprecated in API level 13. New applications should use Fragments instead of this class; to continue to run on older devices, you can use the v4 support library which provides a version of the Fragment API that is compatible down to DONUT. 문구를 보면 API 13 (안드로이드 3.2)부터는 TabActivity는 deprecated 함수..
에러 내용 : Incorrect line ending: found carriage return (\r) without corresponding newline (\n) 증상 : xml 레이아웃 편집중에 갑자기 아무것도 이상한것이 없는데위와같은 메세지의 에러가 떴다.나의 경우는 LinearLayout에서 발생. 해결법 : Ctrl+Shift+F 참고 : http://stackoverflow.com/questions/14049508/incorrect-line-ending-found-carriage-return-r-without-corresponding-newline
/** * 소수점 n째자리까지 자름. * 반올림이 아니라 버림이다. 주의하셍 * */ public String adjustMinority(String minority, int n){ // 소수점이 있다면 if(minority.contains(".")){ // .을 기준으로 쪼개서 String[] splitedMinority = minority.split("[.]"); // 소수점 이하 자리수가 n보다 큰지 작은지 재보자 //n보다 크다면 잘라내고, //n보다 작다면 n만큼 0을 채워넣어야겠지? if(splitedMinority[1].length() > n){ splitedMinority[1] = splitedMinority[1].substring(0, n); }else if(splitedMinority[..
BACK_TIMEOUT 은 밀리초단위로 2000이면 2초이다. 2초 이내에 BACK 키가 다시 눌릴경우 종료하는 코드.FLAG를 이용해서 2초이내에 눌렸는지 판단한다.//================================================== // Back key 두번 종료 private static final int MSG_TIMER_EXPIRED = 1; private static final int BACK_TIMEOUT= 2000; private boolean mIsBackKeyPressed= false; private long mCurrentTimeInMillis= 0; @Override public void onBackPressed() { if(mIsBackKeyPressed ..
- Total
- Today
- Yesterday
- Android
- 스위프트
- Swift
- 뉴스룸
- mysql
- IOS
- 손석희
- CentOS
- Kotlin
- php
- 깃헙
- 노드
- git hub
- Node
- linux
- GIT
- C언어
- C
- 리눅스
- BBC 가쉽
- 안드로이드
- Phaser
- 앵커브리핑
- 배열
- Asterisk
- 점유율
- node.js
- nodejs
- 서버
- xcode
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |