Skip to content

Commit ba86982

Browse files
committed
Add basic styling and typography
1 parent 3d13d5e commit ba86982

File tree

13 files changed

+118
-131
lines changed

13 files changed

+118
-131
lines changed
Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
package com.purewowstudio.template
22

3-
import android.os.Bundle
4-
import android.view.LayoutInflater
5-
import android.view.View
6-
import android.view.ViewGroup
7-
import android.widget.Button
83
import androidx.fragment.app.Fragment
9-
import androidx.navigation.fragment.findNavController
104

11-
/**
12-
* A simple [Fragment] subclass as the default destination in the navigation.
13-
*/
14-
class FirstFragment : Fragment() {
15-
16-
override fun onCreateView(
17-
inflater: LayoutInflater,
18-
container: ViewGroup?,
19-
savedInstanceState: Bundle?
20-
): View? {
21-
// Inflate the layout for this fragment
22-
return inflater.inflate(R.layout.fragment_first, container, false)
23-
}
24-
25-
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
26-
super.onViewCreated(view, savedInstanceState)
27-
28-
view.findViewById<Button>(R.id.button_first).setOnClickListener {
29-
findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment)
30-
}
31-
}
32-
}
5+
class FirstFragment : Fragment(R.layout.fragment_first)

app/src/main/kotlin/com/purewowstudio/template/MainActivity.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@ package com.purewowstudio.template
22

33
import android.os.Bundle
44
import androidx.appcompat.app.AppCompatActivity
5+
import androidx.fragment.app.commit
56
import com.google.android.material.floatingactionbutton.FloatingActionButton
67
import com.google.android.material.snackbar.Snackbar
78

8-
class MainActivity : AppCompatActivity() {
9+
class MainActivity : AppCompatActivity(R.layout.activity_main) {
910

1011
override fun onCreate(savedInstanceState: Bundle?) {
1112
super.onCreate(savedInstanceState)
12-
setContentView(R.layout.activity_main)
13-
setSupportActionBar(findViewById(R.id.toolbar))
1413

15-
findViewById<FloatingActionButton>(R.id.fab).setOnClickListener { view ->
16-
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
17-
.setAction("Action", null).show()
14+
supportFragmentManager.commit {
15+
add(FirstFragment(), "FirstFragment")
1816
}
1917
}
2018
}

app/src/main/kotlin/com/purewowstudio/template/SecondFragment.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/src/main/res/font/manrope.ttf

90.3 KB
Binary file not shown.

app/src/main/res/font/roboto.ttf

168 KB
Binary file not shown.
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
43
xmlns:tools="http://schemas.android.com/tools"
54
android:layout_width="match_parent"
65
android:layout_height="match_parent"
76
tools:context="com.purewowstudio.template.MainActivity">
87

9-
<com.google.android.material.appbar.AppBarLayout
10-
android:layout_width="match_parent"
11-
android:layout_height="wrap_content"
12-
android:theme="@style/AppTheme.AppBarOverlay">
13-
14-
<androidx.appcompat.widget.Toolbar
15-
android:id="@+id/toolbar"
16-
android:layout_width="match_parent"
17-
android:layout_height="?attr/actionBarSize"
18-
android:background="?attr/colorPrimary"
19-
app:popupTheme="@style/AppTheme.PopupOverlay" />
20-
21-
</com.google.android.material.appbar.AppBarLayout>
22-
238
<include layout="@layout/content_main" />
249

25-
<com.google.android.material.floatingactionbutton.FloatingActionButton
26-
android:id="@+id/fab"
27-
android:layout_width="wrap_content"
28-
android:layout_height="wrap_content"
29-
android:layout_gravity="bottom|end"
30-
android:layout_margin="@dimen/fab_margin"
31-
app:srcCompat="@android:drawable/ic_dialog_email" />
32-
3310
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
2+
<androidx.fragment.app.FragmentContainerView
3+
xmlns:android="http://schemas.android.com/apk/res/android"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent"
6-
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
5+
android:layout_height="match_parent"/>

app/src/main/res/layout/fragment_first.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
app:layout_constraintBottom_toTopOf="@id/button_first"
1515
app:layout_constraintEnd_toEndOf="parent"
1616
app:layout_constraintStart_toStartOf="parent"
17-
app:layout_constraintTop_toTopOf="parent" />
17+
app:layout_constraintTop_toTopOf="parent"
18+
android:textAppearance="@style/TextAppearance.App.Headline4"/>
1819

1920
<Button
2021
android:id="@+id/button_first"

app/src/main/res/layout/fragment_second.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
3+
<item name="android:windowLightStatusBar">true</item>
4+
</style>
5+
</resources>

0 commit comments

Comments
 (0)