-
Notifications
You must be signed in to change notification settings - Fork 0
/
RestaurantMainActivity.java
38 lines (31 loc) · 1.41 KB
/
RestaurantMainActivity.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.wolt.fissha.restaurantopeninghours;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import static android.content.ContentValues.TAG;
public class RestaurantMainActivity extends AppCompatActivity {
private RestaurantWorkingHoursParser restaurantWorkingHoursParser;
ArrayList<HashMap<String, String>> parsedOpeninghoursArrayList;
private ListView lv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
restaurantWorkingHoursParser = new RestaurantWorkingHoursParser(getApplicationContext());
parsedOpeninghoursArrayList = new ArrayList<HashMap<String, String>>();
parsedOpeninghoursArrayList = restaurantWorkingHoursParser.getParsedItems();
setContentView(R.layout.activity_restaurant_main);
lv = (ListView) findViewById(R.id.list);
ListAdapter adapter = new SimpleAdapter(RestaurantMainActivity.this, parsedOpeninghoursArrayList,
R.layout.list_item, new String[] {"status"},
new int[]{R.id.status});
lv.setAdapter(adapter);
}
}