赞
踩
1、新建一个模拟太阳的drawable资源(sun.xml):
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android=“http://schemas.android.com/apk/res/android”
android:shape=“oval”>
2、建立布局文件构建整个场景(fragment_sunset.xml):
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:orientation=“vertical”
android:layout_width=“match_parent”
android:layout_height=“match_parent”>
<FrameLayout
android:id="@+id/sky"
android:layout_width=“match_parent”
android:layout_height=“0dp”
android:layout_weight=“0.61”
android:background="@color/blue_sky">
<ImageView
android:id="@+id/sun"
android:layout_width=“100dp”
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。