2015년 12월 10일 목요일

[android]사용자 정의 객체를 xml 에 지정하기

public class BackButtonFocusOutEditText extends EditText {

/*private OnBackPressListener _listener;*/



public BackButtonFocusOutEditText(Context context, AttributeSet attrs) {

super(context, attrs);
// TODO Auto-generated constructor stub
}


EditText 객체를 생성하고 생성자를 AttributeSet 인자를 받는거로 셋팅하고




<home.et.AutoCallManager.BackButtonFocusOutEditText android:id="@+id/edit_phone_name_edt"
            android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:hint="@string/edit_phone_name_edt"
        android:inputType="text"
        android:layout_weight="20"/>

위와 같은방법으로 작성하면 된다.

댓글 없음:

댓글 쓰기

[springboot]실제 JWT 발급 및 검증 구현

실제 JWT 발급 및 검증 구현 이전 단계에서 만든 임시 토큰을 실제 암호화된 JWT(JSON Web Token)로 대체하고, Spring Security 필터를 통해 API 요청을 보호하는 방법을 구현합니다. Part 1: 백엔드 (Spring ...