Moja lista:
- zadanie pierwsze
- zadanie drugie
package pl.kitek.rvswipetodelete | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.drawable.ColorDrawable | |
import android.support.v4.content.ContextCompat | |
import android.support.v7.widget.RecyclerView | |
import android.support.v7.widget.helper.ItemTouchHelper |
package your.package.name | |
import android.content.Context | |
import android.graphics.* | |
import android.util.AttributeSet | |
import android.view.View | |
class TriangleShapeView @JvmOverloads constructor( | |
context: Context, | |
attrs: AttributeSet? = null, |
/* | |
* Copyright 2014 Julian Shen | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
import android.content.Context | |
import android.database.sqlite.SQLiteDatabase | |
import android.database.sqlite.SQLiteOpenHelper | |
class DbHelper(context: Context) : SQLiteOpenHelper(context, "some.db", null, 1) { | |
override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) { | |
} |
Moja lista:
git log --after=2011-01-01 --before=2011-01-31 --format=format: --shortstat master |
#!/bin/bash | |
unload() { | |
echo -ne "unloading VB modules..." | |
kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB | |
kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt | |
kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp | |
kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv | |
} |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
LinearLayout linearLayout = new LinearLayout(getActivity()); | |
linearLayout.setOrientation(LinearLayout.HORIZONTAL); | |
linearLayout.setLayoutParams(new LinearLayout.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, AbsListView.LayoutParams.WRAP_CONTENT)); | |
TableLayout table = new TableLayout(getActivity()); | |
table.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT)); | |
for (int i = 0; i < 10; i++) { |
// Funkcja wykorzystywana do force re-renderingu (bug@4.2.2 z pustymi stronami) | |
function redrawPage(top) { | |
document.body.scrollTop = 1; | |
document.body.scrollTop = 0; | |
$(function() { | |
document.body.scrollTop = top + 1; | |
document.body.scrollTop = top; | |
}); | |
} |
NinePatchDrawable bg = (NinePatchDrawable) getResources().getDrawable(R.drawable.button_new_light); | |
int pL = btnLike.getPaddingLeft(); | |
int pR = btnLike.getPaddingRight(); | |
int pT = btnLike.getPaddingTop(); | |
int pB = btnLike.getPaddingBottom(); | |
if(Build.VERSION.SDK_INT >= 16) { | |
btnLike.setBackground(bg); | |
} else { | |
btnLike.setBackgroundDrawable(bg); |