File tree 3 files changed +7
-20
lines changed
java/com/infomaniak/drive/ui/fileList/preview
3 files changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ class PreviewPDFActivity : AppCompatActivity() {
31
31
override fun onCreate (savedInstanceState : Bundle ? ) {
32
32
super .onCreate(savedInstanceState)
33
33
setContentView(binding.root)
34
- val navController = setupNavController()
35
- navController.navigate(R .id.previewPDFFragment)
34
+ setupNavController().navigate(R .id.previewPDFFragment)
36
35
}
37
36
38
37
private fun getNavHostFragment () = supportFragmentManager.findFragmentById(R .id.hostFragment) as NavHostFragment
Original file line number Diff line number Diff line change @@ -180,9 +180,7 @@ class PreviewPDFFragment : PreviewFragment() {
180
180
}
181
181
182
182
private fun getConfigurator (uriString : String? , pdfFile : IOFile ? ): PDFView .Configurator {
183
- return uriString?.let {
184
- binding.pdfView.fromUri(Uri .parse(uriString))
185
- } ? : binding.pdfView.fromFile(pdfFile)
183
+ return uriString?.let { binding.pdfView.fromUri(Uri .parse(uriString)) } ? : binding.pdfView.fromFile(pdfFile)
186
184
}
187
185
188
186
private fun onPdfPasswordError () {
Original file line number Diff line number Diff line change 15
15
~ You should have received a copy of the GNU General Public License
16
16
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
-->
18
- <androidx .constraintlayout.widget.ConstraintLayout xmlns : android =" http://schemas.android.com/apk/res/android"
18
+ <androidx .fragment.app.FragmentContainerView xmlns : android =" http://schemas.android.com/apk/res/android"
19
19
xmlns : app =" http://schemas.android.com/apk/res-auto"
20
+ android : id =" @+id/hostFragment"
21
+ android : name =" androidx.navigation.fragment.NavHostFragment"
20
22
android : layout_width =" match_parent"
21
- android : layout_height =" match_parent" >
22
-
23
- <androidx .fragment.app.FragmentContainerView
24
- android : id =" @+id/hostFragment"
25
- android : name =" androidx.navigation.fragment.NavHostFragment"
26
- android : layout_width =" match_parent"
27
- android : layout_height =" 0dp"
28
- app : defaultNavHost =" true"
29
- app : layout_constraintBottom_toBottomOf =" parent"
30
- app : layout_constraintEnd_toEndOf =" parent"
31
- app : layout_constraintStart_toStartOf =" parent"
32
- app : layout_constraintTop_toTopOf =" parent" />
33
-
34
- </androidx .constraintlayout.widget.ConstraintLayout>
23
+ android : layout_height =" match_parent"
24
+ app : defaultNavHost =" true" />
You can’t perform that action at this time.
0 commit comments