Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3356630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:32:09+00:00 2026-05-18T02:32:09+00:00

I want to start a new activity intent in my current view! How i

  • 0

I want to start a new activity intent in my current view! How i can do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:32:10+00:00Added an answer on May 18, 2026 at 2:32 am

    after a great search i got it. I put my 1st layout in such a way!

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
        <LinearLayout android:id="@+id/contentViewLayout" 
            android:orientation="vertical"
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent" 
            android:background="@color/white" 
            android:layout_marginBottom="56dip"/>
    
            <HorizontalScrollView
                android:scrollbarSize="2dip"
                android:layout_alignParentBottom="true" 
                android:layout_width="fill_parent"
                android:background="@drawable/background" android:layout_height="56dip">
    
        </HorizontalScrollView>
    </RelativeLayout>
    

    When i have to start new activity in it i use follwing code…

    public class MainActivityWithTabbar extends ActivityGroup implements OnClickListener{
    
        public LocalActivityManager activityManager;
        public LinearLayout contentViewLayout;
        public LinearLayout.LayoutParams contentViewLayoutParams;
        private Context context;
        public Intent nextActivit;
    
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            context = this;
            activityManager = getLocalActivityManager();
            setContentView(R.layout.mainActivityLayout);
            contentViewLayout = (LinearLayout)findViewById(R.id.contentViewLayout);
            contentViewLayoutParams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); 
    
            nextActivit = new Intent(this, NextActivity.class);
            startGroupActivity("activity1", nextActivit);
    
        }
    
        public void startGroupActivity(String id, Intent intent)
        {
            contentViewLayout.removeAllViews();
    
            View view = activityManager.startActivity(id, intent).getDecorView();
            contentViewLayout.addView(view, contentViewLayoutParams);
        }
    }
    

    so in such a case it workssss….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to start a new activity from ab activity that (extends from Linearlayout)
Whenewer I want to start new activity, I use this code: Intent myIntent1 =
Suppose you want to start a new activity and pass it some data from
When you are about to start a new activity, and want to pass a
I'm curious about one thing. How can I finish my current activity and start
When my notification goes off I want to restore the activity that was put
I would like to Start a new activity from my custom dialog, I have
I need to start a new activity once the user clicks in a button
I need to start a new activity, after the user clicks on a list
i want my activity's view to be faded out when there is a click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.