Not All Xamarin.Android Style Properties Recognized in Designer

Nathan Sokalski 4,126 Reputation points
2021-03-04T17:21:15.517+00:00

I have several styles (from the styles.xml file) that include properties such as android:inputType for EditText & android:orientation for LinearLayout. Although this does not (at least not for anything I have noticed yet, but I am relatively new to Xamarin.Android) cause a problem when debugging, they give the squiggly red or green error or warning such as "Missing explicit orientation" or "No input type specified". Is this to be expected? It is also strange, for example, that even though the designer applies the android:orientation for LinearLayout, it still claims that I did not specify it. It would be nice if the designer recognized when I specify properties in my styles.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,325 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,706 Reputation points Microsoft Vendor
    2021-03-05T02:06:19.937+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    they give the squiggly red or green error or warning such as "Missing explicit orientation" or "No input type specified". Is this to be expected?

    This is a kind of warm reminder, which I think is very necessary. This is a nice hint when a developer forgets to add a property or is unfamiliar with a property while developing an app.

    It is also strange, for example, that even though the designer applies the android:orientation for LinearLayout, it still claims that I did not specify it.

    This is usually because the IDE does not recognize such properties, you can build your app, so that this problem does not occur.

    Hope it can help you.

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments