-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bd330e
commit 3b04ff9
Showing
4 changed files
with
61 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
imagehelper/src/main/java/io/haruharu/imagehelper/picker/ImagePicker.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.haruharu.imagehelper.picker | ||
|
||
import android.annotation.SuppressLint | ||
import android.os.Bundle | ||
import android.os.Handler | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.appcompat.app.AppCompatDialogFragment | ||
import androidx.fragment.app.DialogFragment | ||
import io.haruharu.imagehelper.R | ||
|
||
class ImagePicker : AppCompatDialogFragment() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
setStyle(DialogFragment.STYLE_NO_TITLE, 0) | ||
super.onCreate(savedInstanceState) | ||
} | ||
|
||
// override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
// return if (viewModel.flagOfDirectAlbum) { | ||
// Handler().postDelayed({ pickImageFromAlbum() }, 600) | ||
// inflater.inflate(R.layout.dialog_empty, null) | ||
// } | ||
// else { | ||
// inflater.inflate(R.layout.dialog_image_picker, null) | ||
// } | ||
// } | ||
// | ||
// override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
// super.onViewCreated(view, savedInstanceState) | ||
// | ||
// if (!viewModel.flagOfDirectAlbum) { | ||
// initViews() | ||
// bindViews() | ||
// } | ||
// } | ||
|
||
@SuppressLint("MissingSuperCall") | ||
override fun onResume() { | ||
super.onResume() | ||
dialog?.window!!.setLayout((280 * context!!.resources.displayMetrics.densityDpi / 160.0).toInt(), ViewGroup.LayoutParams.WRAP_CONTENT) | ||
} | ||
|
||
// - | ||
|
||
private fun initViews() { | ||
|
||
} | ||
|
||
private fun bindViews() { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters