Clean up binds
This commit is contained in:
parent
a74ccdcfcb
commit
3c40669bad
|
@ -122,7 +122,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
initializePdfDocument()
|
||||
pdfDocument.renderThumbnails(thumbnailWidth, thumbnailHeight)
|
||||
val container = findViewById<LinearLayout>(R.id.thumbnails_layout)
|
||||
val container = binding.appBarMain.contentMain.thumbnailsLayout
|
||||
for (bitmap in pdfDocument.bitmapThumbnails.values) {
|
||||
val img = ImageView(this)
|
||||
img.setImageBitmap(bitmap)
|
||||
|
@ -130,7 +130,7 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
presentationView()
|
||||
|
||||
val containerScroll = findViewById<HorizontalScrollView>(R.id.thumbnails_scroll)
|
||||
val containerScroll = binding.appBarMain.contentMain.thumbnailsScroll
|
||||
containerScroll.viewTreeObserver.addOnScrollChangedListener {
|
||||
presentationScroll.scrollTo(
|
||||
containerScroll.scrollX * (presentationLayout.width - presentationScroll.width) / (container.width - containerScroll.width),
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_main" />
|
||||
<include android:id="@+id/content_main" layout="@layout/content_main" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
|
|
Loading…
Reference in New Issue