KDE

KDE Connect Android: Make a text label scroll horizontally

For this task you will need to have KDE Connect running on an Android phone and on a Plasma 5 desktop. You can grab both sources from here:

To build the Android project you can use Android Studio or Gradle, while for the desktop side I recommend KDevelop or just CMake.

Once you have both apps running, you will be able to connect both devices and start using KDE Connect.

One of the features of KDE Connect is to control the music on your PC form your phone. For this, the phone app displays the current song and some buttons to play, pause, advance...

When playing some songs with long titles, though, the label (TextView) where we display the song name, is not big enough, and the text is just cut.

In this task, we want you to implement an automatic scroll on that label in case the text is longer than the label size (in a way similar to the marquee HTML tag).

I've found some info online about how to achieve this effect, so it shouldn't be hard to implement in our case. One consideration, though, is that this should only happen when a song title is actually too long to fit the label, and it should be checked every time the song title changes.

To complete this task you should:

  • Attach a screenshot of the feature.
  • Attach a .patch file with the code changes, or submit it through review board.

Task tags

  • kde
  • android
  • java
  • kdeconnect

Students who completed this task

Mikhail Ivchenko

Task type

  • code Code
close

2015