Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HomeFragment extends Fragment {
- public HomeFragment(){}
- public GoogleMap mMap;
- private LocalizeDB db;
- private FragmentActivity myContext;
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.activity_maps, container, false);
- return rootView;
- }
- @Override
- public void onResume() {
- super.onResume();
- setUpMapIfNeeded();
- }
- }
- <fragment xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/map"
- tools:context=".MapsActivity"
- android:name="com.google.android.gms.maps.SupportMapFragment"/>
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <TextView
- android:id="@+id/txtLabel"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:textSize="16dp"
- android:text="Home View"/>
- <ImageView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/txtLabel"
- android:src="@drawable/ic_home"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="10dp"/>
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement