Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access style resource defined in library project

Tags:

android

I have something like this in my library project. I want to use that custom defined theme in my concrete project but Im not able to reference it.How can I achieve this?

<?xml version="1.0" encoding="utf-8"?>

<style name="MenuDialog" parent="android:Theme.Dialog">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowCloseOnTouchOutside">false</item>
    <item name="android:windowAnimationStyle">@null</item>
</style>

like image 764
Teodor Avatar asked Jan 10 '13 22:01

Teodor


1 Answers

What I did for workaround for now is: Im setting the theme not in the manifest file instead of that Im setting it before setContentView method.

@Override
public void onCreate(Bundle savedInstanceState) {
    setTheme(package_library.R.style.MenuDialog);
}
like image 156
Teodor Avatar answered Oct 07 '22 07:10

Teodor