Je voudrais que le scrollview défile, mais pas l'image dans son arrière-plan.Comment mettre un fond d'image fixe pour ScrollView?
2
A
Répondre
2
Un exemple serait:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_image"
android:orientation="vertical">
<ListView
android:id="@+id/category_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="@android:color/transparent"/>
<TextView
android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
Ici, le LinearLayout détient l'image backround. La liste sera affichée au dessus avec un fond transparent. Pour plus d'informations sur ce sujet jetez un oeil à ListView Backgrounds
6
Ajouter l'image plus haut dans la hiérarchie d'affichage avant de votre cadre de scrollviews
Je suis désolé: votre réponse m'aider aussi, mais j'ai seulement une "réponse acceptée". Planty de merci à vous :-) – Istao