Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by handsomePATT · May 02, 2011 at 10:24 PM · androidpluginjavaeclipse

Android/Unity/Eclipse Help

Hey so ive been trying to make a popup window. I have unity integrated with eclipse, and I have the popup window showing. Here is the code.

Code: package com.Patt.AppOne;

import com.unity3d.player.UnityPlayerActivity; import android.app.Dialog; import android.content.Intent; import android.os.Bundle; import android.widget.PopupWindow;

public class AppTwo extends UnityPlayerActivity { //Called when the activity is first created. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //set up main content view setContentView(R.layout.main);

Dialog dialog = new Dialog(AppTwo.this); dialog.setContentView(R.layout.popup_layout); dialog.setTitle("This is my custom dialog box"); dialog.setCancelable(true); //there are a lot of settings, for dialog, check them all out!

         //now that the dialog is set up, it's time to show it    
         dialog.show();

}

public void Launch() {

}

}

it will make a popup window right when i launch if it i dont comment out the line

setContentView(R.layout.main)

but if I comment out the line it will load the unity project i have in there, which is just a button. If I click the button it will call the java Launch function. but if I put the popup code in there, or even just a text printout, you wont see it. I think it goes behind the unity content. Any ideas why

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tnetennba · Jul 28, 2011 at 09:55 AM 0
Share

Have a look at this guide I made: http://forum.unity3d.com/threads/98315-Using-Unity-Android-In-a-Sub-View

It explains ho to use unity in a sub view in an android app. I would think from that you can make unity play in a lower hierarchical position in the layout. That should force the unity to be rendered underneath what you want.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

How Set Java Plugin on Unity? 0 Answers

Passing texture to android plugin 0 Answers

use own sound recorder android library in unity 1 Answer

Admob plugin error: Java.Lang.ClassNotFoundException: com.google.android.gms.ads.mobileads 2 Answers

Unity FBConnect Integration 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges