在我的應用程序中,我想滾動TextView到ImageView,但是在我的XML Design中,ImageView背後的TextView滾動,如何滾動ImageView上的TextView,請給我解決方案。Textview在Imageview後面滾動
這是我的XML代碼。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"`enter code here`
android:layout_height="match_parent"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/frame"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/article_image"
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_gravity="top"
android:scaleType="fitXY"
android:src="@drawable/garden"/>
<TextView
android:id="@+id/image_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#77000000"
android:gravity="center|bottom"
android:padding="8dp"/>
</RelativeLayout>
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/frame">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#77000000">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp" >
<TextView
android:id="@+id/article_body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:text="A good practice to bring the best performance
for android application is to make sure your main thread does
the minimum amount of work. Any long running tasks or heavy
operations are usually performed in a different thread.
Typical long running tasks could be network operations,
reading files form memory, animations, etc. In this article,
we will create a simple asynchronous ListView in Android.
ListView with thumbnails thumbnails on each row
(as shows in the image below) will be loaded asynchronously
form server. We will populate a ListView with thumbnail images
downloaded from the internet using a AsyncTask.A good practice to bring the best performance
for android application is to make sure your main thread does
the minimum amount of work. Any long running tasks or heavy
operations are usually performed in a different thread.
Typical long running tasks could be network operations,
reading files form memory, animations, etc. In this article,
we will create a simple asynchronous ListView in Android.
ListView with thumbnails thumbnails on each row
(as shows in the image below) will be loaded asynchronously
form server. We will populate a ListView with thumbnail images
downloaded from the internet using a AsyncTask." />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</RelativeLayout>
我不想使用圖像作爲佈局的背景,我想滾動textview在Imageview上像「脈衝應用程序」在android – Maheswaran
http://stackoverflow.com/questions/20717445/textview-scroll -on-imageview-like-pulse-app-scroll/20717812?noredirect = 1#20717812 – Maheswaran
請參閱上面的鏈接,我需要爲此解決方案 – Maheswaran