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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f50c83f
item template
moljac May 15, 2020
7add8df
Merge branch 'master' of https://github.com/xamarin/AndroidX
moljac Jun 3, 2020
d9f97d2
fix for issue 590 Material.Extensions
moljac Jun 19, 2020
218c4a9
gradle-wrapper.jar added
moljac Jun 19, 2020
a239ad3
Extensions bindings DONE (TabLayoutAppCompatActivity)
moljac Jun 19, 2020
75784b4
Merge branch 'master' into master_based_fix_Material_TabLayout
moljac Jun 26, 2020
b17da39
appcompat ressources project added
moljac Jul 8, 2020
17bff8a
Extensions nuget/dll added (fix for Material TabLayout)
moljac Jul 8, 2020
c75847e
Cake.MonoApiTools version bump for dotnet core cake global tool (stal…
moljac Jul 10, 2020
5d0b0a9
fixes for case sensitive filesystems (duplicate code)
moljac Jul 10, 2020
1e45640
manifest merger fix
moljac Jul 10, 2020
34ee484
MultiDex dependencies
moljac Jul 10, 2020
587c350
Project reference added (material project)
moljac Jul 10, 2020
ee48396
Merge branch 'master_based_fix_Material_TabLayout' of https://github.…
moljac Jul 10, 2020
1bae054
Update dependencies.json
moljac Aug 7, 2020
df2baf8
RecyclerView version bump (fix for HasStableIds)
moljac Aug 17, 2020
f45e472
Fix Issue 133: ViewPager2 is sealed
moljac Aug 17, 2020
7d68f24
ViewPager2 version bump
moljac Aug 17, 2020
7bf747f
foldernames unification with GPS-FB (for automatic folder structure g…
moljac Aug 17, 2020
b2502bf
Merge branch 'master' into master_based_fix_Material_TabLayout
moljac Aug 17, 2020
41fef4c
MultiDex excluded from unit tests
moljac Aug 17, 2020
5be9463
Update dependencies.json
moljac Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,43 @@
### Operating System & Version (eg: Mac OSX 10.11):


### Support Libraries Version (eg: 23.3.0):
### AndroidX Version

### Describe your Issue

### Describe your Issue:
### Relevant information

Add relevant project settings from `*.csproj` file:

### Steps to Reproduce (with link to sample solution if possible):
Packages used:

```
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991265" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
```

Build settings (tools)

```
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidEnableDesugar>true</AndroidEnableDesugar>
```


or even better - links to the existing code:

* https://github.com/xamarin/AndroidX/blob/master/samples/BuildAll/BuildAll/BuildAll.csproj#L41-L44

* https://github.com/xamarin/AndroidX/blob/master/samples/BuildXamarinFormsApp/BuildXamarinFormsApp/BuildXamarinFormsApp.Android/BuildXamarinFormsApp.Android.csproj#L57-L58

NOTE: Please DO NOT submit screenshot images. Images are not searchable!

### Minimal Repro Code Sample

If you want to speed up investigation and bug fixing: please provide minimal repro sample for tests.

### Steps to Reproduce (with link to sample solution if possible):

### Include any relevant Exception Stack traces, build logs, adb logs:
15 changes: 15 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ private IEnumerable<(string Path, bool IsPublic)> GetXmlMetadata(string xpath, S

Task("libs")
.IsDependentOn("metadata-verify")
.IsDependentOn("libs-native")
.Does(() =>
{
var settings = new MSBuildSettings()
Expand All @@ -551,6 +552,20 @@ Task("libs")
MSBuild("./generated/AndroidX.sln", settings);
});

Task("libs-native")
.Does(() =>
{
string root = "./source/com.google.android.material/material.extensions/";

RunGradle(root, "build");

DirectoryPath outputDir = MakeAbsolute((DirectoryPath)"./externals/");
EnsureDirectoryExists(outputDir);

CopyFileToDirectory($"{root}/extensions-aar/build/outputs/aar/extensions-aar-release.aar", outputDir);
Unzip($"{outputDir}/extensions-aar-release.aar", $"{outputDir}/extensions-aar");
});

Task("nuget")
.IsDependentOn("libs")
.Does(() =>
Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"additionalProjects":
[
"source/migration/Dummy/Xamarin.AndroidX.Migration.Dummy.csproj",
"source/androidx.appcompat/typeforwarders/androidx.appcompat.appcompat-resources-typeforwarders.csproj"
"source/androidx.appcompat/typeforwarders/androidx.appcompat.appcompat-resources-typeforwarders.csproj",
"source/com.google.android.material/Xamarin.Google.Android.Material.Extensions/Xamarin.Google.Android.Material.Extensions.csproj"
],
"templates" : [
{
Expand Down
14 changes: 7 additions & 7 deletions mappings/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@
},
{
"id": "Xamarin.AndroidX.Migration",
"dependencies": [
"Xamarin.AndroidX.MultiDex"
]
"dependencies": []
},
{
"id": "Xamarin.AndroidX.Annotation.Experimental",
Expand Down Expand Up @@ -574,10 +572,6 @@
"id": "Xamarin.AndroidX.MultiDex",
"dependencies": []
},
{
"id": "Xamarin.AndroidX.Migration.Tool",
"dependencies": []
},
{
"id": "Xamarin.AndroidX.Navigation.Common",
"dependencies": [
Expand Down Expand Up @@ -777,6 +771,12 @@
"Xamarin.AndroidX.Room.Runtime",
"Xamarin.Google.Guava.ListenableFuture"
]
},
{
"id": "Xamarin.Google.Android.Material.Extensions",
"dependencies": [
"Xamarin.Google.Android.Material"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<enum-field-mappings></enum-field-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<enum-method-mappings></enum-method-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<metadata>
<!--
<attr
path="/api/package[@name='package']"
name="managedName"
>
Package
</attr>
-->
<attr path="/api/package[@name='androidx.annotation']" name="managedName">AndroidX.Annotations</attr>
</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<metadata></metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<metadata></metadata>
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@
AndroidX.Browser.Trusted.Sharing
</attr>


</metadata>
2 changes: 1 addition & 1 deletion source/androidx.work/work-runtime/Transforms/Metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<remove-node
path="/api/package[@name='androidx.work.impl']"
/>

<attr
path="/api/package[@name='androidx.work.impl.foreground']"
name="managedName"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<Project Sdk="MSBuild.Sdk.Extras/2.0.54">
<PropertyGroup>
<TargetFramework>MonoAndroid90</TargetFramework>
<IsBindingProject>true</IsBindingProject>
<AssemblyName>Xamarin.Google.Android.Material.Extensions</AssemblyName>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<RootNamespace>Google.Android.Material</RootNamespace>
<EnableProguard>true</EnableProguard>
<AndroidEnableMultiDex>true</AndroidEnableMultiDex>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<!--
No warnings for:
- CS0618: 'member' is obsolete: 'text'
- CS0109: The member 'member' does not hide an inherited member. The new keyword is not required
- CS0114: 'function1' hides inherited member 'function2'. To make the current method override that implementation, add the override keyword. Otherwise add the new keyword.
- CS0628: 'member' : new protected member declared in sealed class
- CS0108: 'member1' hides inherited member 'member2'. Use the new keyword if hiding was intended.
- CS0809: Obsolete member 'member' overrides non-obsolete member 'member'
<NoWarn>0618;0109;0114;0628;0108;0809</NoWarn>
-->
</PropertyGroup>

<PropertyGroup>
<PackageId>Xamarin.Google.Android.Material.Extensions</PackageId>
<Title>Xamarin AndroidX - material extensions</Title>
<Summary>Xamarin.Android bindings for AndroidX - material extensions</Summary>
<Description>Xamarin.Android bindings for AndroidX - material extensions</Description>
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Support Google material extensions</PackageTags>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=2113238</PackageProjectUrl>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIconUrl>https://go.microsoft.com/fwlink/?linkid=2099392</PackageIconUrl>
<PackageVersion>1.1.0-rc3$(PackageVersionSuffix)</PackageVersion>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<!-- Include symbol files (*.pdb) in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup>
<AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
<AndroidFragmentType>AndroidX.Fragment.App.Fragment</AndroidFragmentType>
</PropertyGroup>


<ItemGroup>
<None Include="..\..\..\LICENSE.md" Pack="True" PackagePath="LICENSE.md" />
</ItemGroup>

<ItemGroup>
<Folder Include="Additions\" />
<Folder Include="Jars\" />
<Folder Include="Transforms\" />
<Folder Include="Java\" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\source\AssemblyInfo.cs" />
<Compile Include="..\..\..\source\com.google.android.material\Xamarin.Google.Android.Material.Extensions\additions\*.cs">
<Link>Additions/%(RecursiveDir)/%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>

<ItemGroup>
<TransformFile Include="..\..\..\source\com.google.android.material\Xamarin.Google.Android.Material.Extensions\transforms\*.xml">
<Link>Transforms/%(RecursiveDir)/%(Filename)%(Extension)</Link>
</TransformFile>
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\externals\extensions-aar-release.aar" Pack="True" PackagePath="aar\extensions-aar-release.aar" />
</ItemGroup>


<ItemGroup>
<InputJar Include="..\..\..\externals\extensions-aar\classes.jar" />
<!-- For those artifacts with lib/ folder -->
<InputJar Condition="Exists('..\..\..\externals\extensions-aar\libs\')" Include="..\..\..\externals\extensions-aar\libs\*.jar" />
</ItemGroup>


<ItemGroup><!-- PackageReference -->

<ProjectReference Include="..\..\..\generated\com.google.android.material.material\com.google.android.material.material.csproj" />
</ItemGroup>


</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<enum-field-mappings></enum-field-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<enum-method-mappings>
<!--path="/api/package[@name='android.support.design.internal']/class[@name='ForegroundLinearLayout']/method[@name='getForegroundGravity' and count(parameter)=0]"-->
<!--
<mapping jni-class="android/support/design/internal/ForegroundLinearLayout">
<method jni-name="getForegroundGravity" parameter="return" clr-enum-type="Android.Views.GravityFlags" />
</mapping>
-->
<!--path="/api/package[@name='android.support.design.widget']/class[@name='CollapsingToolbarLayout']/method[@name='setVisibility' and count(parameter)=1 and parameter[1][@type='int']]"-->
<!--
<mapping jni-class="androidx/coordinatorlayout/widget/CollapsingToolbarLayout">
<method jni-name="setVisibility" parameter="visibility" clr-enum-type="Android.Views.ViewStates" />
</mapping>
-->
<!--path="/api/package[@name='android.support.design.widget']/class[@name='VisibilityAwareImageButton']/method[@name='setVisibility' and count(parameter)=1 and parameter[1][@type='int']]"-->
<!--
<mapping jni-class="androidx/coordinatorlayout/widget/VisibilityAwareImageButton">
<method jni-name="setVisibility" parameter="visibility" clr-enum-type="Android.Views.ViewStates" />
</mapping>
-->
<!--path="/api/package[@name='android.support.design.widget']/class[@name='FloatingActionButton']/method[@name='show' and count(parameter)=1 and parameter[1][@type='android.support.design.widget.FloatingActionButton.OnVisibilityChangedListener']]"-->
<!--
<mapping jni-class="androidx/coordinatorlayout/widget/FloatingActionButton">
<method jni-name="setVisibility" parameter="p0" clr-enum-type="Android.Views.ViewStates" />
</mapping>
-->
<!--path="/api/package[@name='android.support.design.widget']/class[@name='FloatingActionButton']/method[@name='show' and count(parameter)=1 and parameter[1][@type='android.support.design.widget.FloatingActionButton.OnVisibilityChangedListener']]"-->
<!--
<mapping jni-class="androidx/coordinatorlayout/widget/FloatingActionButton">
<method jni-name="setVisibility" parameter="visibility " clr-enum-type="Android.Views.ViewStates" />
</mapping>
-->
<!--path="/api/package[@name='android.support.design.widget']/class[@name='FloatingActionButton']/method[@name='setBackgroundColor' and count(parameter)=1 and parameter[1][@type='int']]"-->
<!--
<mapping jni-class="androidx/coordinatorlayout/widget/FloatingActionButton">
<method jni-name="setBackgroundColor" parameter="color" clr-enum-type="Android.Graphics.Color" />
</mapping>
-->
</enum-method-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<metadata>
<!--
-->
<attr
path="/api/package[@name='com.xamarin.google.android.material.extensions']"
name="managedName"
>
Xamarin.Google.Android.Material.Extensions
</attr>

</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<metadata>

</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<metadata>

</metadata>
14 changes: 14 additions & 0 deletions source/com.google.android.material/material.extensions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading