Back to project page DEVIEW2014_AndroidApp_Demo.
The source code is released under:
Apache License
If you think the Android project DEVIEW2014_AndroidApp_Demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nhn.android.deview.dao.program; /* w ww . j a v a 2 s . co m*/ import java.lang.reflect.Field; import java.util.Vector; import org.json.JSONObject; import android.content.pm.FeatureInfo; import com.nhn.android.deview.core.connector.DataField; public class ProgramTrack { @DataField public int seq; @DataField public int episodeSeq; @DataField public String name; @DataField public int order; public ProgramTrack(JSONObject track) { try { Field[] fields = ProgramTrack.class.getFields(); for(Field field: fields) { String sname = field.getType().getSimpleName(); String name = field.getName(); if (sname.equals("String") == true) { String value = track.getString(name); field.set(this, value); } if (sname.equals("int") == true) { field.setInt(this, track.getInt(name)); } } } catch(Exception e) { e.printStackTrace(); } } public Vector<ProgramData> mTimeTable = new Vector<ProgramData>(); public Vector<ProgramData> getTrack(int trackId) { return mTimeTable; } public boolean hasProgmList() { return mTimeTable.size() > 0; } }