Xamarin.Plugins icon indicating copy to clipboard operation
Xamarin.Plugins copied to clipboard

Resource.Id does not contain a definition for tabs

Open lreading opened this issue 8 years ago • 5 comments

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).

lreading avatar Jan 28 '17 01:01 lreading

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

scavezze avatar Jan 28 '17 03:01 scavezze

@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.

lreading avatar Jan 28 '17 04:01 lreading

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/

KeaneGames avatar Feb 28 '17 14:02 KeaneGames

it is because tabs was changed for tabMode

JosueMartinez avatar Mar 29 '17 02:03 JosueMartinez

The solution @JosueMartinez provided, worked for me.

Thanks Josue.

vhugogarcia avatar Nov 06 '17 02:11 vhugogarcia