Android Open Source - SwitchTabs Hotel






From Project

Back to project page SwitchTabs.

License

The source code is released under:

Apache License

If you think the Android project SwitchTabs listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.normal.testdemo.beans;
/*w  w w  .j a va 2s .  c  om*/
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ex_chenjinghao on 2014/4/8.
 * ????????????Parcelable???????????
 */
public class Hotel implements Parcelable{
  private String thumbnail;
  private String name;
  private String street_address;
  private String nightly_rate;

  public Hotel(String thumbnail, String name, String street_address, String nightly_rate) {
    this.thumbnail = thumbnail;
    this.name = name;
    this.street_address = street_address;
    this.nightly_rate = nightly_rate;
  }

  public String getThumbnail() {
    return thumbnail;
  }

  public void setThumbnail(String thumbnail) {
    this.thumbnail = thumbnail;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getStreet_address() {
    return street_address;
  }

  public void setStreet_address(String street_address) {
    this.street_address = street_address;
  }

  public String getNightly_rate() {
    return nightly_rate;
  }

  public void setNightly_rate(String nightly_rate) {
    this.nightly_rate = nightly_rate;
  }

  // ?????Parcel??????~~~?????????????
  // ??????0
  @Override
  public int describeContents() {
    return 0;
  }

  // ???????????
  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(thumbnail);
    dest.writeString(name);
    dest.writeString(street_address);
    dest.writeString(nightly_rate);
  }

  // ???????????
  public static final Parcelable.Creator<Hotel> CREATOR = new Parcelable.Creator<Hotel>() {

    public Hotel createFromParcel(Parcel in) {
      return new Hotel(in.readString(), in.readString(), in.readString(), in.readString());
    }

    public Hotel[] newArray(int size) {
      return new Hotel[size];
    }
  };
}




Java Source Code List

com.normal.testdemo.activitys.MainActivity.java
com.normal.testdemo.activitys.SplashActivity.java
com.normal.testdemo.adapters.HotelListAdapter.java
com.normal.testdemo.adapters.SectionsPagerAdapter.java
com.normal.testdemo.beans.Hotel.java
com.normal.testdemo.beans.Hotels.java
com.normal.testdemo.fragments.PlaceholderFragment.java
com.normal.testdemo.utils.AsynImageLoader.java
com.normal.testdemo.utils.Utils.java
com.normal.testdemo.view.XListViewFooter.java
com.normal.testdemo.view.XListViewHeader.java
com.normal.testdemo.view.XListView.java