Skip to content

Instantly share code, notes, and snippets.

View Vaikesh's full-sized avatar
🐼
Skadoosh

Yksh Vaikesh

🐼
Skadoosh
  • Noxum GmbH
  • Kochi - India
View GitHub Profile
@Vaikesh
Vaikesh / Decompress.cs
Last active November 3, 2020 12:31
Sample Class to Decompress (Unzip) files in Xamarin.Android.
using System;
using Android.Util;
using Java.IO;
using Java.Util.Zip;
namespace ZipManager
{
public class Decompress
{
String _zipFile;
@Vaikesh
Vaikesh / Compress.cs
Created January 30, 2016 07:52
Sample Class to compress (zip) files in Xamarin.Android
using System;
using System.Diagnostics;
using Android.Util;
using Java.IO;
using Java.Util.Zip;
namespace ZipManager
{
public class Compress
{
@Vaikesh
Vaikesh / DynamicControl.cs
Created November 14, 2015 11:06
Create a textview and Edittext dynamically when a button is clicked.
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace DynamicControl
@Vaikesh
Vaikesh / keyboardIOS.cs
Created October 27, 2015 05:47
Handle keyboard show/hide in Xamarin.iOS.
NSObject keyboardShowObserver;
NSObject keyboardHideObserver;
public override void ViewWillAppear(bool animated) {
base.ViewWillAppear(animated);
keyboardShowObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, (notification) => {
NSValue nsKeyboardBounds = (NSValue)notification.UserInfo.ObjectForKey(UIKeyboard.BoundsUserInfoKey);
RectangleF keyboardBounds = nsKeyboardBounds.RectangleFValue;
float height = View.Bounds.Height - keyboardBounds.Height;
if (NavigationController != null && NavigationController.TabBarController != null && NavigationController.TabBarController.TabBar != null) {
@Vaikesh
Vaikesh / MyPage.cs
Last active October 14, 2015 06:46
Handle events in listview view cell
using System;
using Xamarin.Forms;
namespace LeoSample
{
// Page containning list
public class MyPage : ContentPage
{
ListView lstView;
@Vaikesh
Vaikesh / CustomNavigationRenderer.cs
Created September 24, 2015 10:37
Custom Renderer of Navigation Page to remove action bar icon for Android in Xamarin.Forms
using Android.App;
using Android.Graphics.Drawables;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using SamplesByVaikesh.Droid;
[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomNavigationRenderer))]
namespace SamplesByVaikesh.Droid
{
public class CustomNavigationRenderer : NavigationRenderer