-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFragmentB.java
More file actions
31 lines (27 loc) · 880 Bytes
/
FragmentB.java
File metadata and controls
31 lines (27 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package slidenerd.vivz;
import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
/**
* Created by Vivz on 10/8/13.
*/
public class FragmentB extends Fragment {
TextView text;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Log.d("VIVZ","View was created");
View view=inflater.inflate(R.layout.fragment_b, container, false);
text= (TextView) view.findViewById(R.id.textView);
return view;
}
public void changeData(int index)
{
String[] descriptions=getResources().getStringArray(R.array.description);
Log.d("VIVZ","Descriptions retreieved");
text.setText(descriptions[index]);
}
}