|
@@ -1,7 +1,6 @@
|
|
package com.bomostory.sceneeditmodule.share
|
|
package com.bomostory.sceneeditmodule.share
|
|
|
|
|
|
import android.graphics.PorterDuff
|
|
import android.graphics.PorterDuff
|
|
-import android.graphics.drawable.Drawable
|
|
|
|
import android.media.MediaMetadataRetriever
|
|
import android.media.MediaMetadataRetriever
|
|
import android.os.Bundle
|
|
import android.os.Bundle
|
|
import android.support.v4.app.DialogFragment
|
|
import android.support.v4.app.DialogFragment
|
|
@@ -13,6 +12,7 @@ import android.view.LayoutInflater
|
|
import android.view.View
|
|
import android.view.View
|
|
import android.view.ViewGroup
|
|
import android.view.ViewGroup
|
|
import android.widget.SeekBar
|
|
import android.widget.SeekBar
|
|
|
|
+import com.bomostory.sceneeditmodule.SceneDrawer
|
|
import com.bomostory.sceneeditmodule.basicdata.Project
|
|
import com.bomostory.sceneeditmodule.basicdata.Project
|
|
import com.bomostory.sceneeditmodule.utils.HorizontalItemDecoration
|
|
import com.bomostory.sceneeditmodule.utils.HorizontalItemDecoration
|
|
import com.bomostory.sceneeditmodule.utils.TimeUtils
|
|
import com.bomostory.sceneeditmodule.utils.TimeUtils
|
|
@@ -192,7 +192,10 @@ class ShareDialog : DialogFragment() {
|
|
fun bind(p1: Int) {
|
|
fun bind(p1: Int) {
|
|
itemView.apply {
|
|
itemView.apply {
|
|
project.story?.apply {
|
|
project.story?.apply {
|
|
- screenshot.setImageDrawable(Drawable.createFromPath(this.scenes[p1].backgroundPath))
|
|
|
|
|
|
+ val width = context.resources.getDimension(R.dimen.share_dialog_screenshot_width).toInt()
|
|
|
|
+ val height = context.resources.getDimension(R.dimen.share_dialog_screenshot_height).toInt()
|
|
|
|
+ val bitmap = SceneDrawer.drawScene(context, scenes[p1], 0, width, height)
|
|
|
|
+ screenshot.setImageBitmap(bitmap)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|