Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.twotoasters.jazzylistview.sample;
 
public class SimpleListActivity extends Activity {
    private static final String KEY_TRANSITION_EFFECT = "transition_effect";
    private JazzyListView mList;
    private HashMap<StringIntegermEffectMap;
    private int mCurrentTransitionEffect = .;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
         = (JazzyListViewfindViewById(...);
        .setAdapter(new ListAdapter(this..));
        if (savedInstanceState != null) {
             = savedInstanceState.getInt(.);
            setupJazziness();
        }
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
         = new HashMap<StringInteger>();
        int i = 0;
        String[] effects = this.getResources().getStringArray(..);
        for (String effect : effects) {
            .put(effecti++);
        }
        List<StringeffectList = new ArrayList<String>(Arrays.asList(effects));
        Collections.sort(effectList);
        effectList.remove(getString(..));
        effectList.add(0, getString(..));
        for (String effect : effectList) {
            menu.add(effect);
        }
        return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        String strEffect = item.getTitle().toString();
        Toast.makeText(thisstrEffect.).show();
        setupJazziness(.get(strEffect));
        return true;
    }
    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
    }
    private void setupJazziness(int effect) {
         = effect;
    }
New to GrepCode? Check out our FAQ X