您的位置:首页 > 移动开发 > Android开发

Android开发之ImageView文本组件的…

2013-12-30 20:37 127 查看




1,将我们的图片复制到res下边的drawable-hdpi文件夹下边

2,修改res下边的layout下边的xml文件

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
   
xmlns:tools="http://schemas.android.com/tools"
   
android:layout_width="match_parent"
   
android:layout_height="match_parent"
   
tools:context=".MainActivity" >

   
<TextView
     
  android:layout_width="wrap_content"
     
  android:layout_height="wrap_content"
     
  android:layout_marginTop="10px"
     
  android:text="图片视图引用" />
<ImageView 
  
 android:id="@+id/img1"
  
 android:layout_width="wrap_content"
  
 android:layout_height="wrap_content"
  
 android:layout_marginTop="30px"
  
 android:maxHeight="50px"
  
 android:maxWidth="50px" 
    
  
 android:src="@drawable/view"/>
</RelativeLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