mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2025-10-04 02:09:41 +02:00
add header/footer to drawer
This commit is contained in:
parent
8adca3725d
commit
86f041b803
17 changed files with 93 additions and 11 deletions
|
@ -41,6 +41,8 @@ import android.view.Menu;
|
|||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.schabi.newpipe.extractor.StreamingService;
|
||||
|
@ -79,6 +81,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
setupDrawer();
|
||||
setupDrawerFooter();
|
||||
}
|
||||
|
||||
private void setupDrawer() {
|
||||
|
@ -123,6 +126,16 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
private void setupDrawerFooter() {
|
||||
ImageButton settings = findViewById(R.id.drawer_settings);
|
||||
ImageButton downloads = findViewById(R.id.drawer_downloads);
|
||||
ImageButton history = findViewById(R.id.drawer_history);
|
||||
|
||||
settings.setOnClickListener(view -> NavigationHelper.openSettings(this) );
|
||||
downloads.setOnClickListener(view -> NavigationHelper.openDownloads(this));
|
||||
history.setOnClickListener(view -> NavigationHelper.openHistory(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue