Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. public class HomeFragment extends Fragment {
  2.  
  3. public HomeFragment(){}
  4. public GoogleMap mMap;
  5. private LocalizeDB db;
  6. private FragmentActivity myContext;
  7.  
  8.  
  9. @Override
  10. public View onCreateView(LayoutInflater inflater, ViewGroup container,
  11. Bundle savedInstanceState) {
  12.  
  13. View rootView = inflater.inflate(R.layout.activity_maps, container, false);
  14.  
  15. return rootView;
  16. }
  17.  
  18. @Override
  19. public void onResume() {
  20. super.onResume();
  21. setUpMapIfNeeded();
  22. }
  23. }
  24.  
  25. <fragment xmlns:android="http://schemas.android.com/apk/res/android"
  26. xmlns:tools="http://schemas.android.com/tools"
  27. android:layout_width="match_parent"
  28. android:layout_height="match_parent"
  29. android:id="@+id/map"
  30. tools:context=".MapsActivity"
  31. android:name="com.google.android.gms.maps.SupportMapFragment"/>
  32.  
  33. <?xml version="1.0" encoding="utf-8"?>
  34. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  35. android:layout_width="match_parent"
  36. android:layout_height="match_parent">
  37.  
  38. <TextView
  39. android:id="@+id/txtLabel"
  40. android:layout_width="wrap_content"
  41. android:layout_height="wrap_content"
  42. android:layout_centerInParent="true"
  43. android:textSize="16dp"
  44. android:text="Home View"/>
  45.  
  46. <ImageView android:layout_width="wrap_content"
  47. android:layout_height="wrap_content"
  48. android:layout_below="@id/txtLabel"
  49. android:src="@drawable/ic_home"
  50. android:layout_centerHorizontal="true"
  51. android:layout_marginTop="10dp"/>
  52.  
  53. </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement