ScrollView의 높이를 점차적으로 높이는 프로세스가 런타임에 있습니까? 내 의도는 점차적으로 ScrollView 내에있는 이미지를 보여주는 것입니다. 그래서 ScrollView의 높이를 높이고 싶습니다. 내 일을 할 수있는 방법이 있습니까 ?? 제발 도와주세요 내 XMLFILE의 out.Content은 다음과 같습니다ScrollView 내에서 점진적으로 이미지를 표시하는 방법은 무엇입니까?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rootLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:scrollbars="none"
android:layout_x="0dp"
android:layout_y="0dp"
android:fillViewport="true" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="0dp"
android:layout_y="0dp"
android:src="@drawable/background" />
</LinearLayout>
</ScrollView>
</LinearLayout>
내 코드는 다음과 같습니다
흐리게 이미지에서 함께 : 여기
final Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
runOnUiThread(new Runnable()
{
public void run() {
secondCounter++;
yourNewHeight += 10;
// sv is object of scroll view
sv.getLayoutParams().height = yourNewHeight;
root.invalidate(); // root is rootview
if(secondCounter == 20){
timer.cancel();
}
}
});
}
}, delay, period);
내 스크린 샷 ScrollView의 높이와 ScrollView의 높이가 흐리게 표시된 이미지를 점차 보여주고 있습니다.
이미지를 프로그램 적으로 더 추가 하시겠습니까 ?? – AkashG
no. 이미 scrollView에있는 하나의 이미지 만. – Amitabha
pls 내게 당신이 보여주고 싶은 것을 분명히 해두는 이유는 오직 하나의 이미지가 있기 때문입니다. – AkashG