Android Open Source - Chit-Chat Sample List Fragment






From Project

Back to project page Chit-Chat.

License

The source code is released under:

GNU General Public License

If you think the Android project Chit-Chat 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.dhansiddh.chatmessenger;
//w ww . java  2s .c  om

import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v4.app.ListFragment;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.webkit.WebView.FindListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.RelativeLayout;


public class SampleListFragment extends ListFragment{
   String username;
   View v;
   Button b,b1,b2;
   public SampleListFragment()
   {
   }
  public SampleListFragment(String name)
   {
     username=name;
   }
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    v=inflater.inflate(R.layout.secondlist,null);
    b=(Button) v.findViewById(R.id.username);
    b.setText(username);
    b1=(Button) v.findViewById(R.id.button1);
    b1.setOnClickListener(new OnClickListener() {      
      @Override
      public void onClick(View arg0) {
        MainActivity ra = (MainActivity) getActivity();
        ra.switchmenucontent();
      }
    });
    b2=(Button) v.findViewById(R.id.button3);
    /**b2.setOnClickListener(new OnClickListener() {      
      @Override
      public void onClick(View arg0) {
        MainActivity ra = (MainActivity) getActivity();
        ra.setbroadcastcontent();
        
      }
    });**/
    
    return v;
  }
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    
  }
}




Java Source Code List

com.dhansiddh.chatmessenger.AlertDialogManager.java
com.dhansiddh.chatmessenger.BaseActivity.java
com.dhansiddh.chatmessenger.BirdGridFragment.java
com.dhansiddh.chatmessenger.BirdMenuFragment.java
com.dhansiddh.chatmessenger.CommonUtilities.java
com.dhansiddh.chatmessenger.ConnectionDetector.java
com.dhansiddh.chatmessenger.GCMIntentService.java
com.dhansiddh.chatmessenger.JSONParser.java
com.dhansiddh.chatmessenger.MainActivity.java
com.dhansiddh.chatmessenger.MainPage.java
com.dhansiddh.chatmessenger.MessageAdapter.java
com.dhansiddh.chatmessenger.MessageItem.java
com.dhansiddh.chatmessenger.MessageMainListAdapter.java
com.dhansiddh.chatmessenger.Register_Number.java
com.dhansiddh.chatmessenger.Register.java
com.dhansiddh.chatmessenger.SampleListFragment.java
com.dhansiddh.chatmessenger.ServerUtilities.java
com.dhansiddh.chatmessenger.WakeLocker.java