RecyclerView

进行中 已发布的 6 年前 货到付款
进行中

1. Write a basic app to display dummy weather data

This repository contains an initial template for an Android app. Currently, the app contains one empty activity. Your job in this assignment is to modify this activity as follows:

Create an array of String objects and initialize it with some dummy weather forecast data. Each string can look something like this:

Wed April 12 - Sunny and Warm - 75F

It's not super important how many weather strings you create, but it should be enough that, if you printed all of the strings on the screen (with some whitespace between), you'd have to scroll to see them all.

Use RecyclerView to display the strings in your weather forecast data array in a vertical list on the screen. To accomplish this, you'll need to do the following:

Add a RecyclerView widget to the main activity's layout.

Create a new layout to represent a single day's weather forecast. This can be simple, containing only a TextView to hold the weather forecast string. You can also add a View to create a border between elements in the list.

Write a class that extends RecyclerView.Adapter. Within this class, you will:

Implement an inner class that extends RecyclerView.ViewHolder. Objects of this class will represent individual items in your forecast list.

Write methods to bind weather forecast strings from your array to your view holder objects. These methods will be used to make sure the list stays up to date as the user scrolls.

Within your main activity's onCreate() method, create a new layout manager and connect it to the RecyclerView, and create a new object of your adapter class and attach that to the RecyclerView.

To approach this problem, it might make sense to first just get your weather forecast strings to display and scroll on the screen without the RecyclerView. Then, once you get that working, start working on implementing the RecyclerView.

2. Handle user clicks on items in the weather list

Finally, you should add functionality to your app to handle user clicks on weather forecast elements in your RecyclerView:

Create a second array of String objects of the same length as your dummy forecast data array. In this array, you should add slightly more detailed dummy weather forecast data matching the data in the first array. The idea here is that these strings will be the detailed forecasts corresponding to the brief forecasts in the first array. For example, a more detailed string corresponding to the one above might look like this:

Cloudless and generally warm, with a high of 75F and a low of 57F. Some high clouds late in the day.

Modify your main activity and adapter class so that, when the user clicks on one of the weather forecast elements in your list, a Toast containing the corresponding detailed forecast is displayed. Make sure to implement this so that you cancel any existing Toast before displaying a new one each time the user clicks.

安卓 HTML5 Java JavaScript 移动应用开发

项目ID: #16184700

关于项目

13个方案 远程项目 活跃的6 年前

有13名威客正在参与此工作的竞标,均价$19/小时

leadconcept

Happy New Year 2018! I have read everything & understood the scope of this project. I have also discussed with my technical team lead to make sure that there are no issues, so we are good to go & ready to start this 更多

$22 USD / 小时
(42条评论)
8.7
neetusisodia

A proposal has not yet been provided

$16 USD / 小时
(2条评论)
2.6
sowrabhnayak

I am an experienced Android developer familiar with various APIs. I have used Recycler views and custom adapters to populate them . I deliver quick and quality results. Thank you

$16 USD / 小时
(1条评论)
1.0
techzspace555

Hello Sir,Good Day, I'm Professional programmer with 5+ years of experience and recently started freelance,I'have already done this kind of project before, if you award me, I'll implement all of your requirement in a v 更多

$16 USD / 小时
(0条评论)
0.0
hhsol

Hi, I have 1 year of experience in androod development. I know how to use recycler view as you have mentioned and already worked on a similar project. I hope to hear from you soon.

$16 USD / 小时
(0条评论)
0.0
devrajthakur2047

I can do this please explain this app more so that I can analyze its cost and time better.

$22 USD / 小时
(0条评论)
0.0
gmaahi68

A proposal has not yet been provided

$16 USD / 小时
(0条评论)
0.0
nikhilmisal

Hi, I would like to work on this project. I have used RecyclerView many times in my projects and have handled the Callbacks also. I can complete this project within a day. Please revert if you have any questions. Than 更多

$16 USD / 小时
(0条评论)
2.4