アプリ設定画面に子画面を設ける
This commit is contained in:
parent
6e167dd306
commit
c741c7de39
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.graphics.*
|
||||
import android.net.Uri
|
||||
import it.sephiroth.android.library.exif2.ExifInterface
|
||||
import java.io.FileNotFoundException
|
||||
|
||||
object BitmapUtils {
|
||||
internal val log = LogCategory("BitmapUtils")
|
||||
|
@ -56,7 +57,7 @@ fun createResizedBitmap(
|
|||
}
|
||||
|
||||
val resize_to = Math.min(size, resizeToArg)
|
||||
|
||||
|
||||
// inSampleSizeを計算
|
||||
var bits = 0
|
||||
var x = size
|
||||
|
@ -177,10 +178,12 @@ fun createResizedBitmap(
|
|||
} finally {
|
||||
sourceBitmap.recycle()
|
||||
}
|
||||
} catch(ex : FileNotFoundException) {
|
||||
BitmapUtils.log.w(ex, "not found. $uri")
|
||||
} catch(ex : SecurityException) {
|
||||
BitmapUtils.log.w(ex, "maybe we need pick up image again.")
|
||||
} catch(ex : Throwable) {
|
||||
BitmapUtils.log.trace(ex,"createResizedBitmap")
|
||||
BitmapUtils.log.trace(ex, "createResizedBitmap")
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="128dp"
|
||||
android:paddingTop="12dp"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="48dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="6dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
|
@ -24,9 +24,9 @@
|
|||
android:id="@+id/tvDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="?attr/colorTimeSmall"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue