package androidsx.rateme;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class HelloWorldActivity extends Activity {

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


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.hello_world, menu);
        return true;
    }
    
}

@@ -39,72 +39,270 @@
 oid.
-os.Bundle;%0Aimport android.app.Activity;%0Aimport android.view.Menu
+app.Activity;%0Aimport android.app.FragmentManager;%0Aimport android.os.Bundle;%0Aimport android.view.Menu;%0Aimport android.view.MenuInflater;%0Aimport android.view.MenuItem;%0Aimport android.view.View;%0Aimport android.view.View.OnClickListener;%0Aimport android.widget.Button
 ;%0A%0Ap
@@ -350,16 +350,51 @@
 tivity %7B
+%0A    %0A    private Button btnRateme;
 %0A%0A    @O
@@ -556,18 +556,16 @@
 _world);
-%0A 
        %0A
@@ -576,16 +576,38 @@
     
+setupUI();            
 %0A    %7D%0A%0A
 %0A   
@@ -602,17 +602,16 @@
 %0A    %7D%0A%0A
-%0A
     @Ove
@@ -761,87 +761,980 @@
     
-getMenuInflater().inflate(R.menu.hello_world, menu);%0A        return true;%0A    %7D
+MenuInflater inflater = getMenuInflater();%0A        inflater.inflate(R.menu.hello_world, menu);%0A        return super.onCreateOptionsMenu(menu);%0A    %7D%0A    %0A    public void setupUI ()%7B%0A        btnRateme = (Button) findViewById(R.id.buttonRateMe);      %0A        btnRateme.setOnClickListener(new OnClickListener() %7B%0A            %0A            @Override%0A            public void onClick(View v) %7B%0A               alertMenu();%0A                %0A            %7D%0A        %7D);%0A        %0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        switch (item.getItemId()) %7B%0A        case R.id.RateMe:%0A            alertMenu();%0A            break;%0A%0A        default:%0A            break;%0A        %7D%0A        return super.onOptionsItemSelected(item);%0A    %7D%0A    %0A    public void alertMenu ()%7B%0A        FragmentManager fragmentManager = getFragmentManager();%0A        RateMeDialog dialogo = new RateMeDialog();%0A        dialogo.show(fragmentManager, %22Rate Us%22);%0A    %7D%0A    %0A    %0A
 %0A   

activity HelloWorld