-
37main/AndroidManifest.xml
-
31main/java/com/example/garagedoor/FirstFragment.kt
-
18main/java/com/example/garagedoor/GarageOpenActivity.kt
-
18main/java/com/example/garagedoor/GarageViewActivity.kt
-
24main/java/com/example/garagedoor/MainActivity.kt
-
31main/java/com/example/garagedoor/SecondFragment.kt
-
30main/res/drawable-v24/ic_launcher_foreground.xml
-
BINmain/res/drawable/garageicon.jpg
-
BINmain/res/drawable/garageiconcircle.png
-
170main/res/drawable/ic_launcher_background.xml
-
16main/res/layout/activity_garage_open.xml
-
16main/res/layout/activity_garage_view.xml
-
78main/res/layout/activity_main.xml
-
28main/res/layout/fragment_first.xml
-
27main/res/layout/fragment_second.xml
-
5main/res/mipmap-anydpi-v26/ic_launcher.xml
-
5main/res/mipmap-anydpi-v26/ic_launcher_round.xml
-
BINmain/res/mipmap-hdpi/ic_launcher.png
-
BINmain/res/mipmap-hdpi/ic_launcher_round.png
-
BINmain/res/mipmap-mdpi/ic_launcher.png
-
BINmain/res/mipmap-mdpi/ic_launcher_round.png
-
BINmain/res/mipmap-xhdpi/ic_launcher.png
-
BINmain/res/mipmap-xhdpi/ic_launcher_round.png
-
BINmain/res/mipmap-xxhdpi/ic_launcher.png
-
BINmain/res/mipmap-xxhdpi/ic_launcher_round.png
-
BINmain/res/mipmap-xxxhdpi/ic_launcher.png
-
BINmain/res/mipmap-xxxhdpi/ic_launcher_round.png
-
28main/res/navigation/nav_graph.xml
-
6main/res/values/colors.xml
-
3main/res/values/dimens.xml
-
16main/res/values/strings.xml
-
20main/res/values/styles.xml
@ -0,0 +1,37 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
|||
package="com.example.garagedoor"> |
|||
|
|||
<uses-permission android:name="android.permission.INTERNET" /> |
|||
|
|||
<application |
|||
android:allowBackup="true" |
|||
android:icon="@mipmap/ic_launcher" |
|||
android:label="@string/app_name" |
|||
android:roundIcon="@mipmap/ic_launcher_round" |
|||
android:supportsRtl="true" |
|||
android:theme="@style/AppTheme" |
|||
android:usesCleartextTraffic="true"> |
|||
<activity android:name=".MainActivity"> |
|||
<intent-filter> |
|||
<action android:name="android.intent.action.MAIN" /> |
|||
|
|||
<category android:name="android.intent.category.LAUNCHER" /> |
|||
</intent-filter> |
|||
</activity> |
|||
<activity |
|||
android:name=".GarageViewActivity" |
|||
android:label="@string/title_activity_garage_view" |
|||
android:theme="@style/AppTheme.NoActionBar"></activity> |
|||
<activity |
|||
android:name=".GarageOpenActivity" |
|||
android:parentActivityName=".MainActivity"> |
|||
|
|||
<!-- The meta-data tag is required if you support API level 15 and lower --> |
|||
<meta-data |
|||
android:name="android.support.PARENT_ACTIVITY" |
|||
android:value=".MainActivity" /> |
|||
</activity> |
|||
</application> |
|||
|
|||
</manifest> |
|||
@ -0,0 +1,31 @@ |
|||
package com.example.garagedoor |
|||
|
|||
import android.os.Bundle |
|||
import androidx.fragment.app.Fragment |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
import android.widget.Button |
|||
import androidx.navigation.fragment.findNavController |
|||
|
|||
/** |
|||
* A simple [Fragment] subclass as the default destination in the navigation. |
|||
*/ |
|||
class FirstFragment : Fragment() { |
|||
|
|||
override fun onCreateView( |
|||
inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle? |
|||
): View? { |
|||
// Inflate the layout for this fragment |
|||
return inflater.inflate(R.layout.fragment_first, container, false) |
|||
} |
|||
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|||
super.onViewCreated(view, savedInstanceState) |
|||
|
|||
view.findViewById<Button>(R.id.button_first).setOnClickListener { |
|||
findNavController().navigate(R.id.action_FirstFragment_to_SecondFragment) |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.example.garagedoor |
|||
|
|||
import androidx.appcompat.app.AppCompatActivity |
|||
import android.os.Bundle |
|||
import android.webkit.WebView |
|||
|
|||
class GarageOpenActivity : AppCompatActivity() { |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_garage_open) |
|||
|
|||
val myWebView = WebView(this) |
|||
setContentView(myWebView) |
|||
myWebView.loadUrl("http://70.123.32.254:1234/login") |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
package com.example.garagedoor |
|||
|
|||
import androidx.appcompat.app.AppCompatActivity |
|||
import android.os.Bundle |
|||
import android.webkit.WebView |
|||
|
|||
class GarageViewActivity : AppCompatActivity() { |
|||
|
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_garage_view) |
|||
|
|||
val myWebView = WebView(this) |
|||
setContentView(myWebView) |
|||
myWebView.loadUrl("http://70.123.32.254:1234/sensor") |
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.example.garagedoor |
|||
|
|||
import android.content.Intent |
|||
import androidx.appcompat.app.AppCompatActivity |
|||
import android.os.Bundle |
|||
import android.view.View |
|||
|
|||
class MainActivity : AppCompatActivity() { |
|||
override fun onCreate(savedInstanceState: Bundle?) { |
|||
super.onCreate(savedInstanceState) |
|||
setContentView(R.layout.activity_main) |
|||
} |
|||
|
|||
fun openGarage(view: View) { |
|||
val intent = Intent(this, GarageOpenActivity::class.java).apply { |
|||
} |
|||
startActivity(intent) |
|||
} |
|||
fun viewStatus(view: View) { |
|||
val intent = Intent(this, GarageViewActivity::class.java).apply { |
|||
} |
|||
startActivity(intent) |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.example.garagedoor |
|||
|
|||
import android.os.Bundle |
|||
import androidx.fragment.app.Fragment |
|||
import android.view.LayoutInflater |
|||
import android.view.View |
|||
import android.view.ViewGroup |
|||
import android.widget.Button |
|||
import androidx.navigation.fragment.findNavController |
|||
|
|||
/** |
|||
* A simple [Fragment] subclass as the second destination in the navigation. |
|||
*/ |
|||
class SecondFragment : Fragment() { |
|||
|
|||
override fun onCreateView( |
|||
inflater: LayoutInflater, container: ViewGroup?, |
|||
savedInstanceState: Bundle? |
|||
): View? { |
|||
// Inflate the layout for this fragment |
|||
return inflater.inflate(R.layout.fragment_second, container, false) |
|||
} |
|||
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
|||
super.onViewCreated(view, savedInstanceState) |
|||
|
|||
view.findViewById<Button>(R.id.button_second).setOnClickListener { |
|||
findNavController().navigate(R.id.action_SecondFragment_to_FirstFragment) |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:aapt="http://schemas.android.com/aapt" |
|||
android:width="108dp" |
|||
android:height="108dp" |
|||
android:viewportWidth="108" |
|||
android:viewportHeight="108"> |
|||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> |
|||
<aapt:attr name="android:fillColor"> |
|||
<gradient |
|||
android:endX="85.84757" |
|||
android:endY="92.4963" |
|||
android:startX="42.9492" |
|||
android:startY="49.59793" |
|||
android:type="linear"> |
|||
<item |
|||
android:color="#44000000" |
|||
android:offset="0.0" /> |
|||
<item |
|||
android:color="#00000000" |
|||
android:offset="1.0" /> |
|||
</gradient> |
|||
</aapt:attr> |
|||
</path> |
|||
<path |
|||
android:fillColor="#FFFFFF" |
|||
android:fillType="nonZero" |
|||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" |
|||
android:strokeWidth="1" |
|||
android:strokeColor="#00000000" /> |
|||
</vector> |
|||
|
After Width: 623 | Height: 623 | Size: 46 KiB |
|
After Width: 466 | Height: 488 | Size: 46 KiB |
@ -0,0 +1,170 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:width="108dp" |
|||
android:height="108dp" |
|||
android:viewportWidth="108" |
|||
android:viewportHeight="108"> |
|||
<path |
|||
android:fillColor="#3DDC84" |
|||
android:pathData="M0,0h108v108h-108z" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M9,0L9,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,0L19,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M29,0L29,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M39,0L39,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M49,0L49,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M59,0L59,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M69,0L69,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M79,0L79,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M89,0L89,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M99,0L99,108" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,9L108,9" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,19L108,19" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,29L108,29" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,39L108,39" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,49L108,49" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,59L108,59" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,69L108,69" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,79L108,79" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,89L108,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M0,99L108,99" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,29L89,29" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,39L89,39" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,49L89,49" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,59L89,59" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,69L89,69" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M19,79L89,79" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M29,19L29,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M39,19L39,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M49,19L49,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M59,19L59,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M69,19L69,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
<path |
|||
android:fillColor="#00000000" |
|||
android:pathData="M79,19L79,89" |
|||
android:strokeWidth="0.8" |
|||
android:strokeColor="#33FFFFFF" /> |
|||
</vector> |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".GarageOpenActivity"> |
|||
|
|||
<WebView |
|||
android:layout_width="379dp" |
|||
android:layout_height="699dp" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".GarageOpenActivity"> |
|||
|
|||
<WebView |
|||
android:layout_width="379dp" |
|||
android:layout_height="699dp" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
@ -0,0 +1,78 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".MainActivity"> |
|||
|
|||
<TextView |
|||
android:id="@+id/textView3" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:contentDescription="@string/button_send" |
|||
android:text="@string/text_below" |
|||
app:layout_constraintBottom_toTopOf="@+id/button" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintHorizontal_bias="0.497" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/imageButton" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/textView" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginTop="16dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:text="@string/text_above" |
|||
app:layout_constraintBottom_toTopOf="@+id/imageButton" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<ImageButton |
|||
android:id="@+id/imageButton" |
|||
android:layout_width="173dp" |
|||
android:layout_height="153dp" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:background="@null" |
|||
android:contentDescription="@string/button_send" |
|||
android:onClick="openGarage" |
|||
android:scaleType="fitStart" |
|||
app:layout_constraintBottom_toTopOf="@+id/textView3" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/textView" |
|||
app:layout_constraintVertical_bias="0.183" |
|||
app:srcCompat="@drawable/garageiconcircle" /> |
|||
|
|||
<Button |
|||
android:id="@+id/button" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="16dp" |
|||
android:layout_marginLeft="16dp" |
|||
android:layout_marginEnd="16dp" |
|||
android:layout_marginRight="16dp" |
|||
android:layout_marginBottom="16dp" |
|||
android:onClick="viewStatus" |
|||
android:text="@string/button_send2" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintHorizontal_bias="0.498" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@+id/textView3" |
|||
app:layout_constraintVertical_bias="0.136" /> |
|||
|
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".FirstFragment"> |
|||
|
|||
<TextView |
|||
android:id="@+id/textview_first" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="@string/hello_first_fragment" |
|||
app:layout_constraintBottom_toTopOf="@id/button_first" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<Button |
|||
android:id="@+id/button_first" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="@string/next" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@id/textview_first" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
@ -0,0 +1,27 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
tools:context=".SecondFragment"> |
|||
|
|||
<TextView |
|||
android:id="@+id/textview_second" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
app:layout_constraintBottom_toTopOf="@id/button_second" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toTopOf="parent" /> |
|||
|
|||
<Button |
|||
android:id="@+id/button_second" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="@string/previous" |
|||
app:layout_constraintBottom_toBottomOf="parent" |
|||
app:layout_constraintEnd_toEndOf="parent" |
|||
app:layout_constraintStart_toStartOf="parent" |
|||
app:layout_constraintTop_toBottomOf="@id/textview_second" /> |
|||
</androidx.constraintlayout.widget.ConstraintLayout> |
|||
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
<background android:drawable="@drawable/ic_launcher_background" /> |
|||
<foreground android:drawable="@drawable/ic_launcher_foreground" /> |
|||
</adaptive-icon> |
|||
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
<background android:drawable="@drawable/ic_launcher_background" /> |
|||
<foreground android:drawable="@drawable/ic_launcher_foreground" /> |
|||
</adaptive-icon> |
|||
|
After Width: 72 | Height: 72 | Size: 3.5 KiB |
|
After Width: 72 | Height: 72 | Size: 5.2 KiB |
|
After Width: 48 | Height: 48 | Size: 2.6 KiB |
|
After Width: 48 | Height: 48 | Size: 3.3 KiB |
|
After Width: 96 | Height: 96 | Size: 4.8 KiB |
|
After Width: 96 | Height: 96 | Size: 7.3 KiB |
|
After Width: 144 | Height: 144 | Size: 7.7 KiB |
|
After Width: 144 | Height: 144 | Size: 12 KiB |
|
After Width: 192 | Height: 192 | Size: 10 KiB |
|
After Width: 192 | Height: 192 | Size: 16 KiB |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<navigation xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:id="@+id/nav_graph" |
|||
app:startDestination="@id/FirstFragment"> |
|||
|
|||
<fragment |
|||
android:id="@+id/FirstFragment" |
|||
android:name="com.example.garagedoor.FirstFragment" |
|||
android:label="@string/first_fragment_label" |
|||
tools:layout="@layout/fragment_first"> |
|||
|
|||
<action |
|||
android:id="@+id/action_FirstFragment_to_SecondFragment" |
|||
app:destination="@id/SecondFragment" /> |
|||
</fragment> |
|||
<fragment |
|||
android:id="@+id/SecondFragment" |
|||
android:name="com.example.garagedoor.SecondFragment" |
|||
android:label="@string/second_fragment_label" |
|||
tools:layout="@layout/fragment_second"> |
|||
|
|||
<action |
|||
android:id="@+id/action_SecondFragment_to_FirstFragment" |
|||
app:destination="@id/FirstFragment" /> |
|||
</fragment> |
|||
</navigation> |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<resources> |
|||
<color name="colorPrimary">#6200EE</color> |
|||
<color name="colorPrimaryDark">#3700B3</color> |
|||
<color name="colorAccent">#03DAC5</color> |
|||
</resources> |
|||
@ -0,0 +1,3 @@ |
|||
<resources> |
|||
<dimen name="fab_margin">16dp</dimen> |
|||
</resources> |
|||
@ -0,0 +1,16 @@ |
|||
<resources> |
|||
<string name="app_name">Garage Door</string> |
|||
<string name="button_send">Open</string> |
|||
<string name="button_send2">View</string> |
|||
<string name="text_above">Click to open or close garage.</string> |
|||
<string name="text_below">Click to view garage status.</string> |
|||
<string name="title_activity_garage_view">GarageViewActivity</string> |
|||
<!-- Strings used for fragments for navigation --> |
|||
<string name="first_fragment_label">First Fragment</string> |
|||
<string name="second_fragment_label">Second Fragment</string> |
|||
<string name="next">Next</string> |
|||
<string name="previous">Previous</string> |
|||
|
|||
<string name="hello_first_fragment">Hello first fragment</string> |
|||
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string> |
|||
</resources> |
|||
@ -0,0 +1,20 @@ |
|||
<resources> |
|||
|
|||
<!-- Base application theme. --> |
|||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> |
|||
<!-- Customize your theme here. --> |
|||
<item name="colorPrimary">@color/colorPrimary</item> |
|||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
|||
<item name="colorAccent">@color/colorAccent</item> |
|||
</style> |
|||
|
|||
<style name="AppTheme.NoActionBar"> |
|||
<item name="windowActionBar">false</item> |
|||
<item name="windowNoTitle">true</item> |
|||
</style> |
|||
|
|||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> |
|||
|
|||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> |
|||
|
|||
</resources> |
|||