Search in sources :

Example 11 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class SnapDetailFragment method getSnap.

private void getSnap() {
    Map<String, String> params = new HashMap<String, String>();
    params.put("owner_tsid", m_ownerTsid);
    params.put("snap_id", m_photoId);
    params.put("secret", m_secret);
    GlitchRequest request = m_application.glitch.getRequest("snaps.detail", params);
    request.execute(this);
    m_requestCount = 1;
    if (getActivity() != null)
        ((HomeScreen) getActivity()).showSpinner(true);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 12 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class QuestsFragment method getQuests.

public void getQuests() {
    if (m_application != null) {
        GlitchRequest request = m_application.glitch.getRequest("quests.getAll");
        request.execute(this);
        m_requestCount = 1;
        getActivity().runOnUiThread(new Runnable() {

            public void run() {
                ((HomeScreen) getActivity()).showSpinner(true);
            }
        });
    }
}
Also used : GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 13 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class EncyclopediaStreetDetailFragment method teleport.

private void teleport() {
    Map<String, String> params = new HashMap<String, String>();
    params.put("street_tsid", m_street.tsid);
    GlitchRequest request = m_application.glitch.getRequest("locations.teleport", params);
    request.execute(this);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 14 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class Sidebar method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.sidebar_view);
    m_sbList = getSidebarList();
    MyApplication app = (MyApplication) getApplicationContext();
    m_activity = app.homeScreen;
    m_adapter = new SidebarListViewAdapter(this, m_sbList);
    m_listView = (LinearListView) findViewById(R.id.SidebarListView);
    m_listView.setAdapter(m_adapter);
    GlitchRequest request = ((MyApplication) ((HomeScreen) m_activity).getApplication()).glitch.getRequest("mail.getUnreadCount");
    request.execute(this);
}
Also used : GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 15 with GlitchRequest

use of com.tinyspeck.android.GlitchRequest in project glitch-hq-android by tinyspeck.

the class EncyclopediaLocationStreetFragment method getEncyclopediaLocationStreets.

private void getEncyclopediaLocationStreets() {
    if (m_application != null) {
        Map<String, String> params = new HashMap<String, String>();
        params.put("hub_id", String.valueOf(m_hub.hub_id));
        GlitchRequest request = m_application.glitch.getRequest("locations.getStreets", params);
        request.execute(this);
        m_requestCount = 1;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Aggregations

GlitchRequest (com.tinyspeck.android.GlitchRequest)46 HashMap (java.util.HashMap)33 Vector (java.util.Vector)3 MotionEvent (android.view.MotionEvent)1 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 OnTouchListener (android.view.View.OnTouchListener)1 Button (android.widget.Button)1 FrameLayout (android.widget.FrameLayout)1 ImageView (android.widget.ImageView)1 ScrollView (android.widget.ScrollView)1 TextView (android.widget.TextView)1 Glitch (com.tinyspeck.android.Glitch)1 BaseFragment.skillAvailable (com.tinyspeck.glitchhq.BaseFragment.skillAvailable)1 Map (java.util.Map)1 JSONArray (org.json.JSONArray)1 JSONObject (org.json.JSONObject)1