Skip to content

Commit

Permalink
feat(zenledger): add png icons and refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Mar 29, 2024
1 parent 83d4697 commit be3de28
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
Binary file added wallet/res/drawable-hdpi/ic_zenledger_dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/drawable-mdpi/ic_zenledger_dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/drawable-xhdpi/ic_zenledger_dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/drawable-xxhdpi/ic_zenledger_dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wallet/res/drawable-xxxhdpi/ic_zenledger_dash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion wallet/res/layout/dialog_zenledger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
android:id="@+id/zenledger_icon"
android:layout_width="95dp"
android:layout_height="95dp"
android:layout_marginVertical="20dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/collapse_button"
app:layout_constraintBottom_toTopOf="@id/text_container"
android:src="@drawable/ic_zenledger_icon"
android:src="@drawable/ic_zenledger_dash"
/>

<LinearLayout
Expand Down
4 changes: 2 additions & 2 deletions wallet/src/de/schildbach/wallet/ui/more/ToolsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import de.schildbach.wallet.security.SecurityFunctions
import de.schildbach.wallet.ui.AddressBookActivity
import de.schildbach.wallet.ui.ExportTransactionHistoryDialogBuilder
import de.schildbach.wallet.ui.NetworkMonitorActivity
import de.schildbach.wallet.ui.more.tools.ZenLedgerDialog
import de.schildbach.wallet.ui.more.tools.ZenLedgerDialogFragment
import de.schildbach.wallet.ui.payments.SweepWalletActivity
import de.schildbach.wallet.util.Toast
import de.schildbach.wallet_test.R
Expand Down Expand Up @@ -135,7 +135,7 @@ class ToolsFragment : Fragment(R.layout.fragment_tools) {
}

binding.zenledgerExport.setOnClickListener {
ZenLedgerDialog().show(requireActivity())
ZenLedgerDialogFragment().show(requireActivity())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.dash.wallet.common.ui.viewBinding
import org.dash.wallet.common.util.openCustomTab

@AndroidEntryPoint
class ZenLedgerDialog : OffsetDialogFragment(R.layout.dialog_zenledger) {
class ZenLedgerDialogFragment : OffsetDialogFragment(R.layout.dialog_zenledger) {
private val binding by viewBinding(DialogZenledgerBinding::bind)
val viewModel by viewModels<ZenLedgerViewModel>()

Expand Down Expand Up @@ -60,14 +60,14 @@ class ZenLedgerDialog : OffsetDialogFragment(R.layout.dialog_zenledger) {
getString(R.string.button_close)
).showAsync(requireActivity())
}
} else {
AdaptiveDialog.create(
null,
getString(R.string.chain_syncing),
getString(R.string.chain_syncing_default_message),
getString(R.string.button_close)
).showAsync(requireActivity())
}
} else {
AdaptiveDialog.create(
null,
getString(R.string.chain_syncing),
getString(R.string.chain_syncing_default_message),
getString(R.string.button_close)
).showAsync(requireActivity())
}
}
}
Expand Down

0 comments on commit be3de28

Please sign in to comment.