Android Open Source - cosmic_hub Tab Fragment App

From Project

Back to project page cosmic_hub.


The source code is released under:

GNU General Public License

If you think the Android project cosmic_hub 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.cosmic.mods;
/*from w ww  . j a  va  2 m*/
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;


public class TabFragmentApp extends SherlockFragment {
  TextView tv2;
  ImageView ib2;
  Button bt1;
  public View onCreateView(LayoutInflater inflater, ViewGroup group, Bundle saved)
    return inflater.inflate(R.layout.tab_about2, group, false);
  public void onActivityCreated(Bundle savedInstanceState){
    tv2 = (TextView) getActivity().findViewById(;
    ib2 = (ImageView) getActivity().findViewById(;
    ib2.setOnClickListener(new View.OnClickListener() {
      public void onClick(View view3) {
        // TODO Auto-generated method stub
        Toast.makeText(getActivity(), "No candy for you", Toast.LENGTH_SHORT).show();
    bt1 = (Button) getActivity().findViewById(;
    bt1.setOnClickListener(new View.OnClickListener() {
      public void onClick(View arg0) {
        // TODO Auto-generated method stub
        Builder lb = new Builder(getActivity());


Java Source Code List