Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.android.internal.R.id.content cannot be resolved to a variable in alarm clock code

I am using the alarm clock code that I found and trying to customize it.

But I get this error : "com.android.internal.R cannot be resolved to a variable " for code:

    getListView().setItemsCanFocus(true);

    // Grab the content view so we can modify it.
    FrameLayout content = (FrameLayout) getWindow().getDecorView()
            .findViewById(com.android.internal.R.id.content);

I am not sure what this piece of code is doing ( so that I could change it) Can you please help me resolve this by some alternative piece of code?

like image 750
rafia_sultana Avatar asked Apr 11 '12 05:04

rafia_sultana


1 Answers

The solution is simple.


Just replace: com.android.internal.R.id.content with android.R.id.content

like image 116
Roy Lee Avatar answered Sep 30 '22 17:09

Roy Lee