Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
d35f7547
Commit
d35f7547
authored
5 years ago
by
Nicolas Pomepuy
Committed by
Geoffrey Métais
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Align item title to center when no subtitle
parent
228c3d14
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#5817
passed with stage
Stage:
in 3 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/gui/tv/TimeUpdater.kt
+4
-4
4 additions, 4 deletions
vlc-android/src/org/videolan/vlc/gui/tv/TimeUpdater.kt
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+6
-1
6 additions, 1 deletion
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
with
10 additions
and
5 deletions
vlc-android/src/org/videolan/vlc/gui/tv/TimeUpdater.kt
+
4
−
4
View file @
d35f7547
...
...
@@ -21,15 +21,15 @@
package
org.videolan.vlc.gui.tv
import
android.app.Activity
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.LifecycleObserver
import
androidx.lifecycle.OnLifecycleEvent
import
android.content.BroadcastReceiver
import
android.content.Context
import
android.content.Intent
import
android.content.IntentFilter
import
androidx.fragment.app.FragmentActivity
import
android.widget.TextView
import
androidx.fragment.app.FragmentActivity
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.LifecycleObserver
import
androidx.lifecycle.OnLifecycleEvent
import
java.util.*
private
const
val
TAG
=
"VLC/TimeUpdater"
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
+
6
−
1
View file @
d35f7547
...
...
@@ -10,6 +10,7 @@ import android.content.res.Resources
import
android.net.Uri
import
android.os.Build
import
android.util.DisplayMetrics
import
android.view.View
import
android.widget.TextView
import
androidx.appcompat.widget.AppCompatTextView
import
androidx.core.text.PrecomputedTextCompat
...
...
@@ -160,7 +161,11 @@ fun <X, Y> CoroutineScope.map(
@BindingAdapter
(
"app:asyncText"
,
requireAll
=
false
)
fun
asyncText
(
view
:
TextView
,
text
:
CharSequence
?)
{
if
(
text
.
isNullOrEmpty
())
return
if
(
text
.
isNullOrEmpty
())
{
view
.
visibility
=
View
.
GONE
return
}
view
.
visibility
=
View
.
VISIBLE
val
params
=
TextViewCompat
.
getTextMetricsParams
(
view
)
(
view
as
AppCompatTextView
).
setTextFuture
(
PrecomputedTextCompat
.
getTextFuture
(
text
,
params
,
null
))
}
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
66f5db84
·
5 years ago
mentioned in commit
66f5db84
mentioned in commit 66f5db848153e9a45cd95f70fbe969c3384d3079
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment