This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.net.Uri; | |
| import com.google.gson.Gson; | |
| import com.google.gson.JsonObject; | |
| import com.google.gson.annotations.Expose; | |
| import com.google.gson.annotations.SerializedName; | |
| public class Character { | |
| @SerializedName(Constants.ID_KEY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Constants { | |
| //URL | |
| public static final String SEARCH_URL = "http://api.eventful.com/json/events/search?app_key=4Q7hC5bJXwHMZ99t&category=art&date=This%Week"; | |
| //JSON keys | |
| public static final String EVENTS_KEY = "events"; | |
| public static final String EVENT_KEY = "event"; | |
| public static final String DATE_KEY = "start_time"; | |
| public static final String DESCRIPTION_KEY = "description"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.os.AsyncTask; | |
| import android.util.Log; | |
| import org.json.JSONException; | |
| import org.json.JSONObject; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'me.tatarka.retrolambda' | |
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.1.2" | |
| defaultConfig { | |
| applicationId "com.render.prestigos" | |
| minSdkVersion 14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style name="AppTheme.Base" parent="Theme.AppCompat.Light"> | |
| <item name="colorPrimary">@color/primary</item> | |
| <item name="colorPrimaryDark">@color/primary_dark</item> | |
| <item name="colorAccent">@color/accent</item> | |
| <item name="android:navigationBarColor" tools:targetApi="21">@color/primary_dark</item> | |
| <item name="android:textColorPrimary">@color/text</item> | |
| <item name="android:textColorSecondary">@color/white</item> | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class EventsRequestModel { | |
| public class EventsModelResponse { | |
| @SerializedName(EventfulApiKeys.JSON_KEY_EVENTS) | |
| EventsMainSection eventsMainSection; | |
| public List<EventGson> getListEvents (){ | |
| return eventsMainSection.eventsPackage.listEvents; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static final String BASE_URL = "http://www.eventful.com"; | |
| public static final String PATH_JSON = "json"; | |
| public static final String PATH_EVENTS = "events"; | |
| public static final String PATH_SEARCH = "search"; | |
| public static final String URL_EVENTS_SEARCH = "/" + PATH_JSON + "/" + PATH_EVENTS + "/" + PATH_SEARCH; | |
| public static final String PARAM_LOCATION = "location"; | |
| public static final String PARAM_APP_KEY = "app_key"; | |
| public static final String PARAM_DATE = "date"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:color="RIPPLE_COLOR"> | |
| <item android:id="@+id/mask"> | |
| <shape> | |
| <solid android:color="BUTTON_COLOR"> | |
| </solid> | |
| </shape> | |
| </item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CardsContract { | |
| //TODO: rename package | |
| public static final String CONTENT_AUTHORITY = "com.example.joseluisrosasbaza.marco_polo1"; | |
| public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY); | |
| public static final String PATH_CARDS = "cards"; | |
| public static final String PATH_DECK = "deck"; | |
| public static final class CardsEntry implements BaseColumns { | |
| public static final String TABLE_NAME = "cards"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SettingsFragment extends PreferenceFragment | |
| implements Preference.OnPreferenceChangeListener{ | |
| public static SettingsFragment newInstance() { | |
| SettingsFragment fragment = new SettingsFragment(); | |
| Bundle args = new Bundle(); | |
| fragment.setArguments(args); | |
| return fragment; | |
| } |