From e381baaeebc5b34b8c21f0f6d509b37e195af183 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期五, 29 十一月 2024 11:10:46 +0800
Subject: [PATCH] v2
---
app/src/main/java/com/shsening/autouploadvideos/MainActivity.kt | 37 ++++++++++++-------------------------
1 files changed, 12 insertions(+), 25 deletions(-)
diff --git a/app/src/main/java/com/shsening/autouploadvideos/MainActivity.kt b/app/src/main/java/com/shsening/autouploadvideos/MainActivity.kt
index ffa630e..2bc80da 100644
--- a/app/src/main/java/com/shsening/autouploadvideos/MainActivity.kt
+++ b/app/src/main/java/com/shsening/autouploadvideos/MainActivity.kt
@@ -2,41 +2,22 @@
import android.Manifest
import android.app.AlertDialog
-import android.content.ActivityNotFoundException
import android.content.Context
-import android.content.Intent
import android.content.pm.PackageManager
import android.os.Bundle
import android.view.View
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import android.graphics.Color
-import android.net.Uri
import android.provider.Settings
-import android.util.Log
import android.webkit.WebView
-import android.widget.TextView
-import android.widget.Toast
-import androidx.core.content.FileProvider
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
+import com.shsening.autouploadvideos.utils.Utils
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
-import okhttp3.Call
-import okhttp3.Callback
-import okhttp3.OkHttpClient
-import okhttp3.Request
-import okhttp3.Response
-import org.json.JSONArray
-import org.json.JSONObject
-import java.io.File
-import java.io.IOException
-import kotlinx.coroutines.*
-import okhttp3.internal.wait
-import java.io.FileOutputStream
-import java.util.concurrent.CountDownLatch
class MainActivity : AppCompatActivity() {
@@ -66,20 +47,26 @@
fragmentManager = supportFragmentManager
// 榛樿鏄剧ず绗竴涓� Fragment
+ /*
setCurrentFragment(UploadFragment())
-
findViewById<Button>(R.id.tabUpload).setOnClickListener {
setCurrentFragment(UploadFragment())
highlightTab(it)
}
+ */
+ setCurrentFragment(UploadListFragment())
+ findViewById<Button>(R.id.tabUpload).setOnClickListener {
+ setCurrentFragment(UploadListFragment())
+ highlightTab(it)
+ }
- findViewById<Button>(R.id.tabHelp).setOnClickListener {
- setCurrentFragment(HelpFragment())
+ findViewById<Button>(R.id.tabSetting).setOnClickListener {
+ setCurrentFragment(SessionProfileListFragment())
highlightTab(it)
}
findViewById<Button>(R.id.tabMy).setOnClickListener {
- setCurrentFragment(MyFragment())
+ setCurrentFragment(HelpFragment())
highlightTab(it)
}
CoroutineScope(Dispatchers.IO).launch {
@@ -106,7 +93,7 @@
private fun highlightTab(selectedButton: View) {
val tabButtons = listOf(
findViewById<Button>(R.id.tabUpload),
- findViewById<Button>(R.id.tabHelp),
+ findViewById<Button>(R.id.tabSetting),
findViewById<Button>(R.id.tabMy)
)
--
Gitblit v1.9.1