This commit is contained in:
lunaticbum 2025-08-14 16:48:48 +09:00
parent 068a7bd8e2
commit ed8b691452
8 changed files with 125 additions and 53 deletions

View File

@ -118,6 +118,9 @@ dependencies {
implementation("com.vladsch.flexmark:flexmark-all:0.64.0") implementation("com.vladsch.flexmark:flexmark-all:0.64.0")
// implementation 'com.vladsch.flexmark:flexmark-all:0.64.8' // implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
// implementation("org.opencv:opencv-android:4.11.0") // implementation("org.opencv:opencv-android:4.11.0")
// build.gradle에 추가
implementation ("com.github.aeonSolutions:FloatingActionButtonMenuDrag:1.1")
implementation ("androidx.media:media:1.7.0") implementation ("androidx.media:media:1.7.0")

View File

@ -428,6 +428,11 @@ internal class LauncherActivity : CommonActivity() {
return super.dispatchGenericMotionEvent(ev) return super.dispatchGenericMotionEvent(ev)
} }
fun floatClick(v : View) {
Blog.LOGE("v >>> ${v}")
showContents(v.id)
}
override fun onNewIntent(intent: Intent?) { override fun onNewIntent(intent: Intent?) {
Blog.LOGE("onNewIntent intent >> ${intent}") Blog.LOGE("onNewIntent intent >> ${intent}")
if(intent?.action?.equals(Intent.ACTION_SEND) == true && if(intent?.action?.equals(Intent.ACTION_SEND) == true &&
@ -524,10 +529,15 @@ internal class LauncherActivity : CommonActivity() {
/* handle navigation back events */ /* handle navigation back events */
handleBackPress() handleBackPress()
updateLocationService() updateLocationService()
binding.feeds.isChecked = true
val intent = Intent(this, BluetoothManager::class.java) val intent = Intent(this, BluetoothManager::class.java)
ContextCompat.startForegroundService(this, intent) ContextCompat.startForegroundService(this, intent)
showContents(binding.feeds.id)
binding.floatingActionMenu.setOnMenuButtonClickListener { v->
Blog.LOGE("v >> ${v}")
showContents(v.id)
}
} }
fun showContents(id : Int) { fun showContents(id : Int) {

View File

@ -73,9 +73,9 @@ class BluetoothManager : Service() {
val filter = IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED) val filter = IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED)
registerReceiver(bluetoothreceiver, filter) registerReceiver(bluetoothreceiver, filter)
refreshFeeds() refreshFeeds()
GeckoWeb(applicationContext).apply { // GeckoWeb(applicationContext).apply {
loadUrl("https://arca.live/b/live") // loadUrl("https://arca.live/b/live")
} // }
} }
override fun onBind(intent: Intent?): IBinder? { override fun onBind(intent: Intent?): IBinder? {

View File

@ -619,6 +619,12 @@ class GeckoWeb : BWebview {
} }
} }
decoViews?.forEach {
if (it.id == R.id.back) {
it.setOnClickListener { session.goBack() }
}
}
} }
override fun onCanGoBack(session: GeckoSession, canGoBack: Boolean) { override fun onCanGoBack(session: GeckoSession, canGoBack: Boolean) {

View File

@ -630,6 +630,7 @@ internal class RssHome : Fragment() {
binding.geckoWeb.decoViews.add(binding.hide) binding.geckoWeb.decoViews.add(binding.hide)
binding.geckoWeb.decoViews.add(binding.vote) binding.geckoWeb.decoViews.add(binding.vote)
binding.geckoWeb.decoViews.add(binding.progressBar) binding.geckoWeb.decoViews.add(binding.progressBar)
binding.geckoWeb.decoViews.add(binding.back)
return binding.root return binding.root
} }

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
@ -15,7 +16,6 @@
android:visibility="visible" android:visibility="visible"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/base_bg"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
@ -39,49 +39,86 @@
app:singleSelection="true" app:singleSelection="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="35dp"> android:layout_height="35dp">
<androidx.appcompat.widget.AppCompatRadioButton
android:text="feeds"
android:id="@+id/feeds"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="booktoki"
android:id="@+id/books"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="newtoki"
android:id="@+id/webtoons"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="manatoki"
android:id="@+id/comics"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="perplexity"
android:id="@+id/perplexity"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="zota"
android:id="@+id/zota"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="twitter"
android:id="@+id/twitter"
style="@style/tabItem"
android:layout_height="match_parent"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:text="magnet"
android:id="@+id/magnet"
style="@style/tabItem"
android:layout_height="match_parent"/>
</RadioGroup> </RadioGroup>
</HorizontalScrollView> </HorizontalScrollView>
<aeonlabs.solutions.common.layout.fab.FloatingActionMenu
android:id="@+id/floating_action_menu"
android:layout_margin="5dp"
app:menu_colorNormal="#80FF0000"
app:menu_fab_size="mini"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_height="match_parent"
android:layout_width="match_parent"
>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="feeds"
android:id="@+id/feeds"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="booktoki"
android:id="@+id/books"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="newtoki"
android:id="@+id/webtoons"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="manatoki"
android:id="@+id/comics"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="perplexity"
android:id="@+id/perplexity"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="zota"
android:id="@+id/zota"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="twitter"
android:id="@+id/twitter"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
<aeonlabs.solutions.common.layout.fab.FloatingActionButton
app:fab_label="magnet"
android:id="@+id/magnet"
app:fab_showShadow="true"
app:fab_size="mini"
android:onClick="floatClick"
android:layout_width="wrap_content"
android:layout_height="20dp"/>
</aeonlabs.solutions.common.layout.fab.FloatingActionMenu>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,7 +3,6 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/transparent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -24,10 +23,23 @@
android:foregroundTint="@color/finestSilver" android:foregroundTint="@color/finestSilver"
tools:ignore="ContentDescription,UseAppTint" tools:ignore="ContentDescription,UseAppTint"
android:layout_height="30dp" /> android:layout_height="30dp" />
<ImageButton <ImageButton
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
android:id="@+id/back"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:visibility="visible"
android:background="@null"
android:src="@drawable/back_vector"
android:tint="@color/white"
android:foregroundTint="@color/white"
android:layout_width="40dp"
tools:ignore="ContentDescription"
android:layout_height="40dp" />
<ImageButton
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@id/back"
android:id="@+id/vote" android:id="@+id/vote"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:adjustViewBounds="true" android:adjustViewBounds="true"
@ -121,7 +133,7 @@
android:visibility="visible" android:visibility="visible"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/bookmark" app:layout_constraintTop_toBottomOf="@id/progressBar"
android:layout_height="0dp" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
/> />
@ -134,7 +146,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/bookmark" app:layout_constraintTop_toBottomOf="@id/progressBar"
android:layout_height="0dp" android:layout_height="0dp"
/> />
@ -149,9 +161,9 @@
android:layout_height="0dp"/> android:layout_height="0dp"/>
<ProgressBar <ProgressBar
app:layout_constraintTop_toTopOf="@id/geckoWeb" app:layout_constraintTop_toBottomOf="@id/home"
app:layout_constraintLeft_toLeftOf="@id/geckoWeb" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="@id/geckoWeb" app:layout_constraintRight_toRightOf="parent"
android:id="@+id/progressBar" android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal" style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -108,10 +108,13 @@
</style> </style>
<style name="tabItem"> <style name="tabItem">
<item name="android:button">@null</item>> <item name="android:button">@null</item>>
<item name="android:gravity">center</item>> <item name="android:gravity">center</item>>
<item name="android:background">@color/tabs_black</item>> <item name="android:background">@color/tabs_black</item>>
<item name="android:textColor">@color/white</item>> <item name="android:textColor">@color/white</item>>
<item name="android:layout_width">120dp</item>> <item name="android:layout_width">120dp</item>>
</style> </style>
</resources> </resources>