Fix tiny theme and other
This commit is contained in:
parent
8116bbbba8
commit
e5cab894ca
16 changed files with 42 additions and 20 deletions
|
@ -126,7 +126,7 @@ class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
|
|||
private fun updateSong() {
|
||||
val song = MusicPlayerRemote.currentSong
|
||||
songTitle.text = song.title
|
||||
songText.text = String.format("%s \nby -%s", song.albumName, song.artistName)
|
||||
songText.text = String.format("%s \nby - %s", song.albumName, song.artistName)
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
|
|
|
@ -20,15 +20,13 @@ import android.text.TextPaint;
|
|||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
public class VerticalTextView extends MaterialTextView {
|
||||
public class VerticalTextView extends AppCompatTextView {
|
||||
final boolean topDown;
|
||||
|
||||
public VerticalTextView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
public VerticalTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
final int gravity = getGravity();
|
||||
if (Gravity.isVertical(gravity) && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
|
||||
|
@ -36,16 +34,17 @@ public class VerticalTextView extends MaterialTextView {
|
|||
topDown = false;
|
||||
} else
|
||||
topDown = true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
|
||||
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(@NonNull Canvas canvas) {
|
||||
protected void onDraw(Canvas canvas) {
|
||||
TextPaint textPaint = getPaint();
|
||||
textPaint.setColor(getCurrentTextColor());
|
||||
textPaint.drawableState = getDrawableState();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue