Log in or register to post comments

Can't get "clearButton" to show up on screen

January 28, 2012 - 6:09pm #1

I've been trying to get the clear button to show up on my application by migrating it over from the Dominoes sample. I have the item in interface_overlay (so it shows up in R) and in my application I write

clearButton = (Button) overlayView.findViewById(R.id.clear_button);
clearButton.setVisibility(View.VISIBLE);

but it's not showing up on the screen. is there anything else I'm missing?

Re: Can't get "clearButton" to show up on screen

January 29, 2012 - 1:26pm #3

Thanks, I didn't add the content view as you stated!

Re: Can't get "clearButton" to show up on screen

January 29, 2012 - 10:01am #2

Are you using the separate interface_overlay.xml layout from the Dominoes project? If so, did you inflate it and add it as a content view? Look for the following in the Dominoes project:

GUIManager.java

overlayView = View.inflate(context, R.layout.interface_overlay, null);

Dominoes.java

addContentView(mGUIManager.getOverlayView(), new LayoutParams(
                LayoutParams.FILL_PARENT,
                LayoutParams.FILL_PARENT));

- Kim

Log in or register to post comments