[Nexus 4 Original Android Development] MBQ_:
An app I'm workin on, was headed to Kohls to get some clothes n stuff and wanted to put it on my GitHub.

If anyone is interested...

https://github.com/MBQs-Apps/Notr

For those who want to see the Java....

package com.kyler.mbq.notr;

import android.app.ActionBar;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.widget.SlidingPaneLayout;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class MainNoteActivity extends Activity {
private SlidingPaneLayout mSlidingLayout;

private ListView mList;

private TextView mContent;

private ActionBarHelper mActionBar;

[MENTION=439709]override[/MENTION]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_note);

mSlidingLayout = (SlidingPaneLayout) findViewById(R.id.sliding_pane_layout);
mList = (ListView) findViewById(R.id.left_pane);
mContent = (TextView) findViewById(R.id.content_text);

mSlidingLayout.setPanelSlideListener(new SlideListener());
mSlidingLayout.openPane();

mList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, Notes.LIST));
mList.setOnItemClickListener(new ListItemClickListener());

mActionBar = createActionBarHelper();
mActionBar.init();

mSlidingLayout.getViewTreeObserver().addOnGlobalLayoutListener(new FirstLayoutListener());
}

[MENTION=1299008]supp[/MENTION]ressWarnings("deprecation")
[MENTION=439709]override[/MENTION]
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home && !mSlidingLayout.isOpen()) {
mSlidingLayout.smoothSlideOpen();
return true;
}
return super.onOptionsItemSelected(item);
}

private class ListItemClickListener implements ListView.OnItemClickListener {
[MENTION=1299008]supp[/MENTION]ressWarnings("deprecation")
[MENTION=439709]override[/MENTION]
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
mContent.setText(Notes.ACTIONS[position]);
mActionBar.setTitle(Notes.LIST[position]);
mSlidingLayout.smoothSlideClosed();
}
}

private class SlideListener extends SlidingPaneLayout.SimplePanelSlideListener {
[MENTION=439709]override[/MENTION]
public void onPanelOpened(View panel) {
mActionBar.onPanelOpened();
}

[MENTION=439709]override[/MENTION]
public void onPanelClosed(View panel);
mActionbar.onPanelClosed();
}
}

private class FirstLayoutListener implements ViewTreeObserver.OnGlobalLayoutListener {
[MENTION=439709]override[/MENTION]
public void onGlobalLayout() {
mActionBar.onFirstLayout();
mSlidingLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
}

private ActionBarHelper createActionBarHelper() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH){
return new ActionBarHelperICS();
} else {
return new ActionBarHelper();
}
}

class ActionBarHelper {
public void init() ()
public void onPanelClosed {} {}
public void onPanelOpened() ()
public void onFirstLayout() ()
public void setTitle(CharSequence title) ()
}

private class ActionBarHelperICS extends ActionBarHelper {
private final ActionBar mActionBar;
private CharSequence mDrawerTitle;
private CharSequence mTitle;

ActionBarHelperICS() {
mActionBar = getActionBar();
}

[MENTION=439709]override[/MENTION]
public void init() {
mActionBar.setDisplayHomeAsUpEnabled(true);
mActionBar.setHomeButtonEnabled(true);
mTitle = mDrawerTitle = getTitle();
}

[MENTION=439709]override[/MENTION]
public void onPanelClosed() {
super.onPanelClosed();
mActionBar.setDisplayHomeAsUpEnabled(true);
mActionBar.setHomeButtonEnabled(true);
mActionBar.setTitle(mTitle);
}

[MENTION=439709]override[/MENTION]
public void onPanelOpened() {
super.onPanelOpened();
mActionBar.setDisplayHomeAsUpEnabled(true);
mActionBar.setHomeButtonEnabled(true);
mActionBar.setTitle(mDrawerTitle);
}

[MENTION=2534587]Supress[/MENTION]Warnings("deprecation")
[MENTION=439709]override[/MENTION]
public void onFirst:ayout() {
if (mSlidingLayout.canSlide() && !mSlidingLayout.isOpen()) {
onPanelClosed();
} else {
onPanelOpened();
}
}

[MENTION=439709]override[/MENTION]
public void setTitle(CharSequence title) {
mTitle = title;
}
}
}