Start a new Activity without Disrupting Current Activity in Xamarin Android?
I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)
[Activity(Label = "MainActivity", Theme =
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity
//Transparent View
TestView testView;
protected override void OnCreate(Bundle savedInstanceState)
base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);
I Want the activity not to Disrupt the current Activity
For Example:
I have a youtube video playing
I want the video to be played while I start my App activity, but that doesn't happen and it stops the video
how to achieve it? should I use Threads? but how?
android xamarin android-activity xamarin.forms xamarin.android
add a comment |
I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)
[Activity(Label = "MainActivity", Theme =
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity
//Transparent View
TestView testView;
protected override void OnCreate(Bundle savedInstanceState)
base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);
I Want the activity not to Disrupt the current Activity
For Example:
I have a youtube video playing
I want the video to be played while I start my App activity, but that doesn't happen and it stops the video
how to achieve it? should I use Threads? but how?
android xamarin android-activity xamarin.forms xamarin.android
When you open anActivity
, the previousActivity
will executeonStop()
method, stop video will be a normal behavior, why do you need to continue playing it?
– Diana Li
Nov 15 '18 at 7:17
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
2
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
You may be able to do what you want by just addingView
s to the existingActivity
. If you transition to a newActivity
this will definitely cause some interruption.
– David Wasser
Nov 15 '18 at 20:06
add a comment |
I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)
[Activity(Label = "MainActivity", Theme =
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity
//Transparent View
TestView testView;
protected override void OnCreate(Bundle savedInstanceState)
base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);
I Want the activity not to Disrupt the current Activity
For Example:
I have a youtube video playing
I want the video to be played while I start my App activity, but that doesn't happen and it stops the video
how to achieve it? should I use Threads? but how?
android xamarin android-activity xamarin.forms xamarin.android
I have a Main Activity which displays a View which is Transparent, below is the code (Trying something like Snackbar which does not disrput the activity)
[Activity(Label = "MainActivity", Theme =
"@style/Theme.AppCompat.Transparent.NoActionBar", MainLauncher =true)]
public class MainActivity: Activity
//Transparent View
TestView testView;
protected override void OnCreate(Bundle savedInstanceState)
base.OnCreate(savedInstanceState);
testView = new TestView(this);
SetContentView(testView);
I Want the activity not to Disrupt the current Activity
For Example:
I have a youtube video playing
I want the video to be played while I start my App activity, but that doesn't happen and it stops the video
how to achieve it? should I use Threads? but how?
android xamarin android-activity xamarin.forms xamarin.android
android xamarin android-activity xamarin.forms xamarin.android
edited Nov 14 '18 at 10:51
VINNUSAURUS
asked Nov 14 '18 at 10:37
VINNUSAURUSVINNUSAURUS
1941414
1941414
When you open anActivity
, the previousActivity
will executeonStop()
method, stop video will be a normal behavior, why do you need to continue playing it?
– Diana Li
Nov 15 '18 at 7:17
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
2
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
You may be able to do what you want by just addingView
s to the existingActivity
. If you transition to a newActivity
this will definitely cause some interruption.
– David Wasser
Nov 15 '18 at 20:06
add a comment |
When you open anActivity
, the previousActivity
will executeonStop()
method, stop video will be a normal behavior, why do you need to continue playing it?
– Diana Li
Nov 15 '18 at 7:17
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
2
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
You may be able to do what you want by just addingView
s to the existingActivity
. If you transition to a newActivity
this will definitely cause some interruption.
– David Wasser
Nov 15 '18 at 20:06
When you open an
Activity
, the previous Activity
will execute onStop()
method, stop video will be a normal behavior, why do you need to continue playing it?– Diana Li
Nov 15 '18 at 7:17
When you open an
Activity
, the previous Activity
will execute onStop()
method, stop video will be a normal behavior, why do you need to continue playing it?– Diana Li
Nov 15 '18 at 7:17
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
2
2
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
You may be able to do what you want by just adding
View
s to the existing Activity
. If you transition to a new Activity
this will definitely cause some interruption.– David Wasser
Nov 15 '18 at 20:06
You may be able to do what you want by just adding
View
s to the existing Activity
. If you transition to a new Activity
this will definitely cause some interruption.– David Wasser
Nov 15 '18 at 20:06
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298202%2fstart-a-new-activity-without-disrupting-current-activity-in-xamarin-android%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53298202%2fstart-a-new-activity-without-disrupting-current-activity-in-xamarin-android%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
When you open an
Activity
, the previousActivity
will executeonStop()
method, stop video will be a normal behavior, why do you need to continue playing it?– Diana Li
Nov 15 '18 at 7:17
I want to do something on the current activity without stopping the previous activity, so I can still watch the video and do something on current activity.
– VINNUSAURUS
Nov 15 '18 at 8:10
2
@VINNUSAURUS I think for what you want to do you need to review fragments docs.microsoft.com/en-us/xamarin/android/platform/fragments
– Andres Castro
Nov 15 '18 at 19:15
You may be able to do what you want by just adding
View
s to the existingActivity
. If you transition to a newActivity
this will definitely cause some interruption.– David Wasser
Nov 15 '18 at 20:06