Android Open Source - AwesomeText Main Activity






From Project

Back to project page AwesomeText.

License

The source code is released under:

Apache License

If you think the Android project AwesomeText 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.naveen09.awesometext;
//from  ww w .j av  a2 s .com
import com.naveen09.awesometext.AwesomeWidgetUtils.POSITION;

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

/**
 * 
 * @author naveen09 Naveen Aechan
 * 
 */
public class MainActivity
    extends Activity
{

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

        // programatically set icon and icon position.
        AwesomeText aweText = (AwesomeText) findViewById(R.id.awesomeText1);
        aweText.setIcon(R.string.fa_arrow_right, POSITION.LEFT);

        AwesomeButton aweButton = (AwesomeButton) findViewById(R.id.awesomeButton1);
        aweButton.setIcon(R.string.fa_sign_in, POSITION.LEFT);

        AwesomeText contact = (AwesomeText) findViewById(R.id.contact);
        contact.setText("Naveen Aechan");
        contact.setIcon(R.string.fa_google_plus, POSITION.LEFT);

        AwesomeText contact_git = (AwesomeText) findViewById(R.id.contactgit);
        contact_git.setText("naveen09, aechannaveen@gmail.com");
        contact_git.setIcon(R.string.fa_github, POSITION.LEFT);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu)
    {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}




Java Source Code List

com.naveen09.awesometext.AwesomeButton.java
com.naveen09.awesometext.AwesomeText.java
com.naveen09.awesometext.AwesomeWidgetUtils.java
com.naveen09.awesometext.MainActivity.java