Skip to content

Instantly share code, notes, and snippets.

View olegflo's full-sized avatar
💭
🕉

Oleg Soroka olegflo

💭
🕉
View GitHub Profile
using System.Collections.Generic;
using System.Linq;
using Android.App;
using Android.OS;
using SupportDialogFragment = Android.Support.V4.App.DialogFragment;
namespace Example.Android.App.Views.Base
{
public class ListDialogFragment : SupportDialogFragment
{
firstName.setHint(Html.fromHtml("First Name<font color=#c62126><sup>*</sup></font>"));
adb kill-server
adb devices
@olegflo
olegflo / gist:4959281
Created February 15, 2013 09:09
Custom ListView item.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="70dp">
...
</RelativeLayout>
@olegflo
olegflo / gist:4713711
Last active December 12, 2015 04:19
Parcelable Live Template for Idea
public final static Parcelable.Creator<$CLASS_NAME$> CREATOR = new Parcelable.Creator<$CLASS_NAME$>() {
@Override
public $CLASS_NAME$[] newArray(int size) {
return new $CLASS_NAME$[size];
}
@Override
public $CLASS_NAME$ createFromParcel(Parcel source) {
return new $CLASS_NAME$(source);
}
@olegflo
olegflo / gist:4025676
Created November 6, 2012 16:02
ofsnip
public class OnBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
// do stuff
}
}
}
@olegflo
olegflo / gist:3965961
Created October 27, 2012 20:09
qbdoc
public interface QBCallback {
public void onComplete(Result result);
public void onComplete(Result result, Object context);
}
<target name="ftp_copy_files" depends="ftp-remove_folders">
<ftp server="${server.ftp}"
userid="${login.ftp}"
password="${password.ftp}"
remotedir="${remote_root.ftp}/${remote_android.ftp}">
<fileset dir="${javadoc}"/>
</ftp>
</target>
@olegflo
olegflo / gist:3928514
Created October 21, 2012 21:06
qbdoc
// perform first request
QBAuth.authorizeApp(null);
// perform second request
QBUsers.signIn("indianajones", "indianapassword", null);
// perform third request
QBLocations.createLocation(new QBLocation(35.0, 53.0, "I'm inside the Cave"), null);
@olegflo
olegflo / gist:3927166
Created October 21, 2012 14:46
qbdoc
// by default set as false
QBSettings.setSynchronous(true);