Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. package com.example.nepalicalendar;
  2.  
  3. import android.app.Activity;
  4. import android.content.res.ColorStateList;
  5. import android.content.res.Configuration;
  6. import android.graphics.Color;
  7. import android.os.Bundle;
  8. import android.support.v4.app.Fragment;
  9. import android.view.LayoutInflater;
  10. import android.view.View;
  11. import android.view.ViewGroup;
  12. import android.widget.ListView;
  13. import android.widget.TextView;
  14.  
  15. public class group1 extends Fragment
  16. {
  17. static TextView tView ;
  18. View tabbedView ;
  19. static CustomAdapter adapter;
  20. static String yearMonth;
  21. static Boolean useSavedInstanceBoolean = false;
  22.  
  23. @Override
  24. public void onCreate(Bundle savedInstanceState)
  25. {
  26. String yearMonth = getArguments().getString("yearMonth");
  27. setYearMonth(yearMonth);
  28. super.onCreate(savedInstanceState);
  29.  
  30. }
  31. public static void setYearMonth(String yearMonths){
  32. yearMonth = yearMonths;
  33. }
  34.  
  35. public String getYearMonth(){
  36. return yearMonth;
  37. }
  38. @Override
  39. public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
  40. {
  41. String yearMonth = getArguments().getString("yearMonth");
  42. System.out.println("yearMonth from grp1:"+yearMonth);
  43. tabbedView = inflater.inflate(R.layout.group1, container, false);
  44. TextView ttvTextView = (TextView)tabbedView.findViewById(R.id.ttv);
  45. ttvTextView.setText("public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)");
  46. ttvTextView.setTextColor(Color.RED);
  47.  
  48. return tabbedView ;
  49. }
  50.  
  51. @Override
  52. public void onActivityCreated(Bundle savedInstanceState)
  53. {
  54. super.onActivityCreated(savedInstanceState);
  55. }
  56.  
  57. @Override
  58. public void onAttach(Activity activity)
  59. {
  60. super.onAttach(activity);
  61. }
  62.  
  63. @Override
  64. public void onStart()
  65. {
  66. super.onStart();
  67. }
  68.  
  69. @Override
  70. public void onResume()
  71. {
  72. super.onResume();
  73. }
  74.  
  75.  
  76. @Override
  77. public void onConfigurationChanged(Configuration newConfig)
  78. {
  79. super.onConfigurationChanged(newConfig);
  80. }
  81.  
  82. @Override
  83. public void onSaveInstanceState(Bundle outState){
  84. useSavedInstanceBoolean = true;
  85.  
  86. super.onSaveInstanceState(outState);
  87. }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement