当前位置: 首页 > news >正文

app设计毕业论文seo推广如何做

app设计毕业论文,seo推广如何做,个人网站建设模板下载,台州手机模板建站编写界面来显示返回的数据 用户友好性&#xff1a;通过界面设计和用户体验优化&#xff0c;可以使天气信息更易读、易理解和易操作。有效的界面设计可以提高用户满意度并提供更好的交互体验。 增加城市名字的TextView <TextViewandroid:id"id/textViewCityName"…

编写界面来显示返回的数据

用户友好性:通过界面设计和用户体验优化,可以使天气信息更易读、易理解和易操作。有效的界面设计可以提高用户满意度并提供更好的交互体验。

增加城市名字的TextView

    <TextViewandroid:id="@+id/textViewCityName"android:layout_width="wrap_content"android:layout_height="wrap_content"android:width="200dp"android:height="50dp"app:layout_constraintTop_toBottomOf="@+id/buttonSearch"app:layout_constraintStart_toStartOf="parent"app:layout_constraintEnd_toEndOf="parent"android:textSize="20sp"android:gravity="center"/>
  • android:id="@+id/textViewCityName":给 TextView 设置了一个唯一的标识符,以便于在代码中对其进行引用。
  • android:layout_width="wrap_content" android:layout_height="wrap_content":设置 TextView 的宽度和高度分别根据文本内容自动调整。
  • android:width="200dp" android:height="50dp":指定 TextView 的宽度和高度为 200dp 和 50dp。
  • app:layout_constraintTop_toBottomOf="@+id/buttonSearch":将 TextView 的顶部与 id 为 buttonSearch 的视图的底部对齐。
  • app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent":将 TextView 的左侧与父容器的左侧对齐,将 TextView 的右侧与父容器的右侧对齐。
  • android:textSize="20sp":设置 TextView 的文本字体大小为 20sp。
  • android:gravity="center":将文本内容在 TextView 中水平和垂直居中。

增加温度显示部分

    <TextViewandroid:id="@+id/textViewTemperature"android:layout_width="wrap_content"android:layout_height="wrap_content"app:layout_constraintTop_toBottomOf="@+id/textViewCityName"app:layout_constraintStart_toStartOf="parent"app:layout_constraintEnd_toEndOf="parent"android:textSize="30sp"android:gravity="center"/><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"app:layout_constraintTop_toTopOf="@+id/textViewTemperature"app:layout_constraintStart_toEndOf="@id/textViewTemperature"android:text="@string/degree"android:textSize="20sp"android:gravity="center" /><TextViewandroid:id="@+id/textViewMaxMinTemperature"android:layout_width="wrap_content"android:layout_height="wrap_content"app:layout_constraintTop_toBottomOf="@id/textViewTemperature"app:layout_constraintStart_toStartOf="parent"app:layout_constraintEnd_toEndOf="parent"android:textSize="12sp"android:gravity="center" />

增加天气内容

    <TextViewandroid:id="@+id/textViewWeather"android:layout_width="wrap_content"android:layout_height="wrap_content"app:layout_constraintTop_toBottomOf="@id/textViewMaxMinTemperature"app:layout_constraintStart_toStartOf="parent"app:layout_constraintEnd_toEndOf="parent"android:textSize="20sp"android:gravity="center" />

编写逻辑填充数据

    @SuppressLint("SetTextI18n")@Subscribe(threadMode = ThreadMode.MAIN)fun onEvent(event: WeatherResponseEvent) {val weatherResponse = event.weatherResponseval kelvins = 273.15val cityName = weatherResponse.nameval temperature = weatherResponse.main?.temp?.minus(kelvins)val maxTemperature = weatherResponse.main?.temp_max?.minus(kelvins)val minTemperature = weatherResponse.main?.temp_min?.minus(kelvins)findViewById<TextView>(R.id.textViewCityName).text = cityNamefindViewById<TextView>(R.id.textViewTemperature).text = temperature?.toInt().toString()findViewById<TextView>(R.id.textViewMaxMinTemperature).text = "${maxTemperature?.toInt()} / ${minTemperature?.toInt()}"findViewById<TextView>(R.id.textViewWeather).text = "${weatherResponse.weather.first().main} | ${weatherResponse.weather.first().description}"}

最后的效果:

在这里插入图片描述

http://www.tj-hxxt.cn/news/101952.html

相关文章:

  • 南通高端网站建设开发软件推广平台有哪些
  • 福建省人民政府新闻seo网站推广企业
  • iis默认网站启动不了搜索引擎营销的常见方式
  • wordpress修改评论formseo怎么刷排名
  • 做房地产网站建设百度北京总部电话
  • 杭州网站建设设计公司搜索引擎大全
  • wordpress域名授权破解版seo顾问公司
  • 建站abc做的网站稳定网站服务器失去响应
  • 用typecho做的网站西安seo公司哪家好
  • Reviewer WordPressseo搜索引擎排名优化
  • 厦门网站seo快速收录域名
  • 什么网站可下载可做海报的图片chatgpt网站
  • 牡丹江做网站网络科技公司
  • 二手网站建设论文优秀网页设计
  • 找人帮忙做网站网上销售有哪些方法
  • 网站建设对比我要看今日头条
  • 怎么做手机版网站2021年最为成功的营销案例
  • 石家庄网站建设联系电话此网站服务器不在国内维护
  • 广州网站开发公司广州网站设计建设
  • 制作网站开发多少钱甘肃百度推广电话
  • 水泵行业网站怎么做网站建设定制
  • 湖南网站推广优化曼联vs恩波利比分
  • 团队合作网站济南seo网络优化公司
  • 网站建设行业动态培训课程开发
  • 哪些网站是用响应式布局做的互联网推广平台有哪些公司
  • wordpress cms怎么登陆疫情二十条优化措施
  • 上海网站建设设计东莞百度推广排名优化
  • 如何做配送网站域名怎么查
  • 找公司网站建设企业网站制作要求
  • 商赢网站建设南京网站制作设计