怎么添加滚条,
                 	
                        发表在Android图书答疑
                        2015-11-03                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                        设置时间:
                        非永久
                        永久            
                    
                    
                           起始时间:
                           结束时间:
                        
                    
                        是否扣分:
                        是
                        否
                    
                    
                    
                    
                
                                           老师,你好,我请问下怎么添加滚条 ,图片已经上传        
                
        	
        
        
    精彩评论 11
            2015-11-04
                   
                   
                   
                        4L
                    
   
                   
                                                             [FIELDSET][LEGEND]引自:3楼[/LEGEND]
对于这个内容书中没有具体的介绍,不过在第14章的实例14.1和实例14.2中都有应用,您可以看一这两个实例的代码。
[/FIELDSET]
回复:
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
            
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button"
android:textColor="@android:color/black" />
<Button
android:id="@+id/button"
android:onClick="bClick"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button2"
</LinearLayout>
</ScrollView>
</HorizontalScrollView>
老师,你看下我的代码,我把宽度调大了,怎么显示宽度还是小的,图片已经上传,老师看下
                
            对于这个内容书中没有具体的介绍,不过在第14章的实例14.1和实例14.2中都有应用,您可以看一这两个实例的代码。
[/FIELDSET]
回复:
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button"
android:textColor="@android:color/black" />
<Button
android:id="@+id/button"
android:onClick="bClick"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/button2"
</LinearLayout>
</ScrollView>
</HorizontalScrollView>
老师,你看下我的代码,我把宽度调大了,怎么显示宽度还是小的,图片已经上传,老师看下

	
                                                
购物车
发表新帖
立即签到
                    
                






