Skip to content

Instantly share code, notes, and snippets.

View hixguru's full-sized avatar

HwanIk Kim (Hesed) hixguru

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<layout
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">
<data>
<variable
name="vm"
itemView.tvTitle.text = "set text by itemView"
containerView?.tvTitle?.text = "set text by containerView"
View var10000 = this.itemView;
TextView var7 = (TextView)var10000.findViewById(id.tvTitle);
var7.setText((CharSequence)"set text by itemView");
var10000 = this.getContainerView();
if (var10000 != null) {
var7 = (TextView)var10000.findViewById(id.tvTitle);
if (var7 != null) {
TextView var10000 = (TextView)this._$_findCachedViewById(id.tvTitle);
public View _$_findCachedViewById(int var1) {
if (this._$_findViewCache == null) {
this._$_findViewCache = new HashMap();
}
View var2 = (View) this._$_findViewCache.get(var1);
if (var2 == null) {
View var10000 = this.getContainerView();
package co.riiid.vida.main.study.widget
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager
class MainWidgetAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
@hixguru
hixguru / example.kt
Last active January 19, 2018 06:53
사이즈가 동일한 List의 요소들을 하나씩 순차적으로 merge하여 하나의 List를 반환한다.
/**
* 목적 : 각각의 리스트의 요소들을 순차적으로 하나씩 merge하여 하나의 리스트를 반환받고 싶다.
* 상황 : 각각의 question sound를 만들 때 (number + questions script + mute) 순으로 재생시키고 싶다.
*/
// 시도했던 방법
fun <T> List<T>.mergeSequentiallyWith(vararg others: List<T>): List<T> {
val list = arrayListOf<T>()
others
import java.util.*
/**
* Created by hwanik on 2017. 6. 9..
*/
fun main(args: Array<String>) {
val max = 5
try {
println("랜덤숫자: ${getRandom(max)}")