从今天开始写博客了
2013-07-30 18:57
218 查看
最近一直在想自己的职业规划,可能程序员不适合女生做,但是我却很喜欢现在的工作。也梦想着哪天成为一个designer.....
所以为了成为一个优秀的程序员,我开始写博客。
这段时间学了很多东西,但是都没有好好总结,我知道一个不知道总结的程序员是不会成为一个优秀的程序员的。
今天先总结一点吧,以后慢慢补充。如下图:
实现的是返回按钮位于上层,我最初的想法是利用framelayout,将按钮图片放在上层,后来发现实现很艰难,后来看到同事的代码,发现使用relativelayout还不错。代码如下:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="@null" >
<LinearLayout
android:id="@+id/llCooperationRoot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/banner_cooporation" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shadow_banner_bottom" />
</LinearLayout>
</ScrollView>
<include layout="@layout/layout_btn_back"/>
</RelativeLayout>
其中返回按钮图片包含在layout_btn_back.xml文件中,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ib_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_return"
android:background="@null"
android:layout_margin="10dp"
android:layout_alignParentBottom="true"/>
所以为了成为一个优秀的程序员,我开始写博客。
这段时间学了很多东西,但是都没有好好总结,我知道一个不知道总结的程序员是不会成为一个优秀的程序员的。
今天先总结一点吧,以后慢慢补充。如下图:
实现的是返回按钮位于上层,我最初的想法是利用framelayout,将按钮图片放在上层,后来发现实现很艰难,后来看到同事的代码,发现使用relativelayout还不错。代码如下:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="@null" >
<LinearLayout
android:id="@+id/llCooperationRoot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/banner_cooporation" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shadow_banner_bottom" />
</LinearLayout>
</ScrollView>
<include layout="@layout/layout_btn_back"/>
</RelativeLayout>
其中返回按钮图片包含在layout_btn_back.xml文件中,代码如下:
<?xml version="1.0" encoding="utf-8"?>
<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ib_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_return"
android:background="@null"
android:layout_margin="10dp"
android:layout_alignParentBottom="true"/>
相关文章推荐
- 从今天(2017/11/02)开始,我的CSDN博客就正式开通了!
- 今天开始学习Android开发,开始写写博客,记录学习的点点滴滴。
- 博客更新,从今天开始
- 今天开始博客了!
- 今天开始写博客
- 从今天开始,开始写博客
- 从今天开始写博客
- 今天开始写博客
- 今天开始写这个博客
- (今天是第一天开始写博客)写一下java集合类使用中容易出现的错误,慢慢积累
- 从今天开始,每周至少一篇博客吧
- 今天开始,我也开始写博客啦~~~
- 今天开始在csdn写博客了,记录下自己趟过的坑~
- 今天开始写博客
- 今天开始进驻CSDN博客,记录自己unity3d学习的每一步。
- 今天我开始正式开始我的博客
- 今天开始写博客
- 从今天起开始认认真真的写博客
- 今天开始写技术博客,聊技术,聊梦想,共同成长!
- 今天开始我的CSDN博客生活