보기에 파란색 막대가 표시되도록하려고하지만 목록에 표시 할 수 없습니다. 참고 목록보기보기가 RelativeLayout에 표시되지 않음
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white">
<LinearLayout
android:id="@+id/list_img_ll"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/imgList1"
android:layout_width="wrap_content"
android:layout_height="80dp"
/>
</LinearLayout>
<View android:id="@+id/state_open"
android:layout_alignParentRight="true"
android:layout_width="20dp"
android:layout_height="match_parent"
android:background="@color/CVBlue" />
</RelativeLayout>
의 getView() 메소드
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
RecordHolder holder = null;
if (row == null) {
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
row = inflater.inflate(layoutResourceId, parent, false);
holder = new RecordHolder();
holder.imageItem = (ImageView) row.findViewById(R.id.imgList1);
holder.stateView = row.findViewById(R.id.state_open);
row.setTag(holder);
} else {
holder = (RecordHolder) row.getTag();
}
Item item = data.get(position);
holder.imageItem.setImageBitmap(item.getImage());
return row;
}
이 결과를 나중에 생성하면서 화상을 설정한다. 생성하려고 시도하지만 작동하지 않는 것 같습니다 오른쪽 상단 모서리에 유의하십시오. 또한 내가 relativelayout의 높이를 설정할 때 작동하고 매우 혼란 스럽습니다. 작업 하나도 http://i.stack.imgur.com/xAlpg.png
이의 이미지는 RelativeLayout의 크기 http://i.stack.imgur.com/SCRTu.png
더 나은 질문을 설명해주십시오, 당신의 프로그램에 문제가 있는지 몰라, 내가 오른쪽 상단에 생성 된 이미지에 어떤 문제가 있는지 이해가 안 돼요. – NebulaeGuy
나쁜 설명에 대해 유감스럽게 생각합니다. 이미 원하는 이미지를 게시했습니다. @NebulaeGuy – IndyZa