Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Resource.Id does not contain a definition for tabs #47

Open
lreading opened this issue Jan 28, 2017 · 5 comments
Open

Resource.Id does not contain a definition for tabs #47

lreading opened this issue Jan 28, 2017 · 5 comments

Comments

@lreading
Copy link

Great plugin, loving it!

In the getting started guide, it says to add this line in Android:

        FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar, Resource.Id.tabs);

I'm on the latest version of Xamarin / Xamarin.Forms, and it's complaining that there's no definition for tabs. I've run it without providing a value and it is working fine (just using icon labels).

@scavezze
Copy link

I am also having the same issue. what exactly is this gonna break?

@lreading
Copy link
Author

@scavezze - An educated guess here, but it will probably affect the tabbed controls: https://github.com/jsmarcus/Xamarin.Plugins/search?utf8=%E2%9C%93&q=IconControls.TabLayoutId

I'm using IconLabels without a problem at the moment.

@KeaneGames
Copy link

Assumming you have Id.toolbar, you probably have a tabs.axml and a toolbar.axml in your Resources/layout folder?

If so, make sure the id you use in there matches the id you're specifiying in code. e.g. if you have
android:id="@+id/tabs" in it, you want to use Resource.Id.tabs,
if you have
android:id="@+id/sliding_tabs", you want to use Resource.Id.sliding_tabs, or change the id if your tabs.axml file.

If you don't have a tabs.axml file, see https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

@JosueMartinez
Copy link

it is because tabs was changed for tabMode

@vhugogarcia
Copy link

The solution @JosueMartinez provided, worked for me.

Thanks Josue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants