Changeset View
Changeset View
Standalone View
Standalone View
res/layout/fragment_main_screen.xml
- This file was added.
<?xml version="1.0" encoding="utf-8"?> | |||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
tools:context=".fragments.MainScreenFragment"> | |||||
<ImageButton | |||||
android:id="@+id/QRButton" | |||||
style="?android:attr/borderlessButtonStyle" | |||||
android:layout_width="30dip" | |||||
android:layout_height="30dip" | |||||
android:layout_alignBottom="@+id/searchButton" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_alignParentStart="true" | |||||
android:layout_marginLeft="16dp" | |||||
android:layout_marginStart="16dp" | |||||
android:background="@drawable/qrcode_button_custom" | |||||
android:contentDescription="@string/qrcode" | |||||
android:onClick="onQRButtonClick" /> | |||||
<EditText | |||||
android:id="@+id/busStopSearchByIDEditText" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginEnd="5dp" | |||||
android:layout_marginLeft="5dip" | |||||
android:layout_marginRight="5dip" | |||||
android:layout_toEndOf="@+id/QRButton" | |||||
android:layout_toLeftOf="@+id/searchButton" | |||||
android:layout_toRightOf="@+id/QRButton" | |||||
android:layout_toStartOf="@+id/searchButton" | |||||
android:ems="10" | |||||
android:hint="@string/insert_bus_stop_number" | |||||
android:imeOptions="actionSearch" | |||||
android:inputType="number" | |||||
android:selectAllOnFocus="true" | |||||
android:singleLine="true" | |||||
> | |||||
<requestFocus /> | |||||
</EditText> | |||||
<!--android:layout_alignParentLeft="true" | |||||
android:layout_alignParentStart="true"--> | |||||
<EditText | |||||
android:id="@+id/busStopSearchByNameEditText" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginEnd="5dp" | |||||
android:layout_marginLeft="5dip" | |||||
android:layout_marginRight="5dip" | |||||
android:layout_toEndOf="@+id/QRButton" | |||||
android:layout_toLeftOf="@+id/searchButton" | |||||
android:layout_toRightOf="@+id/QRButton" | |||||
android:layout_toStartOf="@+id/searchButton" | |||||
android:ems="10" | |||||
android:hint="@string/insert_bus_stop_name" | |||||
android:imeOptions="actionSearch" | |||||
android:singleLine="true" | |||||
android:visibility="gone"> | |||||
<requestFocus /> | |||||
</EditText> | |||||
<ImageButton | |||||
android:id="@+id/searchButton" | |||||
style="?android:attr/borderlessButtonStyle" | |||||
android:layout_width="40dip" | |||||
android:layout_height="40dip" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_alignTop="@+id/busStopSearchByIDEditText" | |||||
android:layout_marginEnd="16dp" | |||||
android:layout_marginRight="16dp" | |||||
android:background="@drawable/search_button_custom" | |||||
android:contentDescription="@string/search" | |||||
android:onClick="onSearchClick" /> | |||||
<ProgressBar | |||||
android:id="@+id/progressBar" | |||||
style="?android:attr/progressBarStyleHorizontal" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentLeft="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_alignParentStart="true" | |||||
android:layout_below="@+id/searchButton" | |||||
android:layout_marginEnd="16dp" | |||||
android:layout_marginLeft="16dip" | |||||
android:layout_marginRight="16dp" | |||||
android:layout_marginStart="16dip" | |||||
android:indeterminateOnly="true" | |||||
android:visibility="gone" /> | |||||
<TextView | |||||
android:id="@+id/howDoesItWorkTextView" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_marginEnd="16dp" | |||||
android:layout_marginLeft="16dip" | |||||
android:layout_marginRight="16dp" | |||||
android:layout_marginStart="16dip" | |||||
android:layout_toLeftOf="@+id/hideHintButton" | |||||
android:layout_toStartOf="@+id/hideHintButton" | |||||
android:text="@string/howDoesItWork" | |||||
android:textAppearance="?android:attr/textAppearanceSmall" | |||||
android:textColor="@color/blue_500" | |||||
android:visibility="gone" android:layout_below="@+id/searchButton"/> | |||||
<Button | |||||
android:id="@+id/hideHintButton" | |||||
style="?android:attr/buttonStyleSmall" | |||||
android:layout_width="85dip" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignBottom="@+id/howDoesItWorkTextView" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_marginEnd="16dp" | |||||
android:layout_marginRight="16dp" | |||||
android:background="@drawable/route_background_bus" | |||||
android:onClick="onHideHint" | |||||
android:text="@string/hint_button" | |||||
android:textColor="@color/grey_100" | |||||
android:textSize="19sp" | |||||
android:visibility="gone" /> | |||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |||||
android:id="@+id/listRefreshLayout" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_below="@+id/howDoesItWorkTextView" | |||||
android:animateLayoutChanges="true" | |||||
android:visibility="gone"> | |||||
<FrameLayout | |||||
android:layout_width="match_parent" | |||||
android:id="@+id/resultFrame" | |||||
android:layout_height="fill_parent" | |||||
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"/> | |||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | |||||
<com.google.android.material.floatingactionbutton.FloatingActionButton | |||||
android:id="@+id/floatingActionButton" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_alignParentBottom="true" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_gravity="bottom|end" | |||||
android:layout_margin="16dp" | |||||
android:onClick="onToggleKeyboardLayout" | |||||
android:src="@drawable/alphabetical" | |||||
fabSize="normal" | |||||
backgroundTint="@color/teal_500" | |||||
rippleColor="@color/teal_300" | |||||
elevation="15dp" | |||||
/> | |||||
</RelativeLayout> | |||||
No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register