Search in sources :

Example 36 with GlitchRequest

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

the class MailboxFragment method getInbox.

public void getInbox(boolean bMore) {
    if (m_application != null) {
        Map<String, String> params = new HashMap<String, String>();
        params.put("per_page", "20");
        if (bMore) {
            params.put("page", String.valueOf(currentPage + 1));
            m_bAppendMode = true;
        } else {
            m_bAppendMode = false;
        }
        GlitchRequest request = m_application.glitch.getRequest("mail.getInbox", params);
        request.execute(this);
        m_requestCount = 1;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 37 with GlitchRequest

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

the class EncyclopediaSearchTextWatcher method onTextChanged.

public void onTextChanged(CharSequence s, int start, int before, int count) {
    if (s.length() > 0) {
        m_searchResultsList.clear();
        ((EncyclopediaSearchListViewAdapter) m_searchResultsListView.adapter).notifyDataSetChanged();
        m_searchResultsListView.setVisibility(View.VISIBLE);
        m_listView.setVisibility(View.GONE);
        Map<String, String> params = new HashMap<String, String>();
        params.put("term", s.toString());
        if (!m_type.equals("all")) {
            params.put("type", m_type);
        }
        GlitchRequest request = m_application.glitch.getRequest("encyclopedia.search", params);
        request.execute(this);
        m_root.findViewById(R.id.encyclopedia_search_results_list_message).setVisibility(View.VISIBLE);
    } else {
        m_searchResultsListView.setVisibility(View.GONE);
        m_listView.setVisibility(View.VISIBLE);
    }
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 38 with GlitchRequest

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

the class EncyclopediaSkillCategoriesFragment method getEncyclopediaSkillCategories.

public void getEncyclopediaSkillCategories() {
    if (m_application != null) {
        GlitchRequest request = m_application.glitch.getRequest("skills.listAllCategories");
        request.execute(this);
        m_requestCount = 1;
        ((HomeScreen) getActivity()).showSpinner(true);
    }
}
Also used : GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 39 with GlitchRequest

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

the class EncyclopediaGiantDetailFragment method getEncyclopediaGiant.

private void getEncyclopediaGiant() {
    Map<String, String> params = new HashMap<String, String>();
    params.put("giant", m_giant.id);
    GlitchRequest request = m_application.glitch.getRequest("giants.info", params);
    request.execute(this);
    m_requestCount = 1;
    ((HomeScreen) getActivity()).showSpinner(true);
}
Also used : HashMap(java.util.HashMap) GlitchRequest(com.tinyspeck.android.GlitchRequest)

Example 40 with GlitchRequest

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

the class EncyclopediaGiantsListFragment method getEncyclopediaGiantsList.

public void getEncyclopediaGiantsList() {
    if (m_application != null) {
        GlitchRequest request = m_application.glitch.getRequest("giants.list");
        request.execute(this);
        m_requestCount = 1;
        ((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