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.content.Intent
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import androidx.activity.viewModels
|
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.appBase.AppViewsActivity
|
||||||
import com.ama.core.architecture.util.setOnClickBatch
|
import com.ama.core.architecture.util.setOnClickBatch
|
||||||
|
import com.gamedog.vididin.R
|
||||||
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
import com.gamedog.vididin.main.interfaces.OnTabStyleListener
|
||||||
import com.gamedog.vididin.router.Router
|
import com.gamedog.vididin.router.Router
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
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() {
|
override fun ViewBinding.initListeners() {
|
||||||
//TODO("Not yet implemented")
|
//TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,123 +16,133 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/content_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:layout_marginHorizontal="22dp">
|
<com.ama.core.architecture.widget.CustomTitleBar
|
||||||
|
android:id="@+id/titlebar"
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="200dp">
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_zero_gold_num"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/red_00_dark"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:text="0"
|
|
||||||
android:paddingVertical="4dp"
|
|
||||||
android:paddingHorizontal="15dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:minWidth="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:drawableLeft="@mipmap/task_gold"
|
|
||||||
android:drawablePadding="5dp"
|
|
||||||
android:background="@drawable/bg_zero_gold_num"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_zero_lottery_list"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:textSize="10sp"
|
|
||||||
android:textColor="@color/red_10_dark"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:text="@string/zero_menu_records"
|
|
||||||
android:paddingVertical="9dp"
|
|
||||||
android:paddingHorizontal="15dp"
|
|
||||||
android:minWidth="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:background="@mipmap/zero_bg_menu"
|
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="15dp"
|
android:layout_marginHorizontal="22dp">
|
||||||
android:background="@drawable/zero_bg_4_items">
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="200dp">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_zero_gold_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/red_00_dark"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="0"
|
||||||
|
android:paddingVertical="4dp"
|
||||||
|
android:paddingHorizontal="15dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:minWidth="100dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:drawableLeft="@mipmap/task_gold"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:background="@drawable/bg_zero_gold_num"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_zero_lottery_list"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textColor="@color/red_10_dark"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="@string/zero_menu_records"
|
||||||
|
android:paddingVertical="9dp"
|
||||||
|
android:paddingHorizontal="15dp"
|
||||||
|
android:minWidth="100dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@mipmap/zero_bg_menu"
|
||||||
|
/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<!--第一行两个-->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:background="@drawable/zero_bg_4_items">
|
||||||
|
|
||||||
|
<!--第一行两个-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal">
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@mipmap/zero_bg_item">
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@mipmap/zero_bg_item">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:background="@mipmap/zero_bg_item">
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!--第一行两个-->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal"
|
||||||
android:orientation="vertical"
|
android:layout_marginTop="15dp">
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:background="@mipmap/zero_bg_item">
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@mipmap/zero_bg_item">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:background="@mipmap/zero_bg_item">
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<!--第一行两个-->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="15dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@mipmap/zero_bg_item">
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:background="@mipmap/zero_bg_item">
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
</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="record_win_item_desc">Sorteio 333 - Grupo de 100</string>
|
||||||
<string name="zero_menu_records">Meus Prêmios</string>
|
<string name="zero_menu_records">Meus Prêmios</string>
|
||||||
<string name="lottery_record">Histórico de Prêmios</string>
|
<string name="lottery_record">Histórico de Prêmios</string>
|
||||||
|
<string name="zero_buy">Festa Grátis</string>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -91,7 +91,7 @@ class CustomTitleBar @JvmOverloads constructor(
|
||||||
newImageView.setImageResource(iconRes)
|
newImageView.setImageResource(iconRes)
|
||||||
|
|
||||||
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
||||||
layoutParam.marginStart = 15.dp
|
layoutParam.marginEnd = 15.dp
|
||||||
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
||||||
|
|
||||||
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
||||||
|
|
@ -102,7 +102,7 @@ class CustomTitleBar @JvmOverloads constructor(
|
||||||
newImageView.text = ResUtil.getString(textRes)
|
newImageView.text = ResUtil.getString(textRes)
|
||||||
|
|
||||||
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
var layoutParam = LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)
|
||||||
layoutParam.marginStart = 15.dp
|
layoutParam.marginEnd = 15.dp
|
||||||
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
layoutParam.gravity = Gravity.CENTER_VERTICAL
|
||||||
|
|
||||||
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
mBinding.llRightRoot.addView(newImageView, layoutParam)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue