Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 91519 articles
Browse latest View live

Use BottomNavigationView for Android's TabbedPage for a more unified Tab experience on iOS/Android

$
0
0

Summary

The BottomNavigationView (can't post links yet. Google it) that's available in the Android Support Library is the new and preferred way of using tabs in an Android project. Using BNV will create a better out-of-the-box experience for users wanting to use Xamarin Forms for their app development.

Switching to BNV for Android will allow us to introduce Badges as well which will help in simplify XF developers targeting Android and iOS. UWP as far as I know does not have a concept of badges out-of-the-box for Pivot.

API Changes

We already can specify the Title and the Icon from iOS, but with BNV and the UITabBar we could specify the background color, selected tint color and unselected tint color:

tabbedPage.BackgroundColor = Colors.Gray; // Background for the tab bar
tabbedPage.SelectedTintColor = Colors.Red; // Selected color
tabbedPage.TintColor = Colors.Black; // Default (not-selected) color

We can also add badges for each page in the tabbedpage:

<TabbedPage>
    <ExamplePage Title="Agenda" Icon="ic_agenda" BadgeCount="2" />
</TabbedPage>

BadgeCount will be bindable as well.

Taking it a step further we could introduce platform-specifics for setting Tab-color on specific pages (BNV allows you to do that), as well as badge colors (which works on iOS10+ as well).

Intended use case

Be able to create more modern application for Android that uses the latest best practice from Google itself and also introduce Badges that has been missing. All without using custom renderers or third-party packages.

There might be times where the current implementation of TabbedPage on Android will work best, but I would rather have BottomNavigationView to be the default implementation.


Image is skewing in iPhone plus devices and XS Max devices for LaunchStoryBoard

$
0
0

HI Guy's,

I'm using LaunchStoryBoard for splash screen in my xamarin forms app. I used 2x,3x images even-though image is skewing in Plus devices and XS Max devices.

1) 2x Image Size - 750x1334
3x Image Size - 1242x2688(For XS Max used)
In this case Plus device is effecting
2) 2x Image Size - 750x1334
3x Image Size - 1242x2208(For Plus devices used)
In this case XS Max device is effecting

And also I tried by adding images in Assets also leads to the same.

In Assets I created Imageset and added the 1x,2x.3x images in iPhone Devices section.

Can you please help me with the above problem.
Thanks in advance.

How to obfuscate xamarin forms android app with Confuser cli ?

$
0
0

when I pass the app.Android.dll and its dependents (Java.Interop.dll, Mono.Android.dll, Xamarin.Forms.Platform.Android.dll, Xamarin.Forms.Core.dll, Xamarin.Forms.Platform.dll and finally mscoree.dll) to the confuser cli won't go further after adding mscoree.dll? any solutions please ?

Note: I tried dotfuscator and followed all the instructions but its not working at all!! the build never stop after opening the cli, and the obfuscated dlls are the same as the originals...

How to I change the selected text color of Hamburger item

$
0
0

i want to change the text color of selected item in MAster detail page???

Issue with Creating Card Connect SDK Xamarin binding Library for iOS

$
0
0

I created a Xamarin Binding Library project to map the card connect sdk for ios and was successful in it. But when I try to create a sample project to test the function its giving me the following error.

Could not create an native instance of the type 'CardConnect.CCCPaymentRequest': the native class hasn't been loaded. It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.

You can find the Objective C & Swift sample and documentation in the link below https://developer.cardconnect.com/mobile-sdks#iOS

Also I am trying to bind an Objective C framework library

How to make a PageModel as root Page in Xamarin Forms FresgMVVM?

$
0
0

after login automatically I want to make a specific page as a root page.so how to do this in FreshMVVM Xamarin Forms?

video minimize or overlay functionality in xamarin forms.

$
0
0

how can we achieve video minimize or video overlay functionality in xamarin forms. suggestion of any method or any NuGet package will be helpfull.
you can get some idea from above image

Altering the Assets.car & translation dll files via a post build Jenkins job

$
0
0

I am developing a white label solution in Xamarin for iOS & Android. The template app will be the same for all clients but certain elements (app icons, launch icons & translations, branding.json etc) will bear different branding as per customer requirements.

Of all the aforementioned elements, it now looks that the Assets.car & Translations dll cannot be patched through a post-build Jenkins job (like for an iOS generic build, where the ipa is unarchived, desired files replaced then re-archived & resigned).

My aim would be to generate only one "master build" per release per platform and then further adjust that build via Jenkins, patching all necessary resources outside Visual Studio / AppCentre. Is this possible?

As a temporary solution, I've created one feature branch per app with its own branding but this set-up generates significant overhead on the long run.

Would it be possible to somehow prepare both the Assets.car archive from a set of appicons and the translation dll from the .resx and then simply patch them to a master build?


