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

  • SEARCH
  • Home
  • 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 8508429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:09:31+00:00 2026-06-11T03:09:31+00:00

I rented a coder to develop an Android based OpenGL application for my company.

  • 0

I rented a coder to develop an Android based OpenGL application for my company. The app does some pretty complex stuff and renders a 3d tube based on coordinates passed through an intent (from my other application). I need to add a button to his OpenGL app in order to exit the app and return to my original one. I’ve only touched on Java and have no idea how to add elements when a layout isn’t involved. I don’t want the button to be OpenGL based as I really don’t know anything about OpenGL, so I’d rather have an Android element sitting on top of the activity.

This is how his create routine looks. (The intent that launches the app passes data. In order to compile I had to comment out that code and just make up the data).

    protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    Intent intent = getIntent();
    //String data = intent.getStringExtra("data");                          
    //double radius = Double.parseDouble(intent.getStringExtra("radius"));                          
    //double width = Double.parseDouble(intent.getStringExtra("width"));                            
    String data = "254,0,90,2,254,0,90,2";
    double radius = 20;
    double width = 10;
    openGLTube3D = new OpenGLTube3D(this, data, radius, radius, width);
    setContentView(openGLTube3D);
}

He uses setContentView() with his OpenGL class instead of an XML file, so I have no idea where to add the button.

Can anyone help?

  • 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-06-11T03:09:32+00:00Added an answer on June 11, 2026 at 3:09 am

    If OpenGLTube3D is a view, then I would recommend:

    Create an XML file like you typically would, with a framelayout as the root, but leave the opengl view out. This should contain whatever buttons or widgets that you want to appaer on top of OpenGL view.

    You’ll want something like this (forgive any syntax errors below, I’m writing this from memory):

    <FrameLayout
        android:id="@+id/myframelayout>
        <Button
          android:...
          android:...
          android:... />
    </FrameLayout>
    

    Then, in onCreate, you want to set layout.xml as the content view, and then you want to insert the OpenGL view into the framelayout as the first index (so it will appear beneath the button)

    Pseudocode:

    openGLTube3D = new OpenGLTube3D(this, data, radius, radius, width);    
    FrameLayout frame = (FrameLayout)findViewById(R.id.myframelayout);
    frame.addView(openGLTube3D, 0);
    

    I believe this should place the OpenGL view below all of the other elements defined in your framelayout.

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

Sidebar

Related Questions

I need to model Owners and Rentees in an application, so you have stuff
I've got an application with 3 models: Renters, Departments, Criteria. # app/models/department.rb class Department
I am going to change my hosting, and allready rented a new server. Now
My understanding is that in order to return a complex PHP variable to Javascript,
I'm proud to have rented my own debian 6.0 server. And as a total
Let's say you're implementing rails app for a snowboard rental store. A given snowboard
Much to my annoyance, Visual Studio 2010 added App.config files to all of my
I am just working through some examples from my text book, writing the code
I'm preparing to embark on a web app development that will make little to
h i am doing one here i need to display some images,at the same

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.