Skip to content

Commit 22a7527

Browse files
Merge pull request nextcloud#13187 from nextcloud/convert-preview-image-fragment-to-kt
Convert Preview Image Fragment to Kotlin
2 parents 8355fde + b0910ea commit 22a7527

File tree

5 files changed

+912
-888
lines changed

5 files changed

+912
-888
lines changed

app/src/main/java/com/owncloud/android/ui/preview/PreviewImageErrorFragment.java

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Nextcloud - Android Client
3+
*
4+
* SPDX-FileCopyrightText: 2018 Tobias Kaminsky <tobias@kaminsky.me>
5+
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
6+
*/
7+
package com.owncloud.android.ui.preview
8+
9+
import android.os.Bundle
10+
import android.view.LayoutInflater
11+
import android.view.View
12+
import android.view.ViewGroup
13+
import com.owncloud.android.R
14+
import com.owncloud.android.ui.activity.FileActivity
15+
import com.owncloud.android.ui.fragment.FileFragment
16+
17+
/**
18+
* A fragment showing an error message.
19+
*/
20+
class PreviewImageErrorFragment : FileFragment() {
21+
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
22+
return inflater.inflate(R.layout.preview_image_error_fragment, container, false)
23+
}
24+
25+
companion object {
26+
fun newInstance(): FileFragment {
27+
val fileFragment: FileFragment = PreviewImageErrorFragment()
28+
val bundle = Bundle()
29+
30+
bundle.putParcelable(FileActivity.EXTRA_FILE, null)
31+
fileFragment.arguments = bundle
32+
33+
return fileFragment
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)