This file contains 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 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 org.example; | |
import com.google.protobuf.FieldMask; | |
import com.google.protobuf.InvalidProtocolBufferException; | |
import com.google.protobuf.util.FieldMaskUtil; | |
import com.google.protobuf.util.JsonFormat; | |
import org.example.pb.Address; | |
import org.example.pb.UpdateUserRequest; | |
import org.example.pb.User; | |
import org.slf4j.Logger; |
This file contains 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
//TODO: add package info here | |
import android.os.Bundle | |
import android.annotation.SuppressLint | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.view.accessibility.AccessibilityNodeInfo | |
import android.widget.FrameLayout | |
import androidx.annotation.LayoutRes |
This file contains 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.os.Bundle | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.core.view.ViewCompat | |
import androidx.core.widget.NestedScrollView | |
import androidx.fragment.app.Fragment | |
import androidx.recyclerview.widget.RecyclerView | |
import kotlinx.android.synthetic.main.fragment_data.nsvData | |
import kotlinx.android.synthetic.main.fragment_data.rvData |
This file contains 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 it.inrebus.skyte.rtcclient; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.opengl.GLES20; | |
import android.opengl.GLUtils; |
This file contains 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
RecyclerViewSwipeHelper swipeHelper = new RecyclerViewSwipeHelper(this, listView) { | |
@Override | |
public void instantiateUnderlayButton(RecyclerView.ViewHolder viewHolder, List<UnderlayButton> underlayButtons) { | |
underlayButtons.add(new RecyclerViewSwipeHelper.UnderlayButton( | |
"Delete", | |
0, | |
Color.parseColor("#FF3C30"), | |
new RecyclerViewSwipeHelper.UnderlayButtonClickListener() { | |
@Override | |
public void onClick(int pos) { |
This file contains 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
data class ResponseBody<T>( | |
var body: T?, | |
var error: ResponseError? | |
) | |
data class ResponseError( | |
var statusCode: Int, | |
var message: String | |
) |
This file contains 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.lalamove.core.view; | |
import android.content.Context; | |
import android.support.annotation.Nullable; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.inputmethod.InputMethodManager; | |
/** | |
* Implementation of {@link RecyclerView} that will dismiss keyboard when scrolling. |
This file contains 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 NewsDetailActivity extends AppCompatActivity implements View.OnClickListener { | |
Activity activity; | |
Toolbar toolbar; | |
File TEMP_FILE_SAVE_PATH = Environment.getExternalStorageDirectory(); | |
String TEMP_FILE_NAME = "news_"; | |
String URL=""; | |
private DownloadManager downloadManager; | |
@Override |
This file contains 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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import com.google.common.collect.ComparisonChain; | |
import org.apache.commons.beanutils.BeanComparator; | |
import org.apache.commons.collections.comparators.ComparatorChain; | |
import org.apache.commons.lang3.builder.CompareToBuilder; |
NewerOlder