mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	adding a basic PDF Viewer implementation
This commit is contained in:
		@@ -83,6 +83,18 @@
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </activity>
 | 
			
		||||
 | 
			
		||||
        <activity
 | 
			
		||||
            android:name=".activities.PDFViewerActivity"
 | 
			
		||||
            android:exported="true"
 | 
			
		||||
            android:label="@string/pdf_viewer">
 | 
			
		||||
 | 
			
		||||
            <intent-filter>
 | 
			
		||||
                <action android:name="android.intent.action.VIEW" />
 | 
			
		||||
                <category android:name="android.intent.category.DEFAULT" />
 | 
			
		||||
                <data android:mimeType="application/pdf" />
 | 
			
		||||
            </intent-filter>
 | 
			
		||||
        </activity>
 | 
			
		||||
 | 
			
		||||
        <activity
 | 
			
		||||
            android:name=".activities.DecompressActivity"
 | 
			
		||||
            android:exported="true"
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,16 @@
 | 
			
		||||
package com.simplemobiletools.filemanager.pro.activities
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle
 | 
			
		||||
import com.simplemobiletools.commons.extensions.checkAppSideloading
 | 
			
		||||
import com.simplemobiletools.filemanager.pro.R
 | 
			
		||||
 | 
			
		||||
class PDFViewerActivity : SimpleActivity() {
 | 
			
		||||
    override fun onCreate(savedInstanceState: Bundle?) {
 | 
			
		||||
        super.onCreate(savedInstanceState)
 | 
			
		||||
        setContentView(R.layout.activity_pdf_viewer)
 | 
			
		||||
 | 
			
		||||
        if (checkAppSideloading()) {
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								app/src/main/res/layout/activity_pdf_viewer.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								app/src/main/res/layout/activity_pdf_viewer.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:id="@+id/pdf_viewer_wrapper"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="wrap_content">
 | 
			
		||||
 | 
			
		||||
</RelativeLayout>
 | 
			
		||||
		Reference in New Issue
	
	Block a user