Xamarin MessagingCenter not working for some pages

$
0
0

I'm using messagingcenter to send message from a viewmodel to another viewmodel, the destination content page can be accessed from master page only(by clicking on hamburger icon). message can be send successfully to the previous and next pages but cannot send to pages within master page.Please help..

MessagingCenter.Send<Cart_page_vm>(this, "check_address_id");

MessagingCenter.Subscribe<Cart_page_vm>(this, "check_address_id", (sender) =>
    {
        //  getaddresses();
    });

how to build smart search from custom Entry

$
0
0

Actually, I want smart search option in my app using custom entry. for eg: I have field Country and I wanted to select India. So I will type some words in field like (in) so it must show countries name which contain in (like India, Indonesia etc)

Why is my MasterDetailPage not showing a menu/burger icon in IOS, but does in Android?

$
0
0

I have a simple view in the app which has a master detail page with a menu page and a content page (the content isn't relevant):

public class MainApp : Application
{
    public MainApp()
    {
        MainPage = new MasterPage();
}

}

public class MasterPage : Xamarin.Forms.MasterDetailPage
{
    public MasterPage()
    {
        this.Title = "";
        Detail = new NavigationPage(new AContentPage()) { BarBackgroundColor = Color.FromHex("e95a0c"), BarTextColor = Color.White, BackgroundColor = Color.White };
    }
}

But the 3 lines icon doesn't appear. It does in Android, but in IOS it's not there - however you can still tap on it to open up the menu.

Any idea?

Firebase Performance Monitoring SDK for Xamarin Forms

$
0
0

Hello,

I am looking for Firebase Performance Monitoring SDK for my Xamarin Forms app.
but i am not getting any where. now i have doubt, SDK is available for xamarin forms app or not.
Not able to find this sdk for Xamarin.Android nor Xamarin.iOS.

If any one know about this please help me to achieved this.

Thank you.

Unit testing FFImageLoading and calling CachedImageRenderer.Init?

$
0
0

I am trying to create unit test that calls methods that are dependent of FFImageLoading.Forms.CachedImage
. I get this exception:
System.Exception: Please call CachedImageRenderer.Init method in a platform specific project to use FFImageLoading!
How can I call this method from a test project? Will I have to create platform specific code snippet that calls init? Or is there any other way around it?

Xlabs Checkbox Value to JSON

$
0
0

Looking for some help on using the Xlabs Checkbox for Xamarin Forms.

when the submit button is pressed it saves my form to JSON but I'm not too sure how to use the Xlabs Checkbox to pull the checked or unchecked value to it.

I pull the default of the checkbox by using InspectionValue = CheckBox1.Text but is there a way to pull true or false using this way?

Swipeable ContentView to visible the button/grid on left swipe

$
0
0

I have gone through various links and methods to achieve the swipeable content view inside a list. One of the way I am so close is creating a swipe listener and inheriting it to the content view. Are there any other ways to achieve it?
I used a reference from this link from github /rranjithkumar100/Xamarin-Swipe-Library/tree/master/SwipeLib


Create Multiple Table with SQLite Database

$
0
0

hello, xamarians,
I am creating a project and I want to need to more than 3 tables but I don't understand how to create
please help me out.

Detect and Open another App on device

$
0
0

Can someone tell me the best approach to accomplishing this for IOS and Android. Code samples or links to related discussions would be most appreciated.

thanks

How to add swiping dots to Tabbed/Carousel page?

$
0
0

I'm wondering how to add dots indicating to swipe screens in either TabbedPage or CarouselPage like in the below image?

I tried adding images for that but they don't look natural so is there a real way for doing that?

My above workaround explanation in an example with 3 page:

I create 3 images each image has 3 dots one of them is highlighted:

First image highlighted dot is the first one.

Second image highlighted dot is the second one.

and etc.

Colorize one or several part(s) of a label's text

$
0
0

Hi,

I developed a page presenting some users. This last one is simply containing an entry and a listing.

I tried to colorize the users' informations matching with the text previously typed into the entry by using the Label property named FormattedText.

At first, the result was not so great and I discovered that using the FormattedText is actually displaying the informations in a very slowy way so I implemented a little hack that was simply splitting my string in X substrings and creating a label for each one of them that I would concat into an horizontal stacklayout.

The solution is working great on iOS, but on Android it's lagging a lot when I am scrolling down / up...

I am surprise to see that there is not control handling such basic behavior or maybe I missed them. Does anyone have an idea to implement a better solution ?

I thank you in advance and wish you a great weekend !
Best regards,

Xamarin UWP Map is blank

$
0
0

my maps on UWP is blank, just a black screen with the zoom buttons. i have given capabilities, put the init codes in the UWP app.xaml.cs.
HELP

Viewing all 91519 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>