Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在scrollview中动态添加ImgeButton_Android_Scrollview - Fatal编程技术网

Android 在scrollview中动态添加ImgeButton

Android 在scrollview中动态添加ImgeButton,android,scrollview,Android,Scrollview,在我的应用程序中,我正在动态地在滚动视图中添加图像按钮。但是我无法查看我的图像按钮。有人能帮忙吗。 这是我的密码-- 这是我的活动_main.xml <ScrollView android:id="@+id/scrollview" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:i

在我的应用程序中,我正在动态地在滚动视图中添加图像按钮。但是我无法查看我的图像按钮。有人能帮忙吗。 这是我的密码--

这是我的活动_main.xml

<ScrollView 
    android:id="@+id/scrollview"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout 
        android:id="@+id/scrollinear"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#FFCC99"
        android:orientation="vertical">
    </LinearLayout> 

</ScrollView>

更改此代码

scrollview=(ScrollView)v.findViewById(R.id.scrollview);
LinearLayout ll =( LinearLayout)v.findViewById(R.id.scrollinear);
scrollview=(ScrollView)v.findViewById(R.id.scrollview);
LinearLayout ll =( LinearLayout)v.findViewById(R.id.scrollinear);