Tippy computes the tip and total amount for a bill. The app uses the base amount and tip percentage to calculate the amount owed, and it also describes the quality of service based on the tip.
Time spent: X hours spent in total
{ | |
"videos": [{ | |
"name": "[Case Study] Building A Meta Internal Tool To Empower An Entire Org: Staff Promotion Story", | |
"img": "https://firebasestorage.googleapis.com/v0/b/tech-career-growth.appspot.com/o/thumbnails%2FTaroPremiumSessions%2Fpremium_session_2_updated.png?alt=media&token=1e1432b5-b1f2-4b29-be27-8d0bab06cca2&w=1920&q=75", | |
"tags": [ | |
"Meta", | |
"Performance Review" | |
], | |
"views": "9.5K Views", | |
"likes": "77 Likes", |
data class ExamResult(val name: String, val score: Int) | |
fun main() { | |
runTests() | |
} | |
// Return "A" if the score is b/w 90 and 100 | |
// "B" if the score is b/w 80 and 89 | |
// "C" if the score is b/w 70 and 79 | |
// "F" for anything else |
private fun generateSampleData(): List<UserMap> { | |
return listOf( | |
UserMap( | |
"Memories from University", | |
listOf( | |
Place("Branner Hall", "Best dorm at Stanford", 37.426, -122.163), | |
Place("Gates CS building", "Many long nights in this basement", 37.430, -122.173), | |
Place("Pinkberry", "First date with my wife", 37.444, -122.170) | |
) | |
), |
import android.content.Context | |
import android.widget.ImageView | |
import android.widget.Toast | |
import com.bumptech.glide.Glide | |
// From the Kotlin docs | |
fun <T> MutableList<T>?.swap(index1: Int, index2: Int) { | |
if (this == null) return | |
val tmp = this[index1] // 'this' corresponds to the list | |
this[index1] = this[index2] |
class MainActivity : AppCompatActivity() { | |
// ADD VIEW VARIABLE DECLARATIONS HERE | |
private lateinit var tvTipPercent: TextView | |
private lateinit var etBase: EditText | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
// SET THE VIEWS HERE | |
tvTipPercent = findViewById(R.id.tvTipPercent) |
Openhouse is built in Silicon Valley, California. All rights reserved.
Openhouse for Android is built using open source software:
data class ExamResult(val name: String, val score: Int) | |
fun main() { | |
runTests() | |
} | |
// Return "A" if the score is b/w 90 and 100 | |
// "B" if the score is b/w 80 and 89 | |
// "C" if the score is b/w 70 and 79 | |
// "F" for anything else |
Bigger Number App (aka "Cal Admission Test") prompts the user to select which of the two numbers presented is larger. The background color is updated depending on if the correct answer is chosen. New numbers are randomly selected after a user selection.
Time spent: X hours spent in total
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:gravity="center_horizontal" | |
android:orientation="vertical" | |
tools:context=".MainActivity"> | |
<TextView |