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
var inputTime = (targetYear, targetMonth, targetDay, startTime, endTime) => { | |
console.log(targetYear, targetMonth, targetDay); | |
document.getElementById(`ttvTimeSt${moment([targetYear, targetMonth, targetDay]).format('YYYY-MM-DD')}`).click(); | |
if(startTime != ""){ | |
document.getElementById('startTime').value = startTime; | |
} | |
if(endTime != ""){ | |
document.getElementById('endTime').value = endTime; | |
} | |
document.getElementById("dlgInpTimeOk").click(); |
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
data class SomeObject(val id: Int) | |
class SampleRecyclerViewAdapter(private val listener: SampleOnClickListener?) : | |
RecyclerView.Adapter<RecyclerView.ViewHolder>() { | |
private var items = mutableListOf<SomeObject>() | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder = when (viewType) { | |
VIEW_TYPE_SAMPLE -> SampleViewHolder.create(LayoutInflater.from(parent.context), parent, listener) | |
else -> throw IllegalArgumentException("$viewType is unexpected here.") |
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
interface OnPositionListener { | |
void insideScreen(int startPosition); | |
} | |
// positionのlisterはMapで持ちます。 | |
private HashMap<Integer, OnCompletelyVisiblePositionListener> positionListeners = new HashMap<>(); | |
public void setOnPositionListener( | |
int position, OnPositionListener positionListener) { | |
this.positionListeners.put(position, positionListener); |
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.finc.camera.provider; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.PermissionChecker; | |
/** |
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.finc.camera.provider; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.content.ContentValues; | |
import android.content.Intent; | |
import android.database.Cursor; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Matrix; |
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
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
@Override | |
public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
super.onScrollStateChanged(recyclerView, newState); | |
int firstCompletelyVisibleItemPosition = ((LinearLayoutManager) recyclerView.getLayoutManager()) | |
.findFirstCompletelyVisibleItemPosition(); | |
boolean isVideo = recyclerView.getAdapter() | |
.getItemViewType(firstCompletelyVisibleItemPosition) == TYPE_MOVIE; |
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.finc.strageframewok; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; |
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 MainActivity extends AppCompatActivity { | |
private static final int CODE_PICKER = 100; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
showDocumentPicker(); |
NewerOlder