while (input.hasNext()) { // Read each line from the scanner String input = input.next(); // Split data on two delimiters '-' and ':' String[] data = input.split("-|:"); int listNumber = Integer.parseInt(data[0]); String listData1 = data[1]; String listData2 = data[2]; // Add to the datalist datalist.add(new ListData(listNumber, listData1, listData2)); }
for (int i = 0; i < hotTopics.length(); i++) { JSONObject topic = hotTopics.getJSONObject(i).getJSONObject("data"); String author = topic.getString("author"); String imageUrl = topic.getString("thumbnail"); String postTime = topic.getString("created_utc"); String rScore = topic.getString("score"); String title = topic.getString("title"); topicdata.add(new ListData(title, author, imageUrl, postTime, rScore)); Log.v(DEBUG_TAG, topicdata.toString()); }
public void parseJson () { events = new ArrayList<ListData>(); try { object = new JSONObject(jsonString); data = object.getJSONArray("events"); for ( int i = 0; i < data.length(); i++ ) { ListData oneEvent = new ListData(); oneEvent.concertID = data.getJSONObject(i).getString("id"); oneEvent.title = data.getJSONObject(i).getString("title"); oneEvent.description = data.getJSONObject(i).getString("desc"); oneEvent.pic = null; events.add(oneEvent); Log.e("Event", oneEvent.concertID + " " + oneEvent.description + " " + oneEvent.title); } } catch (JSONException exc) { Log.e("log_tag", "Error in parse" + exc.toString()); } }
m_simPhonename = m_simPhonename.replace("|", ""); ListData contact= new ListData(Integer.parseInt(m_id), m_simphoneNo, m_simPhonename, "", "", "", false); arrayList.add(contact);
/** * * @param numbered true if the list should be numbered; false if it should be * bulleted. * @param styleSheet The document's stylesheet. */ public HWPFList(boolean numbered, StyleSheet styleSheet) { _listData = new ListData((int)(Math.random() * System.currentTimeMillis()), numbered); _override = new ListFormatOverride(_listData.getLsid()); _styleSheet = styleSheet; }
public void showCustomList() { mAllLists = new ArrayList<>(); mAllLists = mListTableHelper.getAllList(); final ListData taskList = new ListData(); taskList.setId(100000000); taskList.setTitle("Default List"); mAllLists.add(0, taskList); AlertDialog.Builder builder = new AlertDialog.Builder(AddTaskActivity.this); LayoutInflater inflater = getLayoutInflater(); View convertView = (View) inflater.inflate(R.layout.tablelist, null, false); ListView lv = (ListView) convertView.findViewById(R.id.tableslist); final ListItemAdapter adapter = new ListItemAdapter(AddTaskActivity.this,mAllLists,selectedItem); builder.setAdapter(adapter, null); alertDialog = builder.create(); alertDialog.show(); }
ListData listItem = new ListData();
description = "No Description"; ListData mLog = new ListData(); mLog.setTitle(title); mLog.setDescription(description);
/** * * @param numbered * true if the list should be numbered; false if it should be * bulleted. * @param styleSheet * The document's stylesheet. */ public HWPFList( boolean numbered, StyleSheet styleSheet ) { _listData = new ListData( (int) ( Math.random() * System.currentTimeMillis() ), numbered ); _lfo = new LFO(); _lfo.setLsid( _listData.getLsid() ); _lfoData = new LFOData(); _styleSheet = styleSheet; }
this.setContentView(R.layout.dining); ListData newListItem = new ListData(); ArrayList<ListData> itemObject=null; try {
for (int i = 0; i < title.length; i++) { ListData ld = new ListData(); ld.setTitle(title[i]); ld.setDescription(desc[i]);
ListData listItem = new ListData();
ListData newListItem = new ListData();
public ListTables( byte[] tableStream, final int lstOffset, final int fcPlfLfo, final int lcbPlfLfo ) { /* * The PlfLst structure contains the list formatting information for the * document. -- Page 425 of 621. [MS-DOC] -- v20110315 Word (.doc) * Binary File Format */ int offset = lstOffset; int cLst = LittleEndian.getShort( tableStream, offset ); offset += LittleEndian.SHORT_SIZE; int levelOffset = offset + ( cLst * LSTF.getSize() ); for ( int x = 0; x < cLst; x++ ) { ListData lst = new ListData( tableStream, offset ); _listMap.put( Integer.valueOf( lst.getLsid() ), lst ); offset += LSTF.getSize(); int num = lst.numLevels(); for ( int y = 0; y < num; y++ ) { ListLevel lvl = new ListLevel(); levelOffset += lvl.read( tableStream, levelOffset ); lst.setLevel( y, lvl ); } } this._plfLfo = new PlfLfo( tableStream, fcPlfLfo, lcbPlfLfo ); }
ListData lst = new ListData( tableStream, offset ); _listMap.put( Integer.valueOf( lst.getLsid() ), lst ); offset += LSTF.getSize();