Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Why custom theme for Xamarin.Android won't work in a .Net Shared native project?

$
0
0

I created an android project in xamarin, custom theme works fine but when i add the same code to my android project in .netshared project it doesn't work.

i used appcompat theme.Here is my code:

styles.xml

  <resources>

      <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

         <!-- Customize your theme here. -->

         <item name="colorPrimary">@color/colorPrimary</item>

              <item name="colorPrimaryDark">@color/colorPrimaryDark</item>

           <item name="colorAccent">@color/colorAccent</item>

       </style>

  </resources>

colors.xml

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

        <resources>

         <color name="colorPrimary">#131313</color>

          <color name="colorPrimaryDark">#ffffff</color>

          <color name="colorAccent">#f73f44</color>

        </resources>

         [Activity(Label = "App2", MainLauncher = true, Icon = "@mipmap/icon", Theme = "@style/AppTheme")]
        public class MainActivity : AppCompatActivity{
        //code
        }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>