feat: replace direct player with web browser for search results
- Add BrowserActivity with WebView, toolbar (back/forward/close), URL bar, progress bar - SearchFragment: open BrowserActivity instead of PlayerActivity on result click - Browser allows user to browse the video site directly before choosing to play
This commit is contained in:
@@ -19,7 +19,7 @@ import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.videoapp.tv.R
|
||||
import com.videoapp.tv.PlayerActivity
|
||||
import com.videoapp.tv.BrowserActivity
|
||||
import com.videoapp.tv.SettingsActivity
|
||||
import com.videoapp.tv.data.AppDatabase
|
||||
import com.videoapp.tv.data.SearchHistory
|
||||
@@ -185,10 +185,9 @@ class SearchFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun openPlayer(result: SearchResult) {
|
||||
val intent = Intent(requireContext(), PlayerActivity::class.java).apply {
|
||||
putExtra("detail_url", result.detailUrl)
|
||||
val intent = Intent(requireContext(), BrowserActivity::class.java).apply {
|
||||
putExtra("url", result.detailUrl)
|
||||
putExtra("title", result.title)
|
||||
putExtra("category", result.category)
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user