应用到 boxAct, 替换home drag 图标
This commit is contained in:
parent
e7ab378394
commit
111e1a88b2
|
|
@ -56,7 +56,7 @@
|
||||||
app:progressColor="@color/progress_green"
|
app:progressColor="@color/progress_green"
|
||||||
app:backgroundColor="@color/progress_background"
|
app:backgroundColor="@color/progress_background"
|
||||||
app:progressWidth="2dp"
|
app:progressWidth="2dp"
|
||||||
app:centerIcon="@mipmap/home_envelope"
|
app:centerIcon="@mipmap/icon_home_drag_gold"
|
||||||
app:currentProgress="0"
|
app:currentProgress="0"
|
||||||
app:maxProgress="100"
|
app:maxProgress="100"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
|
|
@ -57,6 +57,6 @@
|
||||||
<string name="withdraw_normal_fail">Other Error</string>
|
<string name="withdraw_normal_fail">Other Error</string>
|
||||||
<string name="withdraw_account_invalid">Account Error</string>
|
<string name="withdraw_account_invalid">Account Error</string>
|
||||||
<string name="withdraw_fail_reach_times_limit">Daily limit reached</string>
|
<string name="withdraw_fail_reach_times_limit">Daily limit reached</string>
|
||||||
<string name="has_claim_box_cash_hint">Has claimed %f cash successfully.</string>
|
<string name="has_claim_box_cash_hint">Has claimed %s cash successfully.</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
<string name="box_subtask_hint_3_1">Assistir a 30 anúncios</string>
|
<string name="box_subtask_hint_3_1">Assistir a 30 anúncios</string>
|
||||||
<string name="box_subtask_hint_3_2">Assistir a 50 vídeos</string>
|
<string name="box_subtask_hint_3_2">Assistir a 50 vídeos</string>
|
||||||
<string name="box_subtask_hint_3_3">Participar de 10 compras gratuitas</string>
|
<string name="box_subtask_hint_3_3">Participar de 10 compras gratuitas</string>
|
||||||
<string name="has_claim_box_cash_hint">Parabéns! Você ganhou\n%d</string>
|
<string name="has_claim_box_cash_hint">Parabéns! Você ganhou \n %s</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="cur_version">Current Version:</string>
|
<string name="cur_version">Current Version:</string>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,10 @@ import android.view.PixelCopy
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
|
import android.widget.FrameLayout
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
import androidx.appcompat.widget.AppCompatTextView
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
|
|
@ -26,6 +29,7 @@ import androidx.core.graphics.createBitmap
|
||||||
import com.ama.core.architecture.BaseApp
|
import com.ama.core.architecture.BaseApp
|
||||||
import com.ama.core.architecture.R
|
import com.ama.core.architecture.R
|
||||||
import com.ama.core.architecture.databinding.LayoutToastCenterBinding
|
import com.ama.core.architecture.databinding.LayoutToastCenterBinding
|
||||||
|
import com.ama.core.architecture.util.ResUtil.dp
|
||||||
import com.google.android.gms.ads.identifier.AdvertisingIdClient
|
import com.google.android.gms.ads.identifier.AdvertisingIdClient
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
|
|
@ -84,8 +88,17 @@ class AndroidUtil private constructor() {
|
||||||
|
|
||||||
fun showCustomToast(textStr: String, iconRes: Int = 0) {
|
fun showCustomToast(textStr: String, iconRes: Int = 0) {
|
||||||
val layout: View = LayoutInflater.from(BaseApp.appContext()).inflate(R.layout.layout_toast_center, null)
|
val layout: View = LayoutInflater.from(BaseApp.appContext()).inflate(R.layout.layout_toast_center, null)
|
||||||
layout.findViewById<AppCompatImageView>(R.id.iv_top).setImageResource(iconRes)
|
|
||||||
layout.findViewById<AppCompatTextView>(R.id.tv_bottom).text = textStr
|
val container: FrameLayout = layout.findViewById(R.id.toast_container)
|
||||||
|
val params = FrameLayout.LayoutParams(240.dp.toInt(), 120.dp.toInt()).apply {
|
||||||
|
gravity = Gravity.CENTER
|
||||||
|
}
|
||||||
|
container.layoutParams = params
|
||||||
|
|
||||||
|
if (iconRes > 0) {
|
||||||
|
layout.findViewById<ImageView>(R.id.iv_top).setImageResource(iconRes)
|
||||||
|
}
|
||||||
|
layout.findViewById<TextView>(R.id.tv_bottom).text = textStr
|
||||||
|
|
||||||
Toast(BaseApp.appContext()).apply {
|
Toast(BaseApp.appContext()).apply {
|
||||||
duration = Toast.LENGTH_SHORT
|
duration = Toast.LENGTH_SHORT
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,17 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="240dp"
|
android:layout_width="240dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="120dp"
|
||||||
android:minHeight="120dp"
|
|
||||||
android:background="@drawable/bg_custom_toast"
|
android:background="@drawable/bg_custom_toast"
|
||||||
|
android:padding="15dp"
|
||||||
tools:ignore="ResourceName">
|
tools:ignore="ResourceName">
|
||||||
|
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
|
android:id="@+id/toast_container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
|
@ -29,7 +33,7 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="hint"
|
android:text="hint"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
android:textStyle="bold" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
Loading…
Reference in New Issue