Android Open Source - ListViewMenu Main Activity






From Project

Back to project page ListViewMenu.

License

The source code is released under:

Apache License

If you think the Android project ListViewMenu listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.elijahsh.listviewexample;
// w w  w  . j  a va2 s  .  c  o m
import android.app.Activity;
import android.os.Bundle;
import com.elijahsh.view.ListViewMenu;
import android.view.MenuInflater;
import android.view.MenuItem;
  

public class MainActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    
    ListViewMenu navigationMenu = (ListViewMenu) findViewById(R.id.navigation_menu);
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.mnu_navigation, navigationMenu);
        navigationMenu.setMenuClickListener(new ListViewMenu.OnMenuClickListener() {
            @Override
            public void onClick(MenuItem menuItem) {
                // Standard menu click handler
            }
        });
    }
}




Java Source Code List

com.elijahsh.listviewexample.MainActivity.java
com.elijahsh.view.ListViewMenuAdapter.java
com.elijahsh.view.ListViewMenuItem.java
com.elijahsh.view.ListViewMenu.java