This file contains hidden or 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
@LargeTest | |
@RunWith(AndroidJUnit4::class) | |
class SignInActivityTest123 { | |
@Rule | |
@JvmField | |
var mActivityTestRule = ActivityTestRule(SignInActivity::class.java) | |
@Test | |
fun signInActivityTest123() { | |
val appCompatEditText = onView( | |
allOf(withId(R.id.email), |
This file contains hidden or 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 { | |
... | |
implementation 'androidx.compose:compose-compiler:0.1.0-dev04' | |
implementation 'androidx.compose:compose-runtime:0.1.0-dev04' | |
implementation 'androidx.ui:ui-layout:0.1.0-dev04' | |
implementation 'androidx.ui:ui-framework:0.1.0-dev04' | |
implementation 'androidx.ui:ui-layout:0.1.0-dev04' | |
implementation 'androidx.ui:ui-foundation:0.1.0-dev04' | |
implementation 'androidx.ui:ui-animation:0.1.0-dev04' | |
implementation 'androidx.ui:ui-tooling:0.1.0-dev04' |
This file contains hidden or 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
android { | |
... | |
composeOptions { | |
kotlinCompilerExtensionVersion "0.1.0-dev04" | |
} | |
} |
This file contains hidden or 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
android { | |
... | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
kotlinOptions { | |
jvmTarget = "1.8" | |
} | |
} |
This file contains hidden or 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
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
Text(text = "Hello, World") | |
} | |
} | |
} |
This file contains hidden or 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
data class CoffeeDrink( | |
val name: String, | |
@DrawableRes val imageUrl: Int, | |
val description: String, | |
val ingredients: String | |
) |
This file contains hidden or 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 getCoffeeDrinks(): List<CoffeeDrink> { | |
return listOf( | |
CoffeeDrink( | |
name = "Americano", | |
imageUrl = R.drawable.americano_small, | |
ingredients = "Espresso, Water" | |
), | |
CoffeeDrink( | |
name = "Cappuccino", | |
imageUrl = R.drawable.cappuccino_small, |
This file contains hidden or 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
@Composable | |
fun CoffeeDrinkCard( | |
coffeeDrink: CoffeeDrinkModel | |
) { | |
Row { | |
Container(modifier = LayoutSize(80.dp), alignment = Alignment.Center) { | |
DrawImage(image = imageResource(coffeeDrink.imageUrl)) | |
} | |
Container( | |
alignment = Alignment.TopLeft, |
This file contains hidden or 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
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
CoffeeDrinksList(coffeeDrinks) | |
} | |
} | |
@Composable | |
fun CoffeeDrinkList( | |
coffeeDrinks: List<CoffeeDrink> |
This file contains hidden or 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
@Composable | |
fun CoffeeDrinkCard( | |
coffeeDrink: CoffeeDrinkModel | |
) { | |
MaterialTheme { | |
Column { | |
Row { | |
CoffeeDrinkLogo(id = coffeeDrink.imageUrl) | |
Container(alignment = Alignment.TopLeft,modifier = LayoutFlexible(1f)) { | |
Column { |