|
| 1 | +/* |
| 2 | + * This file is part of HyperCeiler. |
| 3 | +
|
| 4 | + * HyperCeiler is free software: you can redistribute it and/or modify |
| 5 | + * it under the terms of the GNU Affero General Public License as |
| 6 | + * published by the Free Software Foundation, either version 3 of the |
| 7 | + * License. |
| 8 | +
|
| 9 | + * This program is distributed in the hope that it will be useful, |
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | + * GNU Affero General Public License for more details. |
| 13 | +
|
| 14 | + * You should have received a copy of the GNU Affero General Public License |
| 15 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 | +
|
| 17 | + * Copyright (C) 2023-2024 HyperCeiler Contributions |
| 18 | + */ |
| 19 | +package com.sevtinge.hyperceiler.ui.fragment; |
| 20 | + |
| 21 | +import android.view.View; |
| 22 | + |
| 23 | +import com.sevtinge.hyperceiler.R; |
| 24 | +import com.sevtinge.hyperceiler.ui.base.BaseSettingsActivity; |
| 25 | +import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment; |
| 26 | + |
| 27 | +public class HtmlViewerFragment extends SettingsPreferenceFragment { |
| 28 | + @Override |
| 29 | + public int getContentResId() { |
| 30 | + return R.xml.html_viewer; |
| 31 | + } |
| 32 | + |
| 33 | + @Override |
| 34 | + public View.OnClickListener addRestartListener() { |
| 35 | + return view -> ((BaseSettingsActivity) getActivity()).showRestartDialog( |
| 36 | + getResources().getString(R.string.html_viewer), |
| 37 | + "com.android.htmlviewer" |
| 38 | + ); |
| 39 | + } |
| 40 | +} |
0 commit comments