Search in sources :

Example 21 with GlitchRequest

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

the class ActivityFragment method getActivity.

private void getActivity(boolean bMore) {
    Map<String, String> params = new HashMap<String, String>();
    showHeader();
    if (m_currentActType == ACTIVITY_TYPE_REQUESTS)
        params.put("cat", "requests");
    else if (m_currentActType == ACTIVITY_TYPE_UPDATES)
        params.put("cat", "notes");
    if (bMore && m_actItemLast != null) {
        params.put("last", m_actItemLast);
        m_bAppendMode = true;
    } else
        m_bAppendMode = false;
    GlitchRequest request0 = m_application.glitch.getRequest("activity.feed", params);
    request0.execute(this);
    m_requestCount = 1;
    if (getActivity() != null) {
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 22 with GlitchRequest

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

the class EncyclopediaItemsInCategoryFragment method getItemsInCategory.

private void getItemsInCategory() {
    if (m_application != null) {
        Map<String, String> params = new HashMap<String, String>();
        params.put("category", m_category.id);
        GlitchRequest request = m_application.glitch.getRequest("items.getItems", params);
        request.execute(this);
        m_requestCount = 1;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 23 with GlitchRequest

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

the class SkillFragment method getSkills.

public void getSkills() {
    if (m_application != null) {
        GlitchRequest request1 = m_application.glitch.getRequest("skills.listLearning");
        request1.execute(this);
        GlitchRequest request2 = m_application.glitch.getRequest("skills.listUnlearning");
        request2.execute(this);
        GlitchRequest request3 = m_application.glitch.getRequest("skills.listAvailable");
        request3.execute(this);
        GlitchRequest request4 = m_application.glitch.getRequest("skills.hasUnlearning");
        request4.execute(this);
        m_requestCount = 4;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 24 with GlitchRequest

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

the class SnapDetailFragment method postSnapComment.

private void postSnapComment(String comment) {
    Map<String, String> params = new HashMap<String, String>();
    params.put("owner_tsid", m_ownerTsid);
    params.put("snap_id", m_photoId);
    params.put("comment", comment);
    GlitchRequest request = m_application.glitch.getRequest("snaps.comment", 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 25 with GlitchRequest

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

the class UnlearnFragment method getSkills.

public void getSkills() {
    if (m_application != null) {
        GlitchRequest request1 = m_application.glitch.getRequest("skills.listUnlearning");
        request1.execute(this);
        GlitchRequest request2 = m_application.glitch.getRequest("skills.listLearning");
        request2.execute(this);
        GlitchRequest request3 = m_application.glitch.getRequest("skills.listUnlearnable");
        request3.execute(this);
        GlitchRequest request4 = m_application.glitch.getRequest("skills.hasUnlearning");
        request4.execute(this);
        m_requestCount = 4;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : 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