각 col에 들어가는 데이터는 일정하지 않을 때, up/down key사용시 focus를 잃을 때가 종종 있습니다.

 

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="0dp"
android:layout_height="@dimen/schedule_element_height"
android:layout_toRightOf="@id/channel_group" >

<ImageView
android:id="@+id/schedule_program_element_line"
android:layout_width="2dp"
android:layout_height="41dp"
android:layout_marginTop="1dp"
android:scaleType="fitXY"
android:src="@drawable/img_line_timetable_v"/>

<com.tving.ui.TextViewPlus
android:id="@+id/schedule_program_element_title"
style="@style/nanumgothicB"
android:layout_width="wrap_content"
android:layout_height="17dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="13dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:textSize="16sp"
android:textColor="@color/subfont"/>

<ImageView
android:id="@+id/imageView2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/b_schedule_focus" />
</RelativeLayout>

 

 

사용한 xml은 위와같고 focus가 갔을 때 , imageview의 그림이 표시됩니다.

소스에서

@Override
public void onFocusChange(View view, boolean isfocus)

 

이렇게 오버라이드 하여 사용하지만, 포커스를 잃었을 때는 저 부분을 타지 않는데, 어떻게 하면 포커스를 임의로 정의 해 줄 수 있을까요?

하나의 relativelayout이 연속적으로 그려지기 때문에 id값으로 nextleftfocus/nextrightfocus 사용할 수 없습니다.

 

고수님들, 좋은 방법이 없을 까요?????