package com.melnykov.fab.sample;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import com.melnykov.fab.FloatingActionButton;
import com.melnykov.fab.sample.R;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ListView listView = (ListView) findViewById(android.R.id.list);
        FloatingActionButton floatingActionButton = (FloatingActionButton) findViewById(R.id.button_floating_action);
        floatingActionButton.attachToListView(listView);

        ListAdapter listAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,
                getResources().getStringArray(R.array.planets));
        listView.setAdapter(listAdapter);
    }
}

@@ -56,16 +56,49 @@
 tivity;%0A
+import android.app.ListActivity;%0A
 import a
@@ -115,16 +115,16 @@
 Bundle;%0A
-
 import a
@@ -334,16 +334,20 @@
 extends 
+List
 Activity
@@ -518,80 +518,8 @@
 );%0A%0A
-        ListView listView = (ListView) findViewById(android.R.id.list);%0A
     
@@ -678,24 +678,29 @@
 istView(
-l
+getL
 istView
+()
 );%0A%0A    
@@ -874,16 +874,21 @@
     
-l
+getL
 istView
+()
 .set

Simplify sample code