Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions app/src/main/java/edu/temple/fancyscreen/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ class MainActivity : AppCompatActivity() {

findViewById<ImageView>(R.id.profile_photo).setImageResource(R.drawable.istockphoto)

findViewById<TextView>(R.id.name).setText("Michelle Townsend")
findViewById<TextView>(R.id.name).setText(getString(R.string.michelle_townsend))

with(findViewById<TextView>(R.id.email)) {
text = "mt@ourcompany.com"
text = context.getString(R.string.mt_ourcompany_com)
setTextColor(Color.BLUE)
}

findViewById<TextView>(R.id.extension).text = "2253"
findViewById<TextView>(R.id.extension).text = getString(R.string._2253)

findViewById<TextView>(R.id.department).text = "Design"
findViewById<TextView>(R.id.department).text = getString(R.string.design)

findViewById<TextView>(R.id.supervisor).text = "Gail Davers"
findViewById<TextView>(R.id.supervisor).text = getString(R.string.gail_davers)

with (findViewById<RecyclerView>(R.id.directReportsRecyclerView)) {
adapter = RecyclerViewAdapter(
arrayOf(
"Kate Sacloff",
"Andrew Klein",
"Maria Ortega",
"Brent Stevenson",
"Daniel Cho",
"Jorge Gomez"
getString(R.string.kate_sacloff),
getString(R.string.andrew_klein),
getString(R.string.maria_ortega),
getString(R.string.brent_stevenson),
getString(R.string.daniel_cho),
getString(R.string.jorge_gomez)
)
)
layoutManager = LinearLayoutManager(this@MainActivity)
Expand Down
64 changes: 64 additions & 0 deletions app/src/main/res/layout-sw600dp/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="16dp">

<!-- LEFT SIDE: Profile Info -->
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">

<ImageView
android:id="@+id/profile_photo"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:scaleType="centerCrop" />

<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:layout_marginTop="16dp"/>

<TextView
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>

<TextView
android:id="@+id/extension"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>

<TextView
android:id="@+id/department"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>

<TextView
android:id="@+id/supervisor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"/>

</LinearLayout>

<!-- RIGHT SIDE: Direct Reports -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/directReportsRecyclerView"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:padding="16dp"/>

</LinearLayout>
15 changes: 15 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<resources>
<string name="app_name">FancyScreen</string>

<string name="michelle_townsend">Michelle Townsend</string>
<string name="mt_ourcompany_com">mt@ourcompany.com</string>
<string name="_2253">2253</string>
<string name="design">Conception</string>
<string name="gail_davers">Gail Davers</string>
<string name="kate_sacloff">Kate Sacloff</string>
<string name="andrew_klein">Andrew Klein</string>
<string name="maria_ortega">Maria Ortega</string>
<string name="brent_stevenson">Brent Stevenson</string>
<string name="daniel_cho">Daniel Cho</string>
<string name="jorge_gomez">Jorge Gomez</string>
</resources>
13 changes: 13 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<resources>
<string name="app_name">FancyScreen</string>

<string name="michelle_townsend">Michelle Townsend</string>
<string name="mt_ourcompany_com">mt@ourcompany.com</string>
<string name="_2253">2253</string>
<string name="design">Design</string>
<string name="gail_davers">Gail Davers</string>

<string name="kate_sacloff">Kate Sacloff</string>
<string name="andrew_klein">Andrew Klein</string>
<string name="maria_ortega">Maria Ortega</string>
<string name="brent_stevenson">Brent Stevenson</string>
<string name="daniel_cho">Daniel Cho</string>
<string name="jorge_gomez">Jorge Gomez</string>
</resources>