X
xben89
Neues Mitglied
- 0
Hallo zusammen,
der Titel beschreibt meine vorliegende Problematik. Meine xml sieht folgendermaßen aus:
mein simpleadapter aufruf sieht folgendermaßen aus:
Ich vermute das Problem ist ,dass die Buttons im selben Layout sind und so jedes mal neu aufgerufen werden. Aber ich weiß nicht, wie ich das lösen soll?
Gruß,
Benny
der Titel beschreibt meine vorliegende Problematik. Meine xml sieht folgendermaßen aus:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<HorizontalScrollView
android:id="@+id/my_scrollview"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:scrollbars="none"
>
<LinearLayout android:orientation="horizontal" android:layout_width="wrap_content" android:id="@+id/LinearLayout01" android:layout_height="wrap_content">
<Button android:text="@string/home" android:drawableTop="@drawable/back_home" android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/repoHome"></Button>
<Button android:text="@string/back" android:drawableTop="@drawable/back_icon" android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/repoBack"></Button>
<Button android:text="@string/refresh" android:drawableTop="@drawable/refresh_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/repoRefresh"></Button>
</LinearLayout>
</HorizontalScrollView>
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:id="@+id/linearLayout1" android:layout_height="fill_parent">
<ImageView android:id="@+id/img" android:layout_width="wrap_content" android:layout_margin="5px" android:layout_height="wrap_content"></ImageView>
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:id="@+id/linearLayout2" android:layout_height="wrap_content">
<TextView android:textSize="16sp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/childrenFolderTitle" android:text="FolderName"></TextView>
<TextView android:textSize="10sp" android:textStyle="bold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/author" android:text="Author"></TextView>
</LinearLayout>
</LinearLayout>
</LinearLayout>
mein simpleadapter aufruf sieht folgendermaßen aus:
Code:
adapter = new SimpleAdapter(this, ServiceDocumentFolder.getDataForView(
entry, idFolder, idDocument), R.layout.children_folder,
new String[] { "title", "author", "img" },
new int[] { R.id.childrenFolderTitle, R.id.author, R.id.img });
Ich vermute das Problem ist ,dass die Buttons im selben Layout sind und so jedes mal neu aufgerufen werden. Aber ich weiß nicht, wie ich das lösen soll?
Gruß,
Benny