diff --git a/app/build.gradle b/app/build.gradle index b54e9d8..9b987db 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -116,7 +116,7 @@ dependencies { implementation 'cat.ereza:customactivityoncrash:2.3.0' implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" implementation 'androidx.appcompat:appcompat:1.5.0' - implementation 'com.google.android.material:material:1.7.0-rc01' + implementation 'com.google.android.material:material:1.9.0-beta01' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" diff --git a/app/src/main/java/com/coldmint/rust/pro/UserHomePageActivity.kt b/app/src/main/java/com/coldmint/rust/pro/UserHomePageActivity.kt index b4463c4..f035183 100644 --- a/app/src/main/java/com/coldmint/rust/pro/UserHomePageActivity.kt +++ b/app/src/main/java/com/coldmint/rust/pro/UserHomePageActivity.kt @@ -194,7 +194,6 @@ class UserHomePageActivity : BaseActivity() { viewBinding.loginTimeView.text = String.format( getString(R.string.user_info), spaceInfoData.data.loginTime, - spaceInfoData.data.account, spaceInfoData.data.location ) diff --git a/app/src/main/java/com/coldmint/rust/pro/adapters/DynamicAdapter.kt b/app/src/main/java/com/coldmint/rust/pro/adapters/DynamicAdapter.kt index cd04566..822bc12 100644 --- a/app/src/main/java/com/coldmint/rust/pro/adapters/DynamicAdapter.kt +++ b/app/src/main/java/com/coldmint/rust/pro/adapters/DynamicAdapter.kt @@ -59,10 +59,10 @@ class DynamicAdapter(context: Context, dataList: MutableList + TextStyleMaker.instance.load(viewBinding.contentView, data.content) { type, data -> TextStyleMaker.instance.clickEvent(context, type, data) } - viewBinding.textview.setOnLongClickListener { view -> + viewBinding.contentView.setOnLongClickListener { view -> val menu = GlobalMethod.createPopMenu(view) menu.menu.add(R.string.copy) menu.menu.add(R.string.delete_title) diff --git a/app/src/main/java/com/coldmint/rust/pro/base/BaseActivity.kt b/app/src/main/java/com/coldmint/rust/pro/base/BaseActivity.kt index feb4028..9bec71a 100644 --- a/app/src/main/java/com/coldmint/rust/pro/base/BaseActivity.kt +++ b/app/src/main/java/com/coldmint/rust/pro/base/BaseActivity.kt @@ -49,15 +49,27 @@ abstract class BaseActivity : } override fun onCreate(savedInstanceState: Bundle?) { - WindowCompat.setDecorFitsSystemWindows(window, false) - super.onCreate(savedInstanceState) - whenCreateActivity(savedInstanceState, false) - setContentView(viewBinding.root) - val toolBar = findViewById(R.id.toolbar) - if (toolBar != null) { - setSupportActionBar(toolBar) + try { + WindowCompat.setDecorFitsSystemWindows(window, false) + super.onCreate(savedInstanceState) + whenCreateActivity(savedInstanceState, false) + setContentView(viewBinding.root) + val toolBar = findViewById(R.id.toolbar) + if (toolBar != null) { + setSupportActionBar(toolBar) + } + whenCreateActivity(savedInstanceState, true) + } catch (e: Exception) { + e.printStackTrace() + val dialog = CoreDialog(this) + dialog.setTitle(R.string.error) + dialog.setMessage(e.toString()) + dialog.setPositiveButton(R.string.dialog_close) { + finish() + } + dialog.show() + } - whenCreateActivity(savedInstanceState, true) } @@ -163,8 +175,8 @@ abstract class BaseActivity : Snackbar.LENGTH_SHORT ) .setAction(R.string.show_details) { - CoreDialog(this).setTitle(R.string.details).setMessage( thisMsg) - .setPositiveButton(R.string.dialog_ok){ + CoreDialog(this).setTitle(R.string.details).setMessage(thisMsg) + .setPositiveButton(R.string.dialog_ok) { }.show() }.show() diff --git a/app/src/main/java/com/coldmint/rust/pro/tool/TextStyleMaker.kt b/app/src/main/java/com/coldmint/rust/pro/tool/TextStyleMaker.kt index d1777fe..2b52e1e 100644 --- a/app/src/main/java/com/coldmint/rust/pro/tool/TextStyleMaker.kt +++ b/app/src/main/java/com/coldmint/rust/pro/tool/TextStyleMaker.kt @@ -104,71 +104,71 @@ class TextStyleMaker private constructor() { val num3 = start3Index val type = spannable.subSequence(num1 + start.length, num2).toString() val data: String = spannable.subSequence(num2 + start2.length, num3).toString() - val chipDrawable = ChipDrawable.createFromResource(context, R.xml.chip) - chipDrawable.text = data - when (type) { - "mod" -> { - chipDrawable.chipIcon = context.getDrawable(R.drawable.mod) - } - "user" -> { - chipDrawable.chipIcon = context.getDrawable(R.drawable.head_icon) -// User.getIcon(data, object : ApiCallBack { -// override fun onResponse(t: IconData) { -// val data2 = t.data -// if (data2 != null) { -// chipDrawable.text = data2.userName -// -// Glide.with(context) -// .load(ServerConfiguration.getRealLink(data2.headIcon!!)) -// .apply(GlobalMethod.getRequestOptions(true)) -// .into( -// object : CustomTarget() { -// override fun onResourceReady( -// resource: Drawable, -// transition: Transition? -// ) { -// chipDrawable.chipIcon = resource -// } -// -// override fun onLoadCleared(placeholder: Drawable?) { -// -// } -// -// } -// ) -// } -// } -// -// override fun onFailure(e: Exception) { -// } -// -// }) - } - "activate"->{ - chipDrawable.chipIcon = - context.getDrawable(R.drawable.store) - chipDrawable.text = context.getString(R.string.activate) - } - "link" -> { - chipDrawable.chipIcon = - context.getDrawable(R.drawable.ic_baseline_link_24) - } - else -> { - chipDrawable.chipIcon = context.getDrawable(R.drawable.image) - } - } - chipDrawable.closeIcon = null - chipDrawable.setBounds( - 0, - 0, - chipDrawable.intrinsicWidth, - chipDrawable.intrinsicHeight - ) - val span = ImageSpan(chipDrawable) - spannable.setSpan( - span, startIndex, - start3Index + start3.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE - ) +// val chipDrawable = ChipDrawable.createFromResource(context, R.xml.chip) +// chipDrawable.text = data +// when (type) { +// "mod" -> { +// chipDrawable.chipIcon = context.getDrawable(R.drawable.mod) +// } +// "user" -> { +// chipDrawable.chipIcon = context.getDrawable(R.drawable.head_icon) +//// User.getIcon(data, object : ApiCallBack { +//// override fun onResponse(t: IconData) { +//// val data2 = t.data +//// if (data2 != null) { +//// chipDrawable.text = data2.userName +//// +//// Glide.with(context) +//// .load(ServerConfiguration.getRealLink(data2.headIcon!!)) +//// .apply(GlobalMethod.getRequestOptions(true)) +//// .into( +//// object : CustomTarget() { +//// override fun onResourceReady( +//// resource: Drawable, +//// transition: Transition? +//// ) { +//// chipDrawable.chipIcon = resource +//// } +//// +//// override fun onLoadCleared(placeholder: Drawable?) { +//// +//// } +//// +//// } +//// ) +//// } +//// } +//// +//// override fun onFailure(e: Exception) { +//// } +//// +//// }) +// } +// "activate"->{ +// chipDrawable.chipIcon = +// context.getDrawable(R.drawable.store) +// chipDrawable.text = context.getString(R.string.activate) +// } +// "link" -> { +// chipDrawable.chipIcon = +// context.getDrawable(R.drawable.ic_baseline_link_24) +// } +// else -> { +// chipDrawable.chipIcon = context.getDrawable(R.drawable.image) +// } +// } +// chipDrawable.closeIcon = null +// chipDrawable.setBounds( +// 0, +// 0, +// chipDrawable.intrinsicWidth, +// chipDrawable.intrinsicHeight +// ) +// val span = ImageSpan(chipDrawable) +// spannable.setSpan( +// span, startIndex, +// start3Index + start3.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE +// ) spannable.setSpan( object : ClickableSpan() { override fun onClick(p0: View) { diff --git a/app/src/main/res/drawable/more.xml b/app/src/main/res/drawable/more.xml index ada207b..fd54322 100644 --- a/app/src/main/res/drawable/more.xml +++ b/app/src/main/res/drawable/more.xml @@ -1,6 +1,7 @@ diff --git a/app/src/main/res/drawable/outline_thumb_up_24.xml b/app/src/main/res/drawable/outline_thumb_up_24.xml new file mode 100644 index 0000000..0a55226 --- /dev/null +++ b/app/src/main/res/drawable/outline_thumb_up_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/fragment_web_mod_details.xml b/app/src/main/res/layout/fragment_web_mod_details.xml index 492dd30..deb7ba5 100644 --- a/app/src/main/res/layout/fragment_web_mod_details.xml +++ b/app/src/main/res/layout/fragment_web_mod_details.xml @@ -110,6 +110,8 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:layout_margin="8dp" + android:background="?attr/selectableItemBackgroundBorderless" + android:clickable="false" android:src="@drawable/next" /> diff --git a/app/src/main/res/layout/head_layout.xml b/app/src/main/res/layout/head_layout.xml index b66ab79..7b274f3 100644 --- a/app/src/main/res/layout/head_layout.xml +++ b/app/src/main/res/layout/head_layout.xml @@ -7,12 +7,15 @@ android:orientation="vertical"> + android:src="@drawable/head_icon" + android:focusable="true" /> + android:src="@drawable/head_icon" + android:focusable="true" /> + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_dynamic.xml b/app/src/main/res/layout/item_dynamic.xml index 3034324..b4a3058 100644 --- a/app/src/main/res/layout/item_dynamic.xml +++ b/app/src/main/res/layout/item_dynamic.xml @@ -11,6 +11,7 @@ android:layout_margin="16dp"> + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_insert_coins.xml b/app/src/main/res/layout/item_insert_coins.xml index 18d83cd..e744871 100644 --- a/app/src/main/res/layout/item_insert_coins.xml +++ b/app/src/main/res/layout/item_insert_coins.xml @@ -4,6 +4,9 @@ android:layout_height="wrap_content"> + android:text="@string/name" /> diff --git a/app/src/main/res/layout/item_user_head.xml b/app/src/main/res/layout/item_user_head.xml index 4739d86..ac97135 100644 --- a/app/src/main/res/layout/item_user_head.xml +++ b/app/src/main/res/layout/item_user_head.xml @@ -6,6 +6,7 @@ android:orientation="vertical"> The server has changed. The order management logout - %1$s uid:%2$s location:%3$s Will use coupons to create orders, still continue\? (After creating the order, use the coupon) use Account/email diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 0abce25..abe64ef 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -788,7 +788,6 @@ サーバーを変更しました。 注文管理 掲載 - 最近ログイン:%1$s uid:%2$s 住所:%3$s クーポンを使った注文を作成しますが、継続しますか\?(注文作成完了後、クーポンを消費) 使用 アカウント/ eメール diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index ffdd7a3..6a7d3a2 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -787,7 +787,6 @@ Сервер был изменен. Управление заказом напечата - Зарегистрировано недавно :%1$s uid:%2$s местожительство:%3$s Мы используем купоны, чтобы создать порядок. (после создания заказа, купоны будут расходуться) использова Номер счета/письмо diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ef9e195..e85561c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -826,7 +826,7 @@ 已更改服务器。 订单管理 登出 - 最近登录:%1$s uid:%2$s ip归属地:%3$s + 最近登录:%1$s ip归属地:%2$s 将使用优惠券创建订单,仍继续嘛?(创建订单完成后,将优惠券消耗) 使用 账号/电子邮件 @@ -956,4 +956,5 @@ 公开 私有 最低游戏版本 + 点赞 \ No newline at end of file