Download Play Framework:
https://www.playframework.com/download
Execute:
./activator ( Mac )
public class LoginForm extends Model { | |
private String email; | |
private String password; | |
// Getters and Setters | |
... | |
} |
#!/usr/bin/env bash | |
#Notice: if unable to connect to [ip]:5555, | |
#try adb kill-server then try again. | |
adb shell ip route > addrs.txt | |
#Case 1:Nexus 7 | |
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48 | |
#Case 2: Smartsian T1,Huawei C8813 | |
#default via 192.168.88.1 dev eth0 metric 30 |
public class PrimaryKeyFactory { | |
/** | |
* primary key field name | |
*/ | |
public static final String PRIMARY_KEY_FIELD = "id"; | |
/** | |
* Singleton instance. |
import android.util.Log; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.atomic.AtomicLong; | |
import io.realm.Realm; | |
import io.realm.RealmConfiguration; | |
import io.realm.RealmObject; | |
import io.realm.RealmObjectSchema; | |
import io.realm.RealmSchema; |
import android.text.Editable; | |
import android.text.TextWatcher; | |
/** | |
* Text watcher for giving "#### #### #### ####" format to edit text. | |
* Created by epool on 3/14/16. | |
*/ | |
public class CreditCardFormattingTextWatcher implements TextWatcher { | |
private static final String EMPTY_STRING = ""; |
#!/bin/bash | |
sudo mount -o remount,size=10G,noatime /tmp | |
echo "Done. Please use 'df -h' to make sure folder size is increased." |
package com.example.marcin.splitlayout; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Region; |
#!/usr/bin/env bash | |
#Notice: if unable to connect to [ip]:5555, | |
#try adb kill-server then try again. | |
adb shell ip route > addrs.txt | |
#Case 1:Nexus 7 | |
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48 | |
#Case 2: Smartsian T1,Huawei C8813 | |
#default via 192.168.88.1 dev eth0 metric 30 |
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example: