Skip to content
Closed
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
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.example.devlibs
package com.example.devlibs.ui

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.devlibs.R

class MainActivity : AppCompatActivity() {

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/example/devlibs/view/CustomView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CustomView (context: Context, attrs: AttributeSet?): LinearLayout(context,
val backGroundColor = typedArray.getColor(R.styleable.CustomView_background_color, Color.BLACK)
val textView = LayoutInflater.from(context).inflate(R.layout.custom_view, this, false) as TextView
textView.text = "Welcome to Dev Libs!" +
"Fill in the blanks to create a funny story about you!\""
" Fill in the blanks to create a funny story about you!\""
textView.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
textView.textSize = textSize
textView.layoutParams = textLayoutParams
Expand Down
41 changes: 38 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
android:background="@color/black"
tools:context=".ui.MainActivity">

<com.example.devlibs.view.CustomView
android:id="@+id/custom_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_margin="16dp"
android:text="Hello World!"
app:background_color="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -25,5 +26,39 @@
app:text_color="@color/blue">
</com.example.devlibs.view.CustomView>

<TextView
android:id="@+id/login"
android:textAlignment="center"
android:text="LOGIN"
android:textSize="24sp"
android:layout_margin="16dp"
android:textColor="@color/blue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/password"/>

<EditText
android:id="@+id/username"
android:textColor="@color/blue"
android:textColorHint="@color/grey"
android:layout_margin="16dp"
android:hint="Username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/password"/>

<EditText
android:id="@+id/password"
android:textColor="@color/blue"
android:textColorHint="@color/grey"
android:hint="Password"
android:layout_margin="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>


</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/insert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

</view>

<Button
android:background="@color/blue"
android:id="@+id/button_submit"
android:padding="8dp"
android:layout_margin="16dp"
Expand Down