Changeset View
Changeset View
Standalone View
Standalone View
res/layout/activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:paddingTop="@dimen/activity_vertical_margin" | |||||
android:id="@+id/mainActivityLayout" | android:id="@+id/mainActivityLayout" | ||||
android:orientation="vertical" | |||||
tools:context="it.reyboz.bustorino.ActivityMain"> | tools:context="it.reyboz.bustorino.ActivityMain"> | ||||
<androidx.appcompat.widget.Toolbar | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:background="?attr/colorPrimary" | |||||
android:elevation="4dp" | |||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | |||||
android:id="@+id/that_toolbar" | |||||
android:fitsSystemWindows="true" | |||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:paddingTop="@dimen/activity_vertical_margin"> | |||||
<ImageButton | <ImageButton | ||||
android:id="@+id/QRButton" | android:id="@+id/QRButton" | ||||
style="?android:attr/borderlessButtonStyle" | |||||
android:layout_width="30dip" | android:layout_width="30dip" | ||||
android:layout_height="30dip" | android:layout_height="30dip" | ||||
android:layout_alignBottom="@+id/searchButton" | android:layout_alignBottom="@+id/searchButton" | ||||
android:layout_alignParentLeft="true" | android:layout_alignParentLeft="true" | ||||
android:layout_alignParentStart="true" | android:layout_alignParentStart="true" | ||||
android:layout_marginLeft="16dp" | android:layout_marginLeft="16dp" | ||||
android:layout_marginStart="16dp" | android:layout_marginStart="16dp" | ||||
android:background="@drawable/qrcode_button_custom" | android:background="@drawable/qrcode_button_custom" | ||||
android:contentDescription="@string/qrcode" | android:contentDescription="@string/qrcode" | ||||
android:onClick="onQRButtonClick"/> | android:onClick="onQRButtonClick" /> | ||||
<EditText | <EditText | ||||
android:id="@+id/busStopSearchByIDEditText" | android:id="@+id/busStopSearchByIDEditText" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_marginEnd="5dp" | android:layout_marginEnd="5dp" | ||||
android:layout_marginLeft="5dip" | android:layout_marginLeft="5dip" | ||||
android:layout_marginRight="5dip" | android:layout_marginRight="5dip" | ||||
android:layout_toEndOf="@+id/QRButton" | android:layout_toEndOf="@+id/QRButton" | ||||
android:layout_toLeftOf="@+id/searchButton" | android:layout_toLeftOf="@+id/searchButton" | ||||
android:layout_toRightOf="@+id/QRButton" | android:layout_toRightOf="@+id/QRButton" | ||||
android:layout_toStartOf="@+id/searchButton" | android:layout_toStartOf="@+id/searchButton" | ||||
android:ems="10" | android:ems="10" | ||||
android:hint="@string/insert_bus_stop_number" | android:hint="@string/insert_bus_stop_number" | ||||
android:imeOptions="actionSearch" | android:imeOptions="actionSearch" | ||||
android:inputType="number" | android:inputType="number" | ||||
android:selectAllOnFocus="true" | android:selectAllOnFocus="true" | ||||
android:singleLine="true"> | android:singleLine="true" | ||||
> | |||||
<requestFocus /> | <requestFocus /> | ||||
</EditText> | </EditText> | ||||
<!--android:layout_alignParentLeft="true" | <!--android:layout_alignParentLeft="true" | ||||
android:layout_alignParentStart="true"--> | android:layout_alignParentStart="true"--> | ||||
<EditText | <EditText | ||||
android:id="@+id/busStopSearchByNameEditText" | android:id="@+id/busStopSearchByNameEditText" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_marginEnd="5dp" | android:layout_marginEnd="5dp" | ||||
android:layout_marginLeft="5dip" | android:layout_marginLeft="5dip" | ||||
android:layout_marginRight="5dip" | android:layout_marginRight="5dip" | ||||
android:layout_toEndOf="@+id/QRButton" | android:layout_toEndOf="@+id/QRButton" | ||||
android:layout_toLeftOf="@+id/searchButton" | android:layout_toLeftOf="@+id/searchButton" | ||||
android:layout_toRightOf="@+id/QRButton" | android:layout_toRightOf="@+id/QRButton" | ||||
android:layout_toStartOf="@+id/searchButton" | android:layout_toStartOf="@+id/searchButton" | ||||
android:ems="10" | android:ems="10" | ||||
android:hint="@string/insert_bus_stop_name" | android:hint="@string/insert_bus_stop_name" | ||||
android:imeOptions="actionSearch" | android:imeOptions="actionSearch" | ||||
android:singleLine="true" | android:singleLine="true" | ||||
android:visibility="gone"> | android:visibility="gone"> | ||||
<requestFocus /> | <requestFocus /> | ||||
</EditText> | </EditText> | ||||
<ImageButton | <ImageButton | ||||
android:id="@+id/searchButton" | android:id="@+id/searchButton" | ||||
style="?android:attr/borderlessButtonStyle" | |||||
android:layout_width="40dip" | android:layout_width="40dip" | ||||
android:layout_height="40dip" | android:layout_height="40dip" | ||||
android:layout_alignParentRight="true" | |||||
android:layout_alignParentEnd="true" | android:layout_alignParentEnd="true" | ||||
android:layout_alignParentRight="true" | |||||
android:layout_alignTop="@+id/busStopSearchByIDEditText" | android:layout_alignTop="@+id/busStopSearchByIDEditText" | ||||
android:layout_marginEnd="16dp" | android:layout_marginEnd="16dp" | ||||
android:layout_marginRight="16dp" | android:layout_marginRight="16dp" | ||||
android:background="@drawable/search_button_custom" | android:background="@drawable/search_button_custom" | ||||
android:contentDescription="@string/search" | android:contentDescription="@string/search" | ||||
android:onClick="onSearchClick"/> | android:onClick="onSearchClick" /> | ||||
<ProgressBar | <ProgressBar | ||||
android:id="@+id/progressBar" | android:id="@+id/progressBar" | ||||
style="?android:attr/progressBarStyleHorizontal" | style="?android:attr/progressBarStyleHorizontal" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentEnd="true" | android:layout_alignParentEnd="true" | ||||
android:layout_alignParentLeft="true" | android:layout_alignParentLeft="true" | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_alignParentStart="true" | android:layout_alignParentStart="true" | ||||
android:layout_below="@+id/searchButton" | android:layout_below="@+id/searchButton" | ||||
android:layout_marginEnd="16dp" | android:layout_marginEnd="16dp" | ||||
android:layout_marginLeft="16dip" | android:layout_marginLeft="16dip" | ||||
android:layout_marginRight="16dp" | android:layout_marginRight="16dp" | ||||
android:layout_marginStart="16dip" | android:layout_marginStart="16dip" | ||||
android:indeterminateOnly="true" | android:indeterminateOnly="true" | ||||
android:visibility="gone" /> | android:visibility="gone" /> | ||||
<TextView | <TextView | ||||
android:id="@+id/howDoesItWorkTextView" | android:id="@+id/howDoesItWorkTextView" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_below="@id/progressBar" | android:layout_marginBottom="10dp" | ||||
android:paddingTop="10dp" | |||||
android:layout_marginEnd="16dp" | android:layout_marginEnd="16dp" | ||||
android:layout_marginLeft="16dip" | android:layout_marginLeft="16dip" | ||||
android:layout_marginRight="16dp" | android:layout_marginRight="16dp" | ||||
android:layout_marginStart="16dip" | android:layout_marginStart="16dip" | ||||
android:layout_toLeftOf="@+id/hideHintButton" | android:layout_toLeftOf="@+id/hideHintButton" | ||||
android:layout_toStartOf="@+id/hideHintButton" | android:layout_toStartOf="@+id/hideHintButton" | ||||
android:text="@string/howDoesItWork" | android:text="@string/howDoesItWork" | ||||
android:textAppearance="?android:attr/textAppearanceSmall" | android:textAppearance="?android:attr/textAppearanceSmall" | ||||
android:textColor="@color/blue_500" | android:textColor="@color/blue_500" | ||||
android:visibility="gone"/> | android:visibility="gone" android:layout_below="@+id/searchButton"/> | ||||
<Button | <Button | ||||
android:id="@+id/hideHintButton" | android:id="@+id/hideHintButton" | ||||
style="?android:attr/buttonStyleSmall" | style="?android:attr/buttonStyleSmall" | ||||
android:layout_width="85dip" | android:layout_width="85dip" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignBottom="@+id/howDoesItWorkTextView" | android:layout_alignBottom="@+id/howDoesItWorkTextView" | ||||
android:layout_alignParentEnd="true" | android:layout_alignParentEnd="true" | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_marginEnd="16dp" | android:layout_marginEnd="16dp" | ||||
android:layout_marginRight="16dp" | android:layout_marginRight="16dp" | ||||
android:background="@drawable/route_background_bus" | android:background="@drawable/route_background_bus" | ||||
android:onClick="onHideHint" | android:onClick="onHideHint" | ||||
android:text="@string/hint_button" | android:text="@string/hint_button" | ||||
android:textColor="@color/grey_100" | android:textColor="@color/grey_100" | ||||
android:textSize="19sp" | android:textSize="19sp" | ||||
android:visibility="gone" /> | android:visibility="gone" /> | ||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||||
android:id="@+id/listRefreshLayout" | android:id="@+id/listRefreshLayout" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_alignParentEnd="true" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_below="@+id/howDoesItWorkTextView" | android:layout_below="@+id/howDoesItWorkTextView" | ||||
android:animateLayoutChanges="true" | |||||
android:visibility="gone"> | |||||
> | |||||
<FrameLayout | <FrameLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:id="@+id/resultFrame" | android:id="@+id/resultFrame" | ||||
android:layout_height="fill_parent" | android:layout_height="fill_parent" | ||||
android:layout_alignParentLeft="true" android:layout_alignParentStart="true"> | android:layout_alignParentLeft="true" android:layout_alignParentStart="true"/> | ||||
</FrameLayout> | |||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | ||||
<com.google.android.material.floatingactionbutton.FloatingActionButton | <com.google.android.material.floatingactionbutton.FloatingActionButton | ||||
android:id="@+id/floatingActionButton" | android:id="@+id/floatingActionButton" | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:layout_alignParentEnd="true" | android:layout_alignParentEnd="true" | ||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_gravity="bottom|end" | android:layout_gravity="bottom|end" | ||||
android:layout_margin="16dp" | android:layout_margin="16dp" | ||||
android:onClick="onToggleKeyboardLayout" | android:onClick="onToggleKeyboardLayout" | ||||
android:src="@drawable/alphabetical" | android:src="@drawable/alphabetical" | ||||
fabSize="normal" | fabSize="normal" | ||||
backgroundTint="@color/teal_500" | backgroundTint="@color/teal_500" | ||||
rippleColor="@color/teal_300" | rippleColor="@color/teal_300" | ||||
elevation="15dp" | elevation="15dp" | ||||
/> | |||||
/> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | |||||
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