Skip to content
This repository was archived by the owner on Apr 20, 2019. It is now read-only.

final #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ListViewActivity"
android:windowSoftInputMode="adjustPan" />
<activity android:name=".NetworkActivity" />
<activity android:name=".JSONActivity" />
<activity android:name=".NotificationActivity" />

<activity
android:name=".PaceCalculatorActivity"
android:label="@string/title_activity_pace_calculator"
Expand Down
319 changes: 319 additions & 0 deletions src/main/java/nyc/c4q/Book.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
package nyc.c4q;

import com.google.gson.annotations.Expose;

/**
* Created by c4q-ac35 on 8/30/15.
*/
public class Book {
@Expose
private Integer id;
@Expose
private String title;
@Expose
private String author;
@Expose
private String isbn;
@Expose
private String isbn13;
@Expose
private String publisher;
@Expose
private Integer publishyear;
@Expose
private Boolean checkedout;
@Expose
private Integer checkedoutby;
@Expose
private Integer checkoutdateyear;
@Expose
private Integer checkoutdatemonth;
@Expose
private Integer checkoutdateday;
@Expose
private Integer duedateyear;
@Expose
private Integer duedatemonth;
@Expose
private Integer duedateday;

/**
*
* @return
* The id
*/
public Integer getId() {
return id;
}

/**
*
* @param id
* The id
*/
public void setId(Integer id) {
this.id = id;
}


/**
*
* @return
* The title
*/
public String getTitle() {
return title;
}

/**
*
* @param title
* The title
*/
public void setTitle(String title) {
this.title = title;
}


/**
*
* @return
* The author
*/
public String getAuthor() {
return author;
}

/**
*
* @param author
* The author
*/
public void setAuthor(String author) {
this.author = author;
}


/**
*
* @return
* The isbn
*/
public String getIsbn() {
return isbn;
}

/**
*
* @param isbn
* The isbn
*/
public void setIsbn(String isbn) {
this.isbn = isbn;
}


/**
*
* @return
* The isbn13
*/
public String getIsbn13() {
return isbn13;
}

/**
*
* @param isbn13
* The isbn13
*/
public void setIsbn13(String isbn13) {
this.isbn13 = isbn13;
}


/**
*
* @return
* The publisher
*/
public String getPublisher() {
return publisher;
}

/**
*
* @param publisher
* The publisher
*/
public void setPublisher(String publisher) {
this.publisher = publisher;
}

/**
*
* @return
* The publishyear
*/
public Integer getPublishyear() {
return publishyear;
}

/**
*
* @param publishyear
* The publishyear
*/
public void setPublishyear(Integer publishyear) {
this.publishyear = publishyear;
}


/**
*
* @return
* The checkedout
*/
public Boolean getCheckedout() {
return checkedout;
}

/**
*
* @param checkedout
* The checkedout
*/
public void setCheckedout(Boolean checkedout) {
this.checkedout = checkedout;
}


/**
*
* @return
* The checkedoutby
*/
public Integer getCheckedoutby() {
return checkedoutby;
}

/**
*
* @param checkedoutby
* The checkedoutby
*/
public void setCheckedoutby(Integer checkedoutby) {
this.checkedoutby = checkedoutby;
}


/**
*
* @return
* The checkoutdateyear
*/
public Integer getCheckoutdateyear() {
return checkoutdateyear;
}

/**
*
* @param checkoutdateyear
* The checkoutdateyear
*/
public void setCheckoutdateyear(Integer checkoutdateyear) {
this.checkoutdateyear = checkoutdateyear;
}


/**
*
* @return
* The checkoutdatemonth
*/
public Integer getCheckoutdatemonth() {
return checkoutdatemonth;
}

/**
*
* @param checkoutdatemonth
* The checkoutdatemonth
*/
public void setCheckoutdatemonth(Integer checkoutdatemonth) {
this.checkoutdatemonth = checkoutdatemonth;
}

/**
*
* @return
* The checkoutdateday
*/
public Integer getCheckoutdateday() {
return checkoutdateday;
}

/**
*
* @param checkoutdateday
* The checkoutdateday
*/
public void setCheckoutdateday(Integer checkoutdateday) {
this.checkoutdateday = checkoutdateday;
}

/**
*
* @return
* The duedateyear
*/
public Integer getDuedateyear() {
return duedateyear;
}

/**
*
* @param duedateyear
* The duedateyear
*/
public void setDuedateyear(Integer duedateyear) {
this.duedateyear = duedateyear;
}

/**
*
* @return
* The duedatemonth
*/
public Integer getDuedatemonth() {
return duedatemonth;
}

/**
*
* @param duedatemonth
* The duedatemonth
*/
public void setDuedatemonth(Integer duedatemonth) {
this.duedatemonth = duedatemonth;
}

/**
*
* @return
* The duedateday
*/
public Integer getDuedateday() {
return duedateday;
}

/**
*
* @param duedateday
* The duedateday
*/
public void setDuedateday(Integer duedateday) {
this.duedateday = duedateday;
}

}
56 changes: 56 additions & 0 deletions src/main/java/nyc/c4q/CustomListAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package nyc.c4q;

import android.content.ClipData;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;


/**
* Created by c4q-ac35 on 8/30/15.
*/
public class CustomListAdapter extends ArrayAdapter {

private ArrayList<Person> objects;


public CustomListAdapter(Context context, int resource, ArrayList<Person> objects) {
super(context, resource, objects);
this.objects = objects;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;

if (v == null){
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = inflater.inflate(R.layout.listitem_member,null);
}

Person i = objects.get(position);

if(i != null){
TextView name = (TextView) v.findViewById(R.id.text_name);
TextView house = (TextView) v.findViewById(R.id.text_house);

if(name != null){
name.setText(i.getFirstName() + "," + i.getLastName());
}
if(house != null){
house.setText(i.getHouse().toString());
}
}
return v;

}
}
Loading