Skip to content

Instantly share code, notes, and snippets.

View avisper's full-sized avatar

Avishay Peretz avisper

View GitHub Profile
@avisper
avisper / DbClient.kt
Created July 27, 2020 14:00
MyCrashlyics some classes
interface IDbClient {
fun saveCrashReport(throwable: Throwable)
fun loadExceptions( ): List<ExceptionEntity>
}
class DbClient(context: Context) : IDbClient {
@avisper
avisper / CompoundButtonGroupActivity.kt
Last active December 11, 2019 08:35
MixedCompoundButtonGroup resolve the one and only selected button in CompoundButton (CheckBox, RadioButton, Switch, ToggleButton) group
package your.project.package
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.CompoundButton
import android.widget.Toast
import your.project.package.R
class CompoundButtonGroupActivity : AppCompatActivity() {
private lateinit var mixedCompoundButtonGroup: MixedCompoundButtonGroup
@avisper
avisper / MultiRowsRadioGroup.kt
Last active December 11, 2019 08:35
MultiRowsRadioGroup is a RadioGroups container with different columns or rows
package your.project.package
import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.RadioGroup