• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Error rotating contextmenu

Mindlayr

Lurker
Mar 20, 2013
1
0
I've been getting this error throughout my program when I open a context menu then rotate the screen.

[HIGH]03-19 16:09:25.627: E/InputQueue-JNI(11610): channel '41c6ffc0 AtchDlg:xxx.xxxxxxxx.xxx/xxx.xxxxxxxx.xxx.TyContextMenuActivity (client)' ~ Publisher closed input channel or an error occurred. events=0x8[/HIGH]

I stripped the code down to the most basic form I can come up with and am still getting the error so I think it is in the android code.

[HIGH]public class TyContextMenuActivity extends Activity {

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

TextView textView = new TextView(this)
{

@Override
protected void onCreateContextMenu(ContextMenu menu)
{
super.onCreateContextMenu(menu);
menu.setHeaderTitle("Rotate Screen");
menu.addSubMenu("90 degrees");
}

};
textView.setText("hold me");
textView.setGravity(Gravity.CENTER);
textView.setTextSize(50);
registerForContextMenu(textView);
setContentView(textView);
}
}[/HIGH]
Can someone tell me how to eliminate this error?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones