Skip to content

Commit

Permalink
Remove text only banners for visual content
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Sep 26, 2023
1 parent a307ff9 commit 6a8d31a
Show file tree
Hide file tree
Showing 20 changed files with 12 additions and 251 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
compileSdk 34
minSdk 16
targetSdk 34
versionName "4.0.9"
versionName "4.1.0"
versionCode = versionName.replace(".","").toInteger() * 10

vectorDrawables {
Expand Down
15 changes: 2 additions & 13 deletions app/src/main/java/com/hiddenramblings/tagmo/BrowserActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
private var menuFilterAmiiboSeries: MenuItem? = null
private var menuFilterAmiiboType: MenuItem? = null
private var menuFilterGameTitles: MenuItem? = null
private var menuViewSimple: MenuItem? = null
private var menuViewCompact: MenuItem? = null
private var menuViewLarge: MenuItem? = null
private var menuViewImage: MenuItem? = null
Expand Down Expand Up @@ -558,7 +557,7 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
onCreateMainMenuLayout()
}

fun requestStoragePermission() {
private fun requestStoragePermission() {
if (Version.isRedVelvet) {
if (BuildConfig.GOOGLE_PLAY) {
onDocumentEnabled()
Expand Down Expand Up @@ -1474,14 +1473,6 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
it.notifyChanges()
}
}
R.id.view_simple -> {
amiibosView?.layoutManager = LinearLayoutManager(this)
foomiiboView?.layoutManager = LinearLayoutManager(this)
settings?.let {
it.amiiboView = VIEW.SIMPLE.value
it.notifyChanges()
}
}
R.id.view_compact -> {
amiibosView?.layoutManager = LinearLayoutManager(this)
foomiiboView?.layoutManager = LinearLayoutManager(this)
Expand Down Expand Up @@ -1569,7 +1560,6 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
menuFilterAmiiboSeries = menu.findItem(R.id.filter_amiibo_series)
menuFilterAmiiboType = menu.findItem(R.id.filter_amiibo_type)
menuFilterGameTitles = menu.findItem(R.id.filter_game_titles)
menuViewSimple = menu.findItem(R.id.view_simple)
menuViewCompact = menu.findItem(R.id.view_compact)
menuViewLarge = menu.findItem(R.id.view_large)
menuViewImage = menu.findItem(R.id.view_image)
Expand Down Expand Up @@ -2040,10 +2030,9 @@ class BrowserActivity : AppCompatActivity(), BrowserSettingsListener,
}

private fun onViewChanged() {
if (null == menuViewSimple) return
if (null == menuViewCompact) return
settings?.let {
when (VIEW.valueOf(it.amiiboView)) {
VIEW.SIMPLE -> menuViewSimple?.isChecked = true
VIEW.COMPACT -> menuViewCompact?.isChecked = true
VIEW.LARGE -> menuViewLarge?.isChecked = true
VIEW.IMAGE -> menuViewImage?.isChecked = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ open class BrowserSettings : Parcelable {
}

enum class FILTER {
CHARACTER, GAME_SERIES, AMIIBO_SERIES, AMIIBO_TYPE, GAME_TITLES
CHARACTER, GAME_SERIES, AMIIBO_SERIES, AMIIBO_TYPE, GAME_TITLES;
}

enum class VIEW(val value: Int) {
SIMPLE(0), COMPACT(1), LARGE(2), IMAGE(3);
COMPACT(1), LARGE(2), IMAGE(3);

companion object {
fun valueOf(value: Int): VIEW {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ class BrowserAdapter(
VIEW.COMPACT -> CompactViewHolder(parent, settings, listener)
VIEW.LARGE -> LargeViewHolder(parent, settings, listener)
VIEW.IMAGE -> ImageViewHolder(parent, settings, listener)
VIEW.SIMPLE -> SimpleViewHolder(parent, settings, listener)
}.apply {
itemView.setOnClickListener { handleClickEvent(this) }
imageAmiibo?.setOnClickListener {
Expand Down Expand Up @@ -396,15 +395,6 @@ class BrowserAdapter(
}
}

internal class SimpleViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnAmiiboClickListener?
) : AmiiboViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.amiibo_simple_card, parent, false
),
settings, listener
)

internal class CompactViewHolder(
parent: ViewGroup, settings: BrowserSettings,
listener: OnAmiiboClickListener?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class EliteBankAdapter(
VIEW.COMPACT -> CompactViewHolder(parent, settings, listener)
VIEW.LARGE -> LargeViewHolder(parent, settings, listener)
VIEW.IMAGE -> ImageViewHolder(parent, settings, listener)
VIEW.SIMPLE -> SimpleViewHolder(parent, settings, listener)
}.apply {
val highlight = itemView.findViewById<View>(R.id.highlight)
if (mPrefs.eliteActiveBank() == bindingAdapterPosition) {
Expand Down Expand Up @@ -185,15 +184,6 @@ class EliteBankAdapter(
}
}

internal class SimpleViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnAmiiboClickListener?
) : AmiiboViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.amiibo_simple_card, parent, false
),
settings, listener
)

internal class CompactViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnAmiiboClickListener?
) : AmiiboViewHolder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class FoomiiboAdapter(
VIEW.COMPACT -> CompactViewHolder(parent, settings, listener)
VIEW.LARGE -> LargeViewHolder(parent, settings, listener)
VIEW.IMAGE -> ImageViewHolder(parent, settings, listener)
VIEW.SIMPLE -> SimpleViewHolder(parent, settings, listener)
}.apply {
itemView.setOnClickListener { handleClickEvent(this) }
imageAmiibo?.setOnClickListener {
Expand Down Expand Up @@ -312,15 +311,6 @@ class FoomiiboAdapter(
}
}

internal class SimpleViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnFoomiiboClickListener?
) : FoomiiboViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.amiibo_simple_card, parent, false
),
settings, listener
)

internal class CompactViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnFoomiiboClickListener?
) : FoomiiboViewHolder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class GattSlotAdapter(
VIEW.COMPACT -> CompactViewHolder(parent, settings, listener)
VIEW.LARGE -> LargeViewHolder(parent, settings, listener)
VIEW.IMAGE -> ImageViewHolder(parent, settings, listener)
VIEW.SIMPLE -> SimpleViewHolder(parent, settings, listener)
}.apply {
itemView.setOnClickListener {
listener?.onAmiiboClicked(amiibo, bindingAdapterPosition)
Expand Down Expand Up @@ -183,15 +182,6 @@ class GattSlotAdapter(
}
}

internal class SimpleViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnAmiiboClickListener?
) : BluupViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.amiibo_simple_card, parent, false
),
settings, listener
)

