|
|
@ -5,6 +5,7 @@ import android.content.Context |
|
|
|
import android.graphics.Typeface |
|
|
|
import android.graphics.Typeface |
|
|
|
import android.graphics.drawable.Drawable |
|
|
|
import android.graphics.drawable.Drawable |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.AttributeSet |
|
|
|
|
|
|
|
import android.view.Gravity |
|
|
|
import android.widget.FrameLayout |
|
|
|
import android.widget.FrameLayout |
|
|
|
import android.widget.ImageView |
|
|
|
import android.widget.ImageView |
|
|
|
import androidx.appcompat.widget.AppCompatImageView |
|
|
|
import androidx.appcompat.widget.AppCompatImageView |
|
|
@ -102,10 +103,16 @@ class ContentView : FrameLayout { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun setContent(textPage: TextPage?) { |
|
|
|
fun setContent(textPage: TextPage?) { |
|
|
|
content_text_view.text = textPage?.text |
|
|
|
if (textPage != null) { |
|
|
|
tv_bottom_left.text = textPage?.title |
|
|
|
content_text_view.gravity = Gravity.START |
|
|
|
pageSize = textPage?.pageSize ?: 0 |
|
|
|
content_text_view.text = textPage.text |
|
|
|
setPageIndex(textPage?.index) |
|
|
|
tv_bottom_left.text = textPage.title |
|
|
|
|
|
|
|
pageSize = textPage.pageSize |
|
|
|
|
|
|
|
setPageIndex(textPage.index) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
content_text_view.gravity = Gravity.CENTER |
|
|
|
|
|
|
|
content_text_view.setText(R.string.data_loading) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("SetTextI18n") |
|
|
|
@SuppressLint("SetTextI18n") |
|
|
|