By: Sagar Chamling
sudo apt install git
package my.app.android | |
import androidx.compose.ui.text.AnnotatedString | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.VisualTransformation | |
import kotlin.math.absoluteValue | |
class MaskVisualTransformation(private val mask: String): VisualTransformation { | |
private val specialSymbolsIndices = mask.indices.filter { mask[it] != '#' } |
import androidx.compose.ui.text.AnnotatedString | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.VisualTransformation | |
class DateVisualTransformation : VisualTransformation { | |
override fun filter(text: AnnotatedString): TransformedText { | |
// Make the string DD-MM-YYYY | |
val trimmed = if (text.text.length >= 8) text.text.substring(0..7) else text.text | |
var output = "" |
import androidx.compose.foundation.BorderStroke | |
/* | |
* Copyright 2020 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
package com.exoplayer.cast | |
import android.net.Uri | |
import android.os.Bundle | |
import android.view.Menu | |
import android.view.MenuItem | |
import androidx.appcompat.app.AppCompatActivity | |
import com.google.android.exoplayer2.Player | |
import com.google.android.exoplayer2.SimpleExoPlayer | |
import com.google.android.exoplayer2.ext.cast.CastPlayer |
nnoremap yy "+yy | |
vnoremap y "+y | |
nnoremap p "+p | |
vnoremap p "+p | |
nnoremap P "+P | |
vnoremap P "+P |