Android Open Source - MateFetch Simple Text Fragment






From Project

Back to project page MateFetch.

License

The source code is released under:

GNU General Public License

If you think the Android project MateFetch 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 org.matehackers.matefetch;
//from   w  w w.  ja  v  a 2  s. c o m
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Um fragmento bsico criado por padro;
 */
public class SimpleTextFragment extends Fragment {

  TextView mTextView;
  
  /**
   * Executado quando o fragmento  criado
   */
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_main, container,
        false);
    
    // pega uma referncia pro item de interface
    mTextView = (TextView) rootView.findViewById(R.id.trechinhoDeTexto);
    
    // instancia uma nova tarefa assncrona
    HttpGoogleGetPerformer get = new HttpGoogleGetPerformer(mTextView);
    
    // executa a tarefa
    get.execute();
    
    // retorna a view
    return rootView;
  }
  
}




Java Source Code List

org.matehackers.matefetch.HttpGoogleGetPerformer.java
org.matehackers.matefetch.MainActivity.java
org.matehackers.matefetch.SimpleTextFragment.java