@@ -0,0 +1,2410 @@
+/*%0A * Copyright 2020 Google LLC%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     https://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.google.android.gnd.ui.editobservation;%0A%0Aimport android.content.Context;%0Aimport android.os.Bundle;%0Aimport android.util.Log;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.view.ViewGroup;%0Aimport androidx.annotation.NonNull;%0Aimport androidx.annotation.Nullable;%0Aimport androidx.fragment.app.Fragment;%0Aimport com.google.android.gnd.databinding.BottomSheetBinding;%0Aimport com.google.android.material.bottomsheet.BottomSheetDialogFragment;%0A%0Apublic class ActionBottomDialogFragment extends BottomSheetDialogFragment %7B%0A%0A  public static final String TAG = %22ActionBottomDialog%22;%0A  private AddPhotoListener listener;%0A%0A  public static ActionBottomDialogFragment newInstance() %7B%0A    return new ActionBottomDialogFragment();%0A  %7D%0A%0A  @Nullable%0A  @Override%0A  public View onCreateView(%0A      @NonNull LayoutInflater inflater,%0A      @Nullable ViewGroup container,%0A      @Nullable Bundle savedInstanceState) %7B%0A    BottomSheetBinding binding = BottomSheetBinding.inflate(inflater, container, false);%0A    binding.setFragment(this);%0A    return binding.getRoot();%0A  %7D%0A%0A  @Override%0A  public void onAttach(@NonNull Context context) %7B%0A    super.onAttach(context);%0A    Fragment fragment = getTargetFragment();%0A    if (fragment instanceof AddPhotoListener) %7B%0A      listener = (AddPhotoListener) fragment;%0A    %7D else %7B%0A      Log.e(TAG, %22AddPhotoListener not implemented%22);%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void onDetach() %7B%0A    super.onDetach();%0A    listener = null;%0A  %7D%0A%0A  public void onSelectPhoto() %7B%0A    Log.d(TAG, %22onSelectPhoto%22);%0A    listener.onSelectPhoto();%0A    dismiss();%0A  %7D%0A%0A  public void onCapturePhoto() %7B%0A    Log.d(TAG, %22onCapturePhoto%22);%0A    listener.onCapturePhoto();%0A    dismiss();%0A  %7D%0A%0A  public interface AddPhotoListener %7B%0A    void onSelectPhoto();%0A%0A    void onCapturePhoto();%0A  %7D%0A%7D%0A

Add ModalBottomDialog fragment