Skip to content

Instantly share code, notes, and snippets.

open class LinearLayoutManagerExt @JvmOverloads constructor (
val name : String,
val fragment: Fragment,
val adapter : RecyclerView.Adapter<out RecyclerView.ViewHolder>,
attrs : AttributeSet? = null,
defStyleAttr : Int = 0,
defStyleRes : Int = 0
) : LinearLayoutManager(fragment.requireContext(),attrs,defStyleAttr,defStyleRes){
protected var savedState : SavedState? = fragment.arguments?.getParcelable<SavedState?>(name)
<!-- Keyboard -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/keyboardLayout"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:columnCount="3"
android:rowCount="4"
>
[ContentProperty("FontSize")]
public class FontSizeExtension : IMarkupExtension
{
public double FontSize { get; set; }
//public double Factor { get; set; } = 0;
public double Mini { get; set; } = -1;
public double SizeiOS { get; set; } = -1;
public double iOSmini { get; set; } = -1;
//public double FactoriOS { get; set; } = -1;
@vlkam
vlkam / gist:807151a99872240918a1b3351db8cb56
Last active January 21, 2019 15:06
Sends custom crash report into HockeyApp
// https://support.hockeyapp.net/kb/api/api-crashes
public static async Task<bool> SendHandledException(CaughtExceptionModel model)
{
string version = DeviceInfo.AppVersion;
var arr = version.Split('.');
string short_ver = arr[arr.Length - 1];
var deviceInfo = Plugin.DeviceInfo.CrossDeviceInfo.Current;
StringBuilder sb = new StringBuilder(12000);