1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.healthconnect.controller.selectabledeletion 17 18 import android.app.Dialog 19 import android.os.Bundle 20 import android.view.View 21 import android.widget.TextView 22 import androidx.fragment.app.DialogFragment 23 import com.android.healthconnect.controller.R 24 import com.android.healthconnect.controller.shared.dialog.AlertDialogBuilder 25 import com.android.healthconnect.controller.utils.logging.ProgressDialogElement 26 27 class DeletionLoadingDialogFragment : DialogFragment() { 28 onCreateDialognull29 override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { 30 val view: View = layoutInflater.inflate(R.layout.dialog_progress, null) 31 val title = view.findViewById<TextView>(R.id.progress_indicator_title) 32 title.setText(R.string.delete_progress_indicator) 33 // TODO: (b/341886932) add new telemetry for deletion dialogs 34 return AlertDialogBuilder(this, ProgressDialogElement.DELETION_DIALOG_IN_PROGRESS_CONTAINER) 35 .setView(view) 36 .create() 37 } 38 39 companion object { 40 const val TAG = "DeletionLoadingDialogFragment" 41 } 42 } 43