updated lyrics view
This commit is contained in:
parent
81b292be9b
commit
42765fd652
1 changed files with 6 additions and 12 deletions
|
@ -7,7 +7,6 @@ import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -53,8 +52,6 @@ public class LyricsActivity extends AbsMusicServiceActivity implements
|
||||||
TextView songText;
|
TextView songText;
|
||||||
@BindView(R.id.lyrics_view)
|
@BindView(R.id.lyrics_view)
|
||||||
LyricView lyricView;
|
LyricView lyricView;
|
||||||
@BindView(R.id.toolbar)
|
|
||||||
Toolbar toolbar;
|
|
||||||
@BindView(R.id.offline_lyrics)
|
@BindView(R.id.offline_lyrics)
|
||||||
TextView offlineLyrics;
|
TextView offlineLyrics;
|
||||||
@BindView(R.id.actions)
|
@BindView(R.id.actions)
|
||||||
|
@ -81,11 +78,11 @@ public class LyricsActivity extends AbsMusicServiceActivity implements
|
||||||
|
|
||||||
updateHelper = new MusicProgressViewUpdateHelper(this, 500, 1000);
|
updateHelper = new MusicProgressViewUpdateHelper(this, 500, 1000);
|
||||||
|
|
||||||
setupToolbar();
|
|
||||||
setupLyricsView();
|
setupLyricsView();
|
||||||
setupWakelock();
|
setupWakelock();
|
||||||
|
|
||||||
actionsLayout.setOnCheckedChangeListener((group, checkedId) -> selectLyricsTye(checkedId));
|
actionsLayout.setOnCheckedChangeListener((group, checkedId) -> selectLyricsTye(checkedId));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectLyricsTye(int group) {
|
private void selectLyricsTye(int group) {
|
||||||
|
@ -96,6 +93,7 @@ public class LyricsActivity extends AbsMusicServiceActivity implements
|
||||||
|
|
||||||
offlineLyrics.setVisibility(View.GONE);
|
offlineLyrics.setVisibility(View.GONE);
|
||||||
lyricView.setVisibility(View.GONE);
|
lyricView.setVisibility(View.GONE);
|
||||||
|
|
||||||
switch (group) {
|
switch (group) {
|
||||||
case R.id.synced_lyrics:
|
case R.id.synced_lyrics:
|
||||||
loadLRCLyrics();
|
loadLRCLyrics();
|
||||||
|
@ -130,13 +128,6 @@ public class LyricsActivity extends AbsMusicServiceActivity implements
|
||||||
lyricView.setHintColor(Color.WHITE);
|
lyricView.setHintColor(Color.WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupToolbar() {
|
|
||||||
toolbar.setBackgroundColor(ThemeStore.primaryColor(this));
|
|
||||||
toolbar.setTitle("");
|
|
||||||
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
|
||||||
setSupportActionBar(toolbar);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlayingMetaChanged() {
|
public void onPlayingMetaChanged() {
|
||||||
super.onPlayingMetaChanged();
|
super.onPlayingMetaChanged();
|
||||||
|
@ -211,9 +202,12 @@ public class LyricsActivity extends AbsMusicServiceActivity implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick({R.id.edit_lyrics})
|
@OnClick({R.id.edit_lyrics, R.id.back})
|
||||||
public void onViewClicked(View view) {
|
public void onViewClicked(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
|
case R.id.back:
|
||||||
|
onBackPressed();
|
||||||
|
break;
|
||||||
case R.id.edit_lyrics:
|
case R.id.edit_lyrics:
|
||||||
switch (actionsLayout.getCheckedRadioButtonId()) {
|
switch (actionsLayout.getCheckedRadioButtonId()) {
|
||||||
case R.id.synced_lyrics:
|
case R.id.synced_lyrics:
|
||||||
|
|
Loading…
Reference in a new issue