Android Open Source - cosmic_hub Tab Fragment App






From Project

Back to project page cosmic_hub.

License

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 s.co m*/
import android.app.AlertDialog.Builder;
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;

import com.actionbarsherlock.app.SherlockFragment;

public class TabFragmentApp extends SherlockFragment {
  
  TextView tv2;
  ImageView ib2;
  Button bt1;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup group, Bundle saved)
  {
    return inflater.inflate(R.layout.tab_about2, group, false);
  }
  
  @Override
  public void onActivityCreated(Bundle savedInstanceState){
    super.onActivityCreated(savedInstanceState);
    
    tv2 = (TextView) getActivity().findViewById(R.id.hubText);
    tv2.setText(Html.fromHtml(getString(R.string.hub_about)));
    
    ib2 = (ImageView) getActivity().findViewById(R.id.caneimage);
    ib2.setOnClickListener(new View.OnClickListener() {
      
      @Override
      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(R.id.licenseButton);
    bt1.setOnClickListener(new View.OnClickListener() {
      
      @Override
      public void onClick(View arg0) {
        // TODO Auto-generated method stub
        
        Builder lb = new Builder(getActivity());
        lb.setTitle("Licenses");
        lb.setMessage(Html.fromHtml(getString(R.string.licenses)));
        lb.show();
        
      }
    });
    
  }
  

}




Java Source Code List

com.cosmic.mods.About.java
com.cosmic.mods.BeanBag.java
com.cosmic.mods.Board.java
com.cosmic.mods.FAQ.java
com.cosmic.mods.IconPreferenceScreen.java
com.cosmic.mods.MainActivity.java
com.cosmic.mods.Mods.java
com.cosmic.mods.NotificationPanel.java
com.cosmic.mods.PlatLogoActivity.java
com.cosmic.mods.Profile.java
com.cosmic.mods.QuickSettings.java
com.cosmic.mods.StatusBarLayout.java
com.cosmic.mods.StatusBar.java
com.cosmic.mods.TabFragmentApp.java
com.cosmic.mods.TabFragmentTheme.java
com.cosmic.mods.TabFragmentThemer.java
com.cosmic.mods.UserInterface.java
com.cosmic.mods.Utility.java
com.cosmic.mods.Wallpaper.java