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 androidx.compose.ui.text.input.OffsetMapping | |
class CurrencyOffsetMapping(originalText: String, formattedText: String) : OffsetMapping { | |
private val originalLength: Int = originalText.length | |
private val indexes = findDigitIndexes(originalText, formattedText) | |
private fun findDigitIndexes(firstString: String, secondString: String): List<Int> { | |
val digitIndexes = mutableListOf<Int>() | |
var currentIndex = 0 | |
for (digit in firstString) { |
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
[ | |
{ | |
"allDistrictList": [ | |
{ | |
"area_sq_km": "1507", | |
"headquarter": "Bhojpur", | |
"id": 1, | |
"municipalityList": [ | |
{ | |
"area_sq_km": "241.15", |
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"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<androidx.appcompat.widget.LinearLayoutCompat | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
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
public class MediaPreviewModel implements Serializable { | |
public enum MediaPickedType { | |
TYPE_CAMERA, | |
TYPE_PHOTOS, | |
} | |
private String mediaId; | |
//file uri |
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
/* | |
* Created by NaRan on 9/2/21, 3:44 PM | |
* Last modified 9/2/21, 3:44 PM | |
* Copyright (c) 2021 . | |
* All rights reserved. | |
* | |
*/ | |
import org.jetbrains.annotations.NotNull; |
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
/* | |
* Created by NaRan on 8/18/21, 2:39 PM | |
* Last modified 8/18/21, 2:39 PM | |
* Copyright (c) 2021 . | |
* All rights reserved. | |
* | |
*/ | |
import android.content.Context; | |
import com.google.gson.Gson; |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<solid android:color="@color/white" /> | |
</shape> | |
</item> | |
<item> | |
<bitmap | |
android:gravity="center" |
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
public class SplashActivity extends AppCompatActivity { | |
private final int SPLASH_TIME_OUT = 3000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
new Handler().postDelayed(() -> { | |
Intent i = new Intent(SplashActivity.this, MainActivity.class); |
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.content.Context | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.widget.TextView | |
import androidx.recyclerview.widget.RecyclerView | |
class PagerAdapter(private val context: Context, private val titleList: List<String>) : | |
RecyclerView.Adapter<PagerAdapter.PageHolder>() { |
NewerOlder