Skip to content
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

Fix for material tab layout #117

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

moljac
Copy link
Member

@moljac moljac commented Jun 19, 2020

Support Libraries Version (AndroidX Material 1.1.0):

Related issue: dotnet/java-interop#590

TabLayout.OnTabSelectedListener extends TabLayout.BaseOnTabSelectedListener<TabLayout.Tab>, and as the Java Callable Wrapper attempts to implement both interfaces, even though TabLayout.OnTabSelectedListener extends TabLayout.BaseOnTabSelectedListener, the result doesn't compile.

A possible workaround is to bypass this bug in the Java Callable Wrapper generator by binding a new Java class which has the appropriate inheritance hierarchy:

package jcw_kludge;

public class MainAppCompatActivity extends androidx.appcompat.app.AppCompatActivity
    implements com.google.android.material.tabs.TabLayout.OnTabSelectedListener
{
    public void onTabSelected(com.google.android.material.tabs.TabLayout.Tab tab) {}
    public void onTabUnselected(com.google.android.material.tabs.TabLayout.Tab tab) {}
    public void onTabReselected(com.google.android.material.tabs.TabLayout.Tab tab) {}
}

Does this change any of the generated binding API's?

Yes. New class is added.

Describe your contribution

  1. added new AndroidLibrary Xamarin.Google.Android.Material.Extensions with java class TabLayoutAppCompatActivity
  2. added Xamarin.Android bindings for new AndroidLibrary from step 1.

@moljac
Copy link
Member Author

moljac commented Jul 9, 2020

Issue: #76

@moljac moljac self-assigned this Jul 9, 2020
@moljac moljac added do-not-merge PR is still in progress and is not ready to be merged in-progress in progress in-test labels Jul 9, 2020
@moljac
Copy link
Member Author

moljac commented Jul 9, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PR is still in progress and is not ready to be merged in-progress in progress in-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant