Tag: xamarin

2020.09.01.

Xamarin.Android – Bottom Bubble TabBar

Suppose we use an Activity and swap Fragments within the Activity. Within Acitvity, use RelativeLayout for External Layout and we will place it at the bottom, centering our menu. Set the Bottom menu as rounded View at: android:background=”@xml/bottom_menu” In the first rectangle I set a little shadow of the menu, but it is not necessary, if you dont want shadow just use this code in […]

2020.09.01.

Xamarin.Android – Shadow

In Android you can’t set shadow property of an element except Button and TextView. So we have to define a shape in an xml and set is as background of an element. Let’s create our first shadow background! Create a shadow.xml file in the Resource/drawable folder, and paste this code in the file. After that, we have to set this drawable as the background of […]

2020.09.01.

Xamarin.Android – Automatic Grid Height

We all use usually grids in our apps. But it doesn’t matter how it appears. Here now it’s not going to be about having a grid and exposing it to a page and just going to be there, but there’s more of everything on a page and you don’t want to have a certain height and be able to scroll through a small area but […]

2020.09.01.

Xamarin.Android – Using SVG Images, VectorDrawable

By default, Android does not support svg. For this, they invented VectorDrawable, which can display svgs. First step: create a Xamarin.Android Project. Go to Main.xml and paste this: Yes, we will use VestorDrawable as a normal Image (png). After that we have to create a VectorDrawable. Create a svg image. And download it. Paste this svg file to: http://inloop.github.io/svg2android/. Download this xml and paste this […]

2020.09.01.

Xamarin.Forms – Mock Locations

This Project you can find at: https://github.com/officialdoniald/Xamarin.Forms.MockLocation. Forms: We can detect Location changing in the Forms Project: https://github.com/officialdoniald/Xamarin.Forms.MockLocation/blob/master/Xamarin.Forms.MockLocation.Mobile/Xamarin.Forms.MockLocation.Mobile/MainPage.xaml.cs. If we will get a Mock Location this will detect it. The two platforms need to be discussed separately. In Android we can make an Implementation for Mock Location, but in iOS, we have to use a script file and we have to add to the emulator, […]

2020.09.01.

Xamarin.Forms Twilio implementation

This project you can find at: https://github.com/officialdoniald/Xamarin.Forms.Twilio Twilio created just for Android and iOS libs and not for Xamarin. So we need to create Bindings for Xamarin.Forms and native. First step: we need to create Android Binding Library(https://github.com/officialdoniald/Xamarin.Forms.Twilio/tree/master/Xamarin.Forms.Twilio.PoC/Xamarin.Android.Twilio.Client) and iOS Binding Library(https://github.com/officialdoniald/Xamarin.Forms.Twilio/tree/master/Xamarin.Forms.Twilio.PoC/Xamarin.iOS.Twilio.Client) in an Emptys Solution. We have to add the .aar/.jar file(to Jars folder to Android) and .a files (as native reference to iOS) […]

2020.09.01.

Xamarin.Forms save and open PDF file

This project you can find at: https://github.com/officialdoniald/Xamarin.Forms.Save.Open.PDF. It could be a real situation that your app need to save or open a pdf file. How can it possible? Throught DependencyService. There are many companies, who deal with generationg PDF Document in Xamarin.Forms. We need to create a PDF Document first and than save it. But if you want to open an exists document, just read […]

2020.09.01.

Xamarin.Forms – Android – change the Theme at runtime

This project you can find at: https://github.com/officialdoniald/Xamarin.Forms—Change-Android-Theme-at-runtime In the .NET Standard/PCL Project we can’t say that, please change the Theme right now, because wehave to implement some platform specific implementation in the Android project. How can the two project communicate? Now, we will see another way, unlike the previous ones, we will use events, not dependency service. So, let’s create our event class in the […]

2020.09.01.

Xamarin.Android.SerialPort

This project you can find at: https://github.com/officialdoniald/Xamarin.Android.SerialPort. Serial Port wrapper for Xamarin.Android. If you want to change some feature of the Serial Port, just clone this repo and change it. In the SerialPort project you have to go to the SerialPortWrapper folder and the SerialPort.cs. After the update you have to Rebuild, and if you want to use the recently updatet SerialPort class, you have […]

2020.09.01.

Xamarin.Android.CanBus

This project you can find at: https://github.com/officialdoniald/Xamarin.Android.Canbus. Usage: Don’t forget to copy the lib folder to your project! First step: copy the lib folder to you project. You have to change the Properties of theese files: libcanbus.so: AndroidNativeLibrary canbus_helper.jar: AndroidJavaLibrary canbus_micro_fixed.jar: AndroidJavaLibrary Create Canbus: Canbus _canbus = _canbus = new Canbus(250000); _canbus.PackageReceive += Canbus_PackageReceive; _canbus.CanbusStatusChanged += Canbus_CanbusStatusChanged; _canbus.CanbusExceptionOccour += Canbus_CanbusExceptionOccour; Read from the Canbus: Sending […]