long time = properties.getLong("time");
private long mTimeInMilliseconds;
public Earthquake(String magnitude, String location, long timeInMilliseconds){ mMagnitude = magnitude; mLocation = location; mTimeInMilliseconds = timeInMilliseconds; }
in earthquake_list_item.xml;
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:padding="16dp"> <TextView android:id="@+id/magnitude" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" tools:text="8.9" /> <TextView android:id="@+id/location" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" tools:text="San Francisco, CA" /> <TextView android:id="@+id/date" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" tools:text="Mar 6, 2010" /> <TextView android:id="@+id/time" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" tools:text="3.00 PM" /> </LinearLayout>