New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extensibility point to load tab icons from another source #399

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@softlion
Contributor

softlion commented Sep 30, 2016

Description of Change

Added an extensibily point to be able to load tab icons directly from a custom Drawable.
This is the only way to get them to load from embedded svg files.

API Changes

Added a protected method to TabbedPageRenderer :

  • SetTabIcon(TabLayout.Tab tab, FileImageSource icon)

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

There is no test project for the Android platform project.
The change is extremely simple, but powerful.

Add extensibility point to load tab icons from another source (using …
…the tab.SetIcon(drawable) overload) on Android
@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Sep 30, 2016

Hi @softlion, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, DNFBOT;

dnfclas commented Sep 30, 2016

Hi @softlion, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, DNFBOT;

@dnfclas dnfclas added the cla-signed label Sep 30, 2016

}
}
void UpdateBarBackgroundColor()
protected virtual void SetTabIcon(TabLayout.Tab tab, FileImageSource icon)
{

This comment has been minimized.

@rmarinho

rmarinho Oct 3, 2016

Member

the indentation seems to be wrong, can you please fix the style.

@rmarinho

rmarinho Oct 3, 2016

Member

the indentation seems to be wrong, can you please fix the style.

tab.SetIcon(ResourceManager.IdFromTitle(icon, ResourceManager.DrawableClass));
}
void UpdateBarBackgroundColor()

This comment has been minimized.

@rmarinho

rmarinho Oct 3, 2016

Member

also this shouldn't be need

@rmarinho

rmarinho Oct 3, 2016

Member

also this shouldn't be need

This comment has been minimized.

@softlion

softlion Oct 5, 2016

Contributor

you are right, don't know why git changed this. What is the correct setting for git: update cr/lf to cr only ? replace space with tabs ?

@softlion

softlion Oct 5, 2016

Contributor

you are right, don't know why git changed this. What is the correct setting for git: update cr/lf to cr only ? replace space with tabs ?

@softlion

This comment has been minimized.

Show comment
Hide comment
@softlion

softlion Oct 5, 2016

Contributor

I've created the same extesibility point for iOS. PR is near.

Contributor

softlion commented Oct 5, 2016

I've created the same extesibility point for iOS. PR is near.

@StephaneDelcroix StephaneDelcroix self-assigned this Oct 20, 2016

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Nov 8, 2016

Member

I fixed the indentation and manually merged this branch. Take this as a favor, @softlion, not an habit

Member

StephaneDelcroix commented Nov 8, 2016

I fixed the indentation and manually merged this branch. Take this as a favor, @softlion, not an habit

@softlion

This comment has been minimized.

Show comment
Hide comment
@softlion

softlion Nov 8, 2016

Contributor

Yes i know :)
But i don't know why it messed with the spaces and tabs.
I'm using only spaces explicitly, no reformat options, and have no issues with other git repos.
Sorry for this.

Contributor

softlion commented Nov 8, 2016

Yes i know :)
But i don't know why it messed with the spaces and tabs.
I'm using only spaces explicitly, no reformat options, and have no issues with other git repos.
Sorry for this.

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Nov 8, 2016

Member

I'm using only spaces explicitly, no reformat options, and have no issues with other git repos.

We use tabs

Member

StephaneDelcroix commented Nov 8, 2016

I'm using only spaces explicitly, no reformat options, and have no issues with other git repos.

We use tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment