Skip to content

Instantly share code, notes, and snippets.

View AlexGabor's full-sized avatar

Alexandru Gabor AlexGabor

View GitHub Profile
@AlexGabor
AlexGabor / layout.xml
Created August 17, 2019 07:58
ConstraintLayout header and list
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/header"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
<androidx.constraintlayout.motion.widget.MotionLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutDescription="@xml/scene">
@AlexGabor
AlexGabor / basic.cpp
Last active September 17, 2019 16:10
C++ basic statements
#include <iostream>
using namespace std;
int main () {
// write your stuff here
int x; // declare variable for a an "integer" value
float x; // declare variable for a "real" value
DE91 1000 0000 0123 4567 89
@AlexGabor
AlexGabor / LoginScreenExample.kt
Created August 30, 2022 14:38
state holder instead of vm
@Composable
fun LoginScreen(
modifier: Modifier = Modifier,
state: LoginScreenState = rememberLoginScreenState(),
) {
// ...
}
@Composable
fun rememberLoginScreenState(