Skip to content

Instantly share code, notes, and snippets.

View activity_main.xml
<?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 / activity_main.xml
Last active Aug 21, 2020
KotlinNavigationDrawer
View activity_main.xml
<?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">
View Libraries.kt
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"
View Libraries.kt
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"
View ResponsiveUIWithMediaQuery.dart
Column buildColumnWithMediaQueries() {
return Column(
children: [
Container(
height: pageHeight * 0.3,
color: Colors.blue,
),
Container(
height: pageHeight * 0.2,
color: Colors.yellow,
View ResponsiveUIWithAspectRatio.dart
Column buildColumnWithAspectRatios() {
return Column(
children: [
AspectRatio(
aspectRatio: 10 / 5,
child: Container(
color: Colors.purple,
),
),
AspectRatio(
View JetpackCompose.kt
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyApplicationTheme {
profileDesign()
}
}
}
}
You can’t perform that action at this time.