internal class CompactViewHolder(
parent: ViewGroup, settings: BrowserSettings, listener: OnAmiiboClickListener?
) : BluupViewHolder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ class WriteTagAdapter(private val settings: BrowserSettings?) :
VIEW.COMPACT -> CompactViewHolder(parent, settings)
VIEW.LARGE -> LargeViewHolder(parent, settings)
VIEW.IMAGE -> ImageViewHolder(parent, settings)
VIEW.SIMPLE -> SimpleViewHolder(parent, settings)
}.apply {
itemView.setOnClickListener {
handleClickEvent(this, bindingAdapterPosition)
Expand Down Expand Up @@ -388,14 +387,6 @@ class WriteTagAdapter(private val settings: BrowserSettings?) :
}
}

internal class SimpleViewHolder(parent: ViewGroup, settings: BrowserSettings?) :
AmiiboViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.amiibo_simple_card, parent, false
),
settings
)

internal class CompactViewHolder(parent: ViewGroup, settings: BrowserSettings?) :
AmiiboViewHolder(
LayoutInflater.from(parent.context).inflate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class GattService : Service() {
private var chunkNumber = 0

enum class SORTING {
MANUAL, SEQUENTIAL, AUTO
MANUAL, SEQUENTIAL, AUTO;
}

@Suppress("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.util.UUID

object Nordic {
enum class DEVICE {
FLASK, SLIDE, BLUUP, LINK, LOOP, PIXL, PUCK, GATT
FLASK, SLIDE, BLUUP, LINK, LOOP, PIXL, PUCK, GATT;
}

val NUS = UUID.fromString("6e400001-b5a3-f393-e0a9-e50e24dcca9e")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ class EliteBankFragment : Fragment(), EliteBankAdapter.OnAmiiboClickListener {
private var refreshListener: RefreshListener? = null

private enum class CLICKED {
NOTHING, WRITE_DATA, EDIT_DATA, HEX_CODE, BANK_BACKUP, VERIFY_TAG, ERASE_BANK
NOTHING, WRITE_DATA, EDIT_DATA, HEX_CODE, BANK_BACKUP, VERIFY_TAG, ERASE_BANK;
}

private var status = CLICKED.NOTHING

private enum class SHEET {
LOCKED, AMIIBO, MENU, WRITE
LOCKED, AMIIBO, MENU, WRITE;
}

private var browserActivity: BrowserActivity? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ open class GattSlotFragment : Fragment(), GattSlotAdapter.OnAmiiboClickListener,
private var chunkTimeout = 25L

private enum class STATE {
NONE, SCANNING, CONNECT, MISSING, TIMEOUT
NONE, SCANNING, CONNECT, MISSING, TIMEOUT;
}

private var deviceState = STATE.NONE

private enum class NOTICE {
UPLOAD, REMOVE, CREATE, FORMAT
UPLOAD, REMOVE, CREATE, FORMAT;
}

private enum class SHEET {
LOCKED, AMIIBO, MENU, WRITE
LOCKED, AMIIBO, MENU, WRITE;
}

private var browserActivity: BrowserActivity? = null
Expand Down
Loading

0 comments on commit 6a8d31a

Please sign in to comment.