Skip to content

Instantly share code, notes, and snippets.

View Y-E-P's full-sized avatar
🏠
Working from home

Yurii Poudanien Y-E-P

🏠
Working from home
  • NoName Ltd.
  • Vinnytsia
View GitHub Profile
@Y-E-P
Y-E-P / MainScreen.kt
Created June 7, 2024 11:13 — forked from stevdza-san/MainScreen.kt
TabRow with HorizontalPager - Jetpack Compose
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
@Y-E-P
Y-E-P / CreateDialog.java
Created August 21, 2018 13:05 — forked from koocbor/CreateDialog.java
Full Screen Dialog in Android
FullScreenDialog dialog = new FullScreenDialog();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
dialog.show(ft, FullScreenDialog.TAG);
@Y-E-P
Y-E-P / TakeIfExample.kt
Created November 30, 2017 12:05 — forked from AkshayChordiya/TakeIfExample.kt
Example of takeIf function in Kotlin
val index = "Kotlin".indexOf('K').takeIf { it > 0 } ?: 0
@Y-E-P
Y-E-P / gist:0d47d82db3a5ee5c7315ec1608d247fd
Created July 25, 2017 09:01 — forked from brandhill/gist:5883253
Android : Add a reminder/event in calendar
if (Build.VERSION.SDK_INT >= 14) {
Intent intent = new Intent(Intent.ACTION_INSERT)
.setData(Events.CONTENT_URI)
.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, beginTime.getTimeInMillis())
.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, endTime.getTimeInMillis())
.putExtra(Events.TITLE, "Yoga")
.putExtra(Events.DESCRIPTION, "Group class")
.putExtra(Events.EVENT_LOCATION, "The gym")
.putExtra(Events.AVAILABILITY, Events.AVAILABILITY_BUSY)
.putExtra(Intent.EXTRA_EMAIL, "[email protected],[email protected]");