5 changed files with 195 additions and 0 deletions
@ -0,0 +1,85 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<layout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto"> |
|||
|
|||
<androidx.core.widget.NestedScrollView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent"> |
|||
|
|||
<androidx.constraintlayout.widget.ConstraintLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_horizontal" |
|||
android:orientation="vertical"> |
|||
|
|||
<TextView |
|||
android:id="@+id/title" |
|||
style="@style/Theme.VLC.BottomSheetTitle" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginTop="16dp" |
|||
android:minHeight="0dp" |
|||
android:text="@string/android_auto" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/podcast_mode_title" |
|||
style="@style/Theme.VLC.HorizontalListTitle" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginTop="24dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:text="@string/podcast_mode" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/title" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/podcast_mode_text" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:text="@string/podcast_mode_help" |
|||
android:textSize="16sp" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/podcast_mode_title" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/voice_control_title" |
|||
style="@style/Theme.VLC.HorizontalListTitle" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginTop="16dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:text="@string/voice_control" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/podcast_mode_text" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/voice_control_text" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:layout_marginBottom="24dp" |
|||
android:text="@string/voice_control_help" |
|||
android:textSize="16sp" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/voice_control_title" /> |
|||
|
|||
|
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
</androidx.core.widget.NestedScrollView> |
|||
|
|||
</layout> |
|||
@ -0,0 +1,74 @@ |
|||
/** |
|||
* ************************************************************************** |
|||
* AutoInfoDialog.kt |
|||
* **************************************************************************** |
|||
* Copyright © 2025 VLC authors and VideoLAN |
|||
* |
|||
* This program is free software; you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation; either version 2 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, write to the Free Software |
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|||
* *************************************************************************** |
|||
*/ |
|||
package org.videolan.vlc.gui.dialogs |
|||
|
|||
import android.os.Bundle |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED |
|||
import org.videolan.vlc.R |
|||
import org.videolan.vlc.databinding.DialogAutoInfoBinding |
|||
|
|||
|
|||
/** |
|||
* Dialog showing the info of the current version |
|||
*/ |
|||
class AutoInfoDialog : VLCBottomSheetDialogFragment() { |
|||
|
|||
private lateinit var binding: DialogAutoInfoBinding |
|||
|
|||
companion object { |
|||
|
|||
fun newInstance(): AutoInfoDialog { |
|||
return AutoInfoDialog() |
|||
} |
|||
} |
|||
|
|||
override fun getDefaultState(): Int { |
|||
return STATE_EXPANDED |
|||
} |
|||
|
|||
override fun needToManageOrientation(): Boolean { |
|||
return false |
|||
} |
|||
|
|||
override fun initialFocusedView(): View = binding.title |
|||
|
|||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle?): View? { |
|||
binding = DialogAutoInfoBinding.inflate(layoutInflater, container, false) |
|||
return binding.root |
|||
} |
|||
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|||
super.onViewCreated(view, savedInstanceState) |
|||
binding.podcastModeText.text = getString(R.string.podcast_mode_help, getString(R.string.podcast_mode_genres)) |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Loading…
Reference in new issue