기술참고자료/Android | 2011. 5. 6. 14:09
<?xml version="1.0" encoding="utf-8"?>MainActivity.java
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText
android:id="@+id/test"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text=""
android:inputType=""
/>
</LinearLayout>
package com.vartist;저도 몰랐는데, 볼드체 적용된 코드중에 두번째 라인을 적용해주지 않으면 패스워드타입이 적용되지 않는군요.
import android.app.Activity;
import android.os.Bundle;
import android.text.InputType;
import android.text.method.PasswordTransformationMethod;
import android.widget.EditText;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
EditText myEditText = (EditText) findViewById(R.id.test);
myEditText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
myEditText.setTransformationMethod(new PasswordTransformationMethod());
}
}
[Android] EditText 정규식으로 한글제한 체크하기 (2) | 2011.05.06 |
---|---|
[Android] WebView 연습 (0) | 2011.05.06 |
[Android] 로그캣(logcat) 한글출력 (0) | 2011.05.06 |
[Android] Custom ProgressBar - 프로그래스바 모양 변경 (1) | 2011.05.06 |
[Android] BroadcastReceiver 샘플테스트 (0) | 2011.05.06 |
Recent Comments