aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/me/texx/Texx/MediaPreviewActivity.kt
blob: 3e6f25b90c3a026c829dc1180034e887c6a02499 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package me.texx.Texx

import android.net.Uri
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.Window
import android.view.WindowManager
import android.widget.ImageView
import daio.io.dresscode.dressCodeName
import daio.io.dresscode.matchDressCode
import me.texx.Texx.util.ThemeUtil.getThemeName

class MediaPreviewActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        matchDressCode()
        super.onCreate(savedInstanceState)
        dressCodeName = getThemeName(this)
        requestWindowFeature(Window.FEATURE_NO_TITLE)
        window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN)
        setContentView(R.layout.activity_media_preview)

        val filepath = intent.getStringExtra("filepath")
        val imageView = findViewById<ImageView>(R.id.imagePreview)
        imageView.setImageURI(Uri.parse(filepath))
    }
}