Created
December 30, 2016 05:49
-
-
Save manishkpr/47e97fe8690f805a209438313d6f30ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.simplefragmentexample; | |
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; | |
public class LayOutTwo extends Fragment { | |
ViewGroup root; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { | |
root = (ViewGroup) inflater.inflate(R.layout.layout_two, null); | |
return root; | |
} | |
void setMessage(String msg){ | |
TextView txt=(TextView)root.findViewById(R.id.textView1); | |
txt.setText(msg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment