mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 20:13:40 +02:00
Android - Make ripple effect visible by adding a delay
This commit is contained in:
parent
3601a2e2b5
commit
afc929b07a
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,7 @@ package io.highfidelity.hifiinterface;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.design.widget.NavigationView;
|
import android.support.design.widget.NavigationView;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
|
@ -76,7 +77,12 @@ public class HomeActivity extends AppCompatActivity implements NavigationView.On
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(View view, int position, DomainAdapter.Domain domain) {
|
public void onItemClick(View view, int position, DomainAdapter.Domain domain) {
|
||||||
gotoDomain(domain.url);
|
new Handler(getMainLooper()).postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
gotoDomain(domain.url);
|
||||||
|
}
|
||||||
|
}, 400); // a delay so the ripple effect can be seen
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mDomainAdapter.setListener(new DomainAdapter.AdapterListener() {
|
mDomainAdapter.setListener(new DomainAdapter.AdapterListener() {
|
||||||
|
|
Loading…
Reference in a new issue