Android Open Source - GAMr Home Activity






From Project

Back to project page GAMr.

License

The source code is released under:

GNU General Public License

If you think the Android project GAMr 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.gamr.gamr;
/*  w ww  .  j a  va 2 s .  c  o m*/
import android.app.ActionBar;
import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

/**
 * Created by beni on 1/9/15.
 */
public class HomeActivity extends Activity {
    // Fragments to make posts and search
    Fragment searchFragment, postFragment;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_home);

        //TextView responseTextView = (TextView) findViewById(R.id.response_text);
        //responseTextView.setText(getIntent().getStringExtra("ResponseJson"));

        searchFragment = new SearchFragment();
        postFragment = new SearchFragment();

        ActionBar actionBar = getActionBar();
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

        TabListener<SearchFragment> tlSearch = new TabListener<SearchFragment>(this, "Search", SearchFragment.class);
        TabListener<PostFragment> tlPost = new TabListener<PostFragment>(this, "Post", PostFragment.class);

        ActionBar.Tab searchTab = actionBar.newTab().setText("Search").setTabListener(tlSearch);
        ActionBar.Tab postTab = actionBar.newTab().setText("Post").setTabListener(tlPost);

        actionBar.addTab(searchTab);
        actionBar.addTab(postTab);
    }
}




Java Source Code List

com.gamr.gamr.BuildConfig.java
com.gamr.gamr.HomeActivity.java
com.gamr.gamr.LoginActivity.java
com.gamr.gamr.MiscQualView.java
com.gamr.gamr.PostFragment.java
com.gamr.gamr.RegisterActivity.java
com.gamr.gamr.SearchFragment.java
com.gamr.gamr.TabListener.java
com.gamr.gamr.ViewProfileActivity.java