This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.Editable | |
import android.text.TextWatcher | |
import android.widget.EditText | |
import java.text.DecimalFormatSymbols | |
fun EditText.addThousandSeparator() { | |
this.addTextChangedListener(object : TextWatcher { | |
private var current = "" | |
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.Editable | |
import android.text.TextWatcher | |
import android.widget.EditText | |
import java.text.DecimalFormatSymbols | |
fun EditText.addThousandSeparator() { | |
this.addTextChangedListener(object : TextWatcher { | |
private var current = "" | |
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?><!-- | |
~ Copyright 2018 Mukesh Solanki | |
~ | |
~ 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 | |
~ | |
~ Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<org.videolan.libvlc.util.VLCVideoLayout | |
android:id="@+id/VideoView" | |
android:layout_width="match_parent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainViewModel : BaseViewModel<MainContract.Event, MainContract.State, MainContract.Effect>() { | |
/** | |
* Create initial State of Views | |
*/ | |
override fun createInitialState(): MainContract.State { | |
val currentTime = Calendar.getInstance().getTime() | |
return MainContract.State("sajjad-agha-gole-bagha + $currentTime") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainViewModel : BaseViewModel<MainContract.Event, MainContract.State, MainContract.Effect>() { | |
/** | |
* Create initial State of Views | |
*/ | |
override fun createInitialState(): MainContract.State { | |
val currentTime = Calendar.getInstance().getTime() | |
return MainContract.State("sajjad-agha-gole-bagha + $currentTime") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainActivity : ComponentActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
// A surface container using the 'background' color from the theme | |
MaterialTheme { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create initial State of Views | |
*/ | |
override fun createInitialState(): MainContract.State { | |
val currentTime = Calendar.getInstance().getTime() | |
return MainContract.State("sajjad-agha-gole-bagha + $currentTime") | |
} | |
override fun handleEvent(event: MainContract.Event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sajjady.simplegis; | |
import androidx.annotation.NonNull; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.annotation.SuppressLint; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Color; | |
import android.graphics.PointF; | |
import android.os.Bundle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val x = 5 |