你好,游客 登录 注册 搜索
背景:
阅读新闻

Android 应用开发笔记 - 拖动效果(Gallery)

[日期:2012-09-15] 来源:Linux社区  作者:xiaobin_hlj80 [字体:大 中 小]

新建一View,清单如下:

view_gallery.xml

  1. <LinearLayout xmlns:Android="http://schemas.android.com/apk/res/android"  
  2.     xmlns:tools="http://schemas.android.com/tools"  
  3.     android:orientation="vertical"  
  4.     android:layout_width="fill_parent"  
  5.     android:layout_height="fill_parent" >  
  6.       
  7. </LinearLayout>  
在面板拖拽图标,然后更改相关属性(Properties),如下:
  1. <Gallery  
  2.         android:id="@+id/gallery02"  
  3.         android:layout_width="fill_parent"  
  4.         android:layout_height="wrap_content"   
  5.         android:layout_marginTop="30dp"/>  

添加一按钮,如下:

  1. <Button  
  2.         android:id="@+id/btnReturn"  
  3.         android:layout_width="wrap_content"  
  4.         android:layout_height="wrap_content"  
  5.         android:layout_marginTop="166dp"  
  6.         android:text="@string/btn1Caption" />  
整体布局效果如下:

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款