-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show dropdown menu on long click, make some adjustments
- Loading branch information
1 parent
2d9e629
commit 6926e7f
Showing
6 changed files
with
206 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/org/schabi/newpipe/compose/stream/StreamMenu.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.schabi.newpipe.compose.stream | ||
|
||
import androidx.compose.material3.DropdownMenu | ||
import androidx.compose.material3.DropdownMenuItem | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import org.schabi.newpipe.R | ||
|
||
@Composable | ||
fun StreamMenu(onDismissRequest: () -> Unit) { | ||
DropdownMenu(expanded = true, onDismissRequest = onDismissRequest) { | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.start_here_on_background)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.start_here_on_popup)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.download)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.add_to_playlist)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.share)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.open_in_browser)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.mark_as_watched)) }, | ||
onClick = onDismissRequest | ||
) | ||
DropdownMenuItem( | ||
text = { Text(text = stringResource(R.string.show_channel_details)) }, | ||
onClick = onDismissRequest | ||
) | ||
} | ||
} |
Oops, something went wrong.