This file contains 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
@Table(name = "ModelName", database = DatabaseName::class) | |
data class Group(@PrimaryKey(autoincrement = false) @Column(name = "id") var id: String = "", | |
@Column(name = "name") var name: String = "", | |
var coverPhoto: CoverPhoto? = null, | |
var emailDomains: Array<String>? = null) : BaseModel() { | |
} |
This file contains 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
... | |
dependencies { | |
... | |
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' | |
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' | |
... | |
} | |
... |
This file contains 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
<com.adamhurwitz.retrorecycler.DesignComponents.RippleTextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:clickable="true" | |
android:gravity="center" | |
android:text="@string/course_index" | |
android:textColor="@color/colorPrimaryDark" | |
android:textSize="16sp" | |
app:backgroundColor="@color/background" | |
app:rippleColor="@color/ripple" /> |
This file contains 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 RippleTextView extends AppCompatTextView { | |
public RippleTextView(Context context) { | |
super(context); | |
} | |
public RippleTextView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |
This file contains 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
<resources> | |
<declare-styleable name="RippleText"> | |
<attr name ="rippleEnabled" format="boolean" /> | |
<attr name = "backgroundColor" format="color" /> | |
<attr name = "rippleColor" format="color" /> | |
</declare-styleable> | |
</resources> |
This file contains 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
<resources> | |
... | |
<color name="ripple_default">#848485</color> | |
<color name="background">#02B3E2</color> | |
<color name="ripple">#2C3B48</color> | |
... | |
</resources> |
This file contains 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 RippleTextView(Context context) { | |
super(context); | |
//Retrieve attribute values at runtime | |
getXMLAttributes(context, null); | |
} | |
public RippleTextView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
//Retrieve attribute values at runtime | |
getXMLAttributes(context, attrs); |
This file contains 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 RippleEffect { | |
public static void addRippleEffect(View view, boolean | |
rippleEnabled, int backgroundColor, int rippleColor) { | |
if (rippleEnabled && Build.VERSION.SDK_INT >= | |
Build.VERSION_CODES.LOLLIPOP) { | |
//Create RippleDrawable | |
view.setBackground( |
This file contains 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 RippleTextView(Context context) { | |
super(context); | |
getXMLAttributes(context, null); | |
RippleEffect.addRippleEffect(this, rippleEnabled, | |
backgroundColor, rippleColor); | |
} | |
public RippleTextView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
getXMLAttributes(context, attrs); | |
RippleEffect.addRippleEffect(this, rippleEnabled, |
This file contains 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
fun queryMemberStatus(id: String): Observable<List<Group>> { | |
return Observable.just( | |
SQLite.select(Group_Table.memberStatus) | |
.from(Group::class.java) | |
.where(Group_Table.id.`is`(id)).queryList()) | |
} |
OlderNewer