I Have my MapsActivity, that has a onCreateMethod() as
setContentView(R.layout.activity_maps);
I called a dialog box that can overlay the current activity for a while as
Dialog dialog = new Dialog(MapsActivity.this);
dialog.setContentView(R.layout.dialog);
dialog.setCancelable(false);
dialog.show();
It refers to dialog.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Enter Destination Name"
android:id="@+id/textView8" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:gravity="center">
<fragment
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment" />
</LinearLayout>
</LinearLayout>
I want my program to refer from MapsActivity to R.id.place_autocomplete_fragment in dialog.xml
I Tried using R.id.place_autocomplete_fragment
but it didn't work.
So how do i do this? HELPPP