package pt.passarola.ui;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;

import butterknife.Bind;
import butterknife.ButterKnife;
import pt.passarola.R;
import pt.passarola.services.dagger.DaggerableAppCompatActivity;

/**
 * Created by ruigoncalo on 22/10/15.
 */
public class AboutActivity extends DaggerableAppCompatActivity {

    @Bind(R.id.toolbar) Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);
        setupToolbar();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                onBackPressed();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    private void setupToolbar(){
        setSupportActionBar(toolbar);
        if(getSupportActionBar() != null) {
            getSupportActionBar().setTitle(R.string.about);
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setHomeButtonEnabled(true);
        }
    }

}

@@ -19,16 +19,71 @@
 la.ui;%0A%0A
+import android.content.Intent;%0Aimport android.net.Uri;%0A
 import a
@@ -230,16 +230,44 @@
 rKnife;%0A
+import butterknife.OnClick;%0A
 import p
@@ -459,16 +459,86 @@
 vity %7B%0A%0A
+    private static final String FB_PASSAROLA_ID = %22713214482083435%22;%0A%0A
     @Bin
@@ -1102,16 +1102,17 @@
 oolbar()
+ 
 %7B%0A      
@@ -1184,17 +1184,16 @@
 != null)
- 
 %7B%0A      
@@ -1325,77 +1325,1070 @@
     
+%7D%0A
     
-getSupportActionBar().setHomeButtonEnabled(true);%0A        %7D%0A    %7D%0A
+%7D%0A%0A    @OnClick(R.id.button_email)%0A    public void onEmailButtonClick()%7B%0A        Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);%0A        emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);%0A        emailIntent.setType(%22vnd.android.cursor.item/email%22);%0A        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String%5B%5D %7B%22info@passarola.pt%22%7D);%0A        startActivity(Intent.createChooser(emailIntent, getString(R.string.send_email_using)));%0A    %7D%0A%0A    /**%0A     * Load facebook page if facebook app is installed%0A     * open browser otherwise%0A     */%0A    @OnClick(R.id.button_facebook)%0A    public void onFacebookButtonClick()%7B%0A        Intent intent;%0A        try %7B%0A            intent = new Intent(Intent.ACTION_VIEW,%0A                    Uri.parse(%22fb://page/%22 + FB_PASSAROLA_ID));%0A            startActivity(intent);%0A        %7D catch (Exception e) %7B%0A            intent =  new Intent(Intent.ACTION_VIEW,%0A                    Uri.parse(%22https://www.facebook.com/%22 + FB_PASSAROLA_ID));%0A            startActivity(intent);%0A        %7D%0A    %7D
 %0A%7D%0A

Create about layout