Skip to content
Rahul Pandey edited this page Jun 8, 2013 · 3 revisions

This package contains all the activities dealing with user browsing of ads. At a high level, the user browses their own ads (PersonalAdsActivity) or popular ads (PopularAdsActivity). Since they share a lot of the same functionality, both of these classes inherit from BrowseActivity. Two additional classes exist in this package- ImageAdapter and ImageAdapterPopular- which explain the appearance of ads in the grid. Finally, DisplayAd encapsulates the information of an ad, it is in charge of parsing the JSON response from the server.

BrowseActivity

This is the subclass for both Personal Ads and Popular Ads. The grid layout and behavior upon clicking an ad is same for both activities. The grid has 2 columns, and the image url fetched from the server uses a library called UniversalImageLoader to load images. Caching is enabled. The navigation menu is shared for this "home screen", and logout options are shared.

PersonalAdsActivity

A user can see their own ads. Their profile picture and name appears at the top, along all ads they've created.

PopularAdsActivity

The most popular ads on the site. The order of images is the order of images fetched form the server response.

FullImageActivity

This is the activity for viewing an ad in full-screen mode (where the notification bar and menu options are removed). The margins are used to show information about the ad, things like company/user info, number of votes, and the ability to up-vote each ad.

Planned Features

  • Ability to filter ads by specific criteria, such as date, number votes, or people you follow.
  • More personalization using Facebook, maybe showing them ads created by their friends.
Clone this wiki locally