赞
踩
随着移动通信技术的发展和无线数据业务的进步,手机已被赋予了通话意外的其他许多功能。
本设计使用安卓 Android studio 设计技术开发了一种运用在 android 系统上的手机天气预报软件系统,本系统通过选择城市来获得天气,空气指数、气温等信息。基于手机的天气预报系统软件可以使用户对于各个天气预报情况的实时掌握,极大的方便了用户的出行和行程安排,避免了不必要的麻烦,具有很强的实用性。
关键词:Android studio、安卓、天气预报系统、天气预报
天气是能决定许多人一天情绪和日常关注的问题,在以前,许多因为突如其来的坏天气而让农作物被毁,以及在晴天时晾晒衣物,却被突如其来的磅礴大雨全部打湿。所以一款准确的天气预报的程序是非常需要的,“Weather Of Gu” app,是一款能够实时预知天气,以及预知未来天气的app,因本人姓氏原因,所以将软件命名为:“Weather Of Gu”。
根据当下年轻人的风格,程序使用相对青春的设计思路,大部分由ICON矢量图实现,界面简洁但又不能失去功能的完整性。
编写软件:Android studio
使用技术:Java,xml,和风天气官方 API 接口,JSON
XML
- <?xml version="1.0" encoding="utf-8"?>
- <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/imag3"
- tools:context=".activity.MainActivity">
-
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <TextView
- android:gravity="center"
- android:text="Weather Of Gu"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
- </LinearLayout>
-
-
- </FrameLayout>
和风天气官网
Xml代码:
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".activity.WeatherActivity"
- android:background="@drawable/img1">
-
-
- <ImageView
- android:id="@+id/bing_pic_img"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop" />
-
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/view_pager_weather"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="55dp">
- </androidx.viewpager.widget.ViewPager>
-
-
- <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ScrollView
- android:id="@+id/weather_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:overScrollMode="never"
- android:scrollbars="none">
-
- <LinearLayout
-
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:fitsSystemWindows="true"
- android:orientation="vertical">
-
- <include layout="@layout/title" />
- <!-- <include layout="@layout/title" />-->
-
- <include layout="@layout/now" />
-
-
- <include layout="@layout/aqi" />
-
-
- <include layout="@layout/forecast" />
-
- <include layout="@layout/suggestion" />
-
- </LinearLayout>
-
- </ScrollView>
-
- </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
- <LinearLayout
- android:id="@+id/ll_round"
- android:layout_width="match_parent"
- android:layout_height="4dp"
- android:layout_marginBottom="7dp"
- android:orientation="horizontal"
- android:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。