pocheshire / BottomNavigationBar

Bottom Navigation Bar for Xamarin
214 stars 70 forks source link

Problem with the solution #1

Closed glalwani2 closed 8 years ago

glalwani2 commented 8 years ago

I downloaded the solution to see how it works and opened the solution file with VS 2015 and its not building due to error in styles.xml. It cannot find TextAppearance.AppCompat.Body1 TextAppearance.AppCompat.Body2.

Can anyone point out why this is happening? It should come from support library right?

pocheshire commented 8 years ago

@glalwani2 try this.

For build this solution you need install all SDK in Android SDK Manager and set "target framefork" in project properties to "Use latest installed platform (6.0)".

glalwani2 commented 8 years ago

So If I understand by what you are saying, that I need to install all SDK APILevel from 19 to latest from Tools-> Android -> Android SDK Manager ? But my compile using latest version is already set. I am having hard time understanding it, its the second time I am trying to run this solution.Sorry for bothering but I am not able to find out the exact reason.

glalwani2 commented 8 years ago

I thought the code which you put is the same application which is built using custom bottom navigation.But it does not have manifest.xml nor any activities so how the solution will run.I wanted to see an example application using bottom navigation as I want to use it in my application.

glalwani2 commented 8 years ago

In my application I added the Bottom Navigation nuget package and build the solution. But I am getting this error :

Severity Code Description Project File Line Suppression State Error The "ConvertResourcesCases" task failed unexpectedly. System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetDirectoryName(String path) at Xamarin.Android.Tools.Files.CopyIfChanged(String source, String destination) at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(ITaskItem item, Dictionary2 acwMap) at Xamarin.Android.Tasks.ConvertResourcesCases.FixupResources(Dictionary2 acwMap) at Xamarin.Android.Tasks.ConvertResourcesCases.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() DemoMvvmCross.Core.Droid

I think after adding the package when Resouces file is getting recompiled then because the styles and other attributes files are dropped into : obj\Debug__library_projects__\BottomNavigationBar\library_project_imports location therefore the path is becoming too long and the compiler is throwing error.Can you tell me a workaround for this.But I was not getting this error before can you help me fix this error.

pocheshire commented 8 years ago

@glalwani2 Ok, I'll create an example app that uses a BottomNavigationBar in a couple of days.

glalwani2 commented 8 years ago

Hey that cool, I was able to add the bottom navigation to my current project after taking time, and thank you for that. But currently I am not able to set the active tab color. I am doing this: bottomBar.SetActiveTabColor("#FF0000"); in my activity but when I am running the app nothing is happening. Infact if I do anything related to color nothing happens in UI, simply no result of doing any customization. I dont know whats the problem i check forum pending issues and couldnt find anythinbg that can help.

pocheshire commented 8 years ago

@glalwani2

// Set the color for the active tab. Ignored on mobile when there are more than three tabs. _bottomBar.SetActiveTabColor("#009688");

see customization

pocheshire commented 8 years ago

@glalwani2 There are no any problems with bottom navigation bar in new solution.

I added example app in repository.

glalwani2 commented 8 years ago

Hi,

In my activity I did this,

        bottomBar = BottomBar.Attach(this, savedInstanceState);

        bottomBar.SetActiveTabColor("#FF0000");

        bottomBar.MaxFixedTabCount = 2;

        bottomBar.SetItemsFromMenu(Resource.Menu.bottombar_menu, this);

In the bottombar_menu.xml I have three items.

But nothing is working, I tried all the possibilities, all the permutations and combinations, but to no success.Please let me know if I am missing something.

Also how do I disable the default pop-out animation/ elevation of the selected tab?

pocheshire commented 8 years ago

In my activity I did this,

bottomBar.UseFixedMode(); //instead bottomBar.MaxFixedTabCount

MaxFixedTabCount uses for to enable MapColorForTab for tab bars with three items or less. See this

Also how do I disable the default pop-out animation/ elevation of the selected tab?

BottomNavigationBar doesn't implement this functionality. See Google design guidelines

CodeKiwi commented 8 years ago

Hi,

This issue was highjacked a little. I have the original issue, I am trying to build the project from source but am getting the issue "No resource found that matches the given name" for app compat styles.

I have installed all SDK versions up down to 19 (attached), and configured to use latest target framework (Also attached), but still no luck. Any suggestions greatly appreciated.

picture 2016-07-22 at 8 50 57 am picture 2016-07-22 at 8 50 19 am
pocheshire commented 8 years ago

@CodeKiwi do you using AppCompat theme?

CodeKiwi commented 8 years ago

Yes I think so, I still get the same issue when trying to build the sample project.

pocheshire commented 8 years ago

@CodeKiwi I think it's Xamarin bug. Try solutions from this this