Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
ejaz4 committed Dec 31, 2021
1 parent 6e43cf2 commit 500e43a
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 7 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

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

8 changes: 8 additions & 0 deletions app/src/main/java/co/dothq/browser/WelcomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.LinearLayout
import android.widget.TextView
import co.dothq.browser.util.defaultProfile
import java.util.*

class WelcomeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_welcome)

val year = Calendar.getInstance().get(Calendar.YEAR);

val copyrightInfo = findViewById<TextView>(R.id.copyrightText)

copyrightInfo.text = "© ${year.toString()} Dot HQ"

val startButton = findViewById<LinearLayout>(R.id.startButton)
startButton.setOnClickListener {
defaultProfile().applyDefaultPreferences(applicationContext);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/input_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<stroke android:width="0dp" android:color="?colorPrimaryVariant" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/input_layout_normal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?colorPrimaryVariant"/>
<stroke android:width="0dp" android:color="?colorPrimaryVariant" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/input_layout_pressed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?colorPrimaryVariant"/>
<stroke android:width="0dp" android:color="@color/white" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/input_layout"
android:background="@drawable/input_layout_normal"
android:orientation="horizontal">

<TextView
Expand Down
37 changes: 32 additions & 5 deletions app/src/main/res/layout/activity_welcome.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
tools:context=".WelcomeActivity">

<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorPrimary"
android:foregroundGravity="bottom"
android:gravity="center"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
Expand All @@ -19,12 +21,25 @@
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10sp"
android:text="Dot Browser"
android:textAlignment="center"
android:textColor="?colorSecondary"
android:textSize="27sp"
android:textStyle="bold" />

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10sp"
android:paddingStart="20sp"
android:paddingEnd="20sp"
android:text="The privacy-centric, modern web browser that fights for your privacy when browsing the internet."
android:textAlignment="center"
android:textColor="?colorSecondary"
android:textSize="16sp" />

<LinearLayout
android:id="@+id/startButton"
android:layout_width="wrap_content"
Expand All @@ -45,12 +60,24 @@
android:textColor="@color/white" />
</LinearLayout>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:id="@+id/copyrightText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="// Todo: this welcome screen"
android:textAlignment="center"
android:textColor="?colorSecondary" />
android:layout_weight="1"
android:text="© 2021 Dot HQ"
android:textAlignment="center" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@

</style>
<string name="mode">Day</string>
<color name="colorPrimaryVariantDark">@color/gray_4</color>
</resources>

0 comments on commit 500e43a

Please sign in to comment.