I have native c++ activity in which I want se" /> I have native c++ activity in which I want se" /> I have native c++ activity in which I want se"/>

Android Dialog - how to get value for windowMinWidthMajor/windowMinWidthMinor

722 Views Asked by At

I define my theme this way

<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
</style>

I have native c++ activity in which I want set correct width for my windows based on windowMinWidthMajor/windowMinWidthMinor. I tried to get these values from context.getTheme() this way in constructor:

    TypedValue typedValue = new TypedValue();
    Resources.Theme theme = getTheme();
    theme.resolveAttribute(R.attr.windowMinWidthMajor, typedValue, true);
    int percentageValue = typedValue.data;

However it always returns 0. How can I obtain correct values ?

0

There are 0 best solutions below