0元购 添加title
This commit is contained in:
parent
667a922d97
commit
366c52738f
|
|
@ -4,8 +4,12 @@ import android.app.Activity
|
|||
import android.content.Intent
|
||||
import android.view.LayoutInflater
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.updatePadding
|
||||
import com.ama.core.architecture.appBase.AppViewsActivity
|
||||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.gamedog.vididin.R
|
||||
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
||||
import com.gamedog.vididin.router.Router
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
|
@ -35,10 +39,26 @@ class ZeroBuyActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
|||
}
|
||||
|
||||
|
||||
|
||||
titlebar.setTitleText(R.string.zero_buy)
|
||||
titlebar.addRightIcon(R.mipmap.icon_question_mark, {
|
||||
showHintInfo()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun ViewBinding.initWindowInsets() {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(contentRoot) { v, insets ->
|
||||
val systemBars =
|
||||
insets.getInsets(WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout())
|
||||
v.updatePadding(top = systemBars.top)
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
private fun showHintInfo() {
|
||||
//TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun ViewBinding.initListeners() {
|
||||
//TODO("Not yet implemented")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,17 @@
|
|||
android:scaleType="centerCrop"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/content_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<com.ama.core.architecture.widget.CustomTitleBar
|
||||
android:id="@+id/titlebar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -130,8 +141,7 @@
|
|||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -39,6 +39,9 @@
|
|||
<string name="record_win_item_desc">Sorteio 333 - Grupo de 100</string>
|
||||
<string name="zero_menu_records">Meus Prêmios</string>
|
||||
<string name="lottery_record">Histórico de Prêmios</string>
|
||||
<string name="zero_buy">Festa Grátis</string>
|
||||
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
@ -91,7 +91,7 @@ class CustomTitleBar @JvmOverloads constructor(
|
|||
newImageView.setImageResource(iconRes)
|
||||
|
||||
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
||||
layoutParam.marginStart = 15.dp
|
||||
layoutParam.marginEnd = 15.dp
|
||||
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
||||
|
||||
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
||||
|
|
@ -102,7 +102,7 @@ class CustomTitleBar @JvmOverloads constructor(
|
|||
newImageView.text = ResUtil.getString(textRes)
|
||||
|
||||
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
||||
layoutParam.marginStart = 15.dp
|
||||
layoutParam.marginEnd = 15.dp
|
||||
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
||||
|
||||
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
||||
|
|
|
|||
Loading…
Reference in New Issue