Skip to content

Instantly share code, notes, and snippets.

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyApplicationTheme {
profileDesign()
}
}
}
}
Column buildColumnWithAspectRatios() {
return Column(
children: [
AspectRatio(
aspectRatio: 10 / 5,
child: Container(
color: Colors.purple,
),
),
AspectRatio(
Column buildColumnWithMediaQueries() {
return Column(
children: [
Container(
height: pageHeight * 0.3,
color: Colors.blue,
),
Container(
height: pageHeight * 0.2,
color: Colors.yellow,
def retrofitVersion = '2.8.1'
def rxJavaVersion = '2.1.1'
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxJavaVersion"
def retrofitVersion = '2.8.1'
def rxJavaVersion = '2.1.1'
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rxJavaVersion"
@ebubekirsezer
ebubekirsezer / activity_main.xml
Last active August 21, 2020 16:40
KotlinNavigationDrawer
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.drawerlayout.widget.DrawerLayout
android:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<fragment
@ebubekirsezer
ebubekirsezer / test_file.txt
Created April 3, 2021 16:29
A brand new Gist
Hello World!
@ebubekirsezer
ebubekirsezer / test_file.txt
Created April 3, 2021 16:46
A brand new Gist
Hello World!
@ebubekirsezer
ebubekirsezer / test_file.txt
Created April 3, 2021 17:46
A brand new Gist
Hello World!