ADD week 5
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/buttonPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fillViewport="true"
|
||||
android:scrollIndicators="bottom|top"
|
||||
style="?attr/buttonBarStyle">
|
||||
<androidx.appcompat.widget.ButtonBarLayout
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="locale">
|
||||
<Button
|
||||
android:id="@android:id/button3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNeutralButtonStyle"/>
|
||||
<android.widget.Space
|
||||
android:id="@+id/spacer"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<Button
|
||||
android:id="@android:id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNegativeButtonStyle"/>
|
||||
<Button
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarPositiveButtonStyle"/>
|
||||
</androidx.appcompat.widget.ButtonBarLayout>
|
||||
</ScrollView>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.internal.NavigationMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||
android:focusable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:minHeight="?attr/listPreferredItemHeightSmall"
|
||||
android:defaultFocusHighlightEnabled="false"/>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/buttonPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fillViewport="true"
|
||||
android:scrollIndicators="bottom|top"
|
||||
style="?attr/buttonBarStyle">
|
||||
<androidx.appcompat.widget.ButtonBarLayout
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="?attr/dialogPreferredPadding"
|
||||
android:paddingTop="@dimen/m3_alert_dialog_action_top_padding"
|
||||
android:paddingRight="?attr/dialogPreferredPadding"
|
||||
android:paddingBottom="@dimen/m3_alert_dialog_action_bottom_padding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="locale">
|
||||
<Button
|
||||
android:id="@android:id/button3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNeutralButtonStyle"/>
|
||||
<android.widget.Space
|
||||
android:id="@+id/spacer"
|
||||
android:visibility="?attr/materialAlertDialogButtonSpacerVisibility"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<Button
|
||||
android:id="@android:id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNegativeButtonStyle"/>
|
||||
<Button
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarPositiveButtonStyle"/>
|
||||
</androidx.appcompat.widget.ButtonBarLayout>
|
||||
</ScrollView>
|
@ -0,0 +1,75 @@
|
||||
<?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"
|
||||
android:paddingBottom="2dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:accessibilityPaneTitle="@string/material_timepicker_select_time">
|
||||
<TextView
|
||||
android:id="@+id/header_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/material_timepicker_select_time"
|
||||
android:importantForAccessibility="no"
|
||||
android:layout_marginStart="24dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="?attr/materialTimePickerTitleStyle"/>
|
||||
<com.google.android.material.timepicker.TimePickerView
|
||||
android:id="@+id/material_timepicker_view"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="@dimen/material_clock_face_margin_top"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginBottom="@dimen/material_clock_face_margin_bottom"
|
||||
app:layout_constraintBottom_toTopOf="@+id/material_timepicker_mode_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<ViewStub
|
||||
android:id="@+id/material_textinput_timepicker"
|
||||
android:layout="@layout/material_textinput_timepicker"
|
||||
android:inflatedId="@+id/material_textinput_timepicker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="44dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_marginBottom="@dimen/material_clock_face_margin_bottom"
|
||||
app:layout_constraintBottom_toTopOf="@+id/material_timepicker_mode_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/material_timepicker_mode_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
style="?attr/imageButtonStyle"/>
|
||||
<Button
|
||||
android:id="@+id/material_timepicker_cancel_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:minWidth="72dp"
|
||||
android:text="@string/mtrl_timepicker_cancel"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/material_timepicker_ok_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/material_timepicker_mode_button"
|
||||
style="?attr/borderlessButtonStyle"/>
|
||||
<Button
|
||||
android:id="@+id/material_timepicker_ok_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:minWidth="64dp"
|
||||
android:text="@string/mtrl_timepicker_confirm"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/material_timepicker_mode_button"
|
||||
style="?attr/borderlessButtonStyle"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/buttonPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fillViewport="true"
|
||||
android:scrollIndicators="bottom|top"
|
||||
style="?attr/buttonBarStyle">
|
||||
<androidx.appcompat.widget.ButtonBarLayout
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layoutDirection="locale"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="2dp">
|
||||
<Button
|
||||
android:id="@android:id/button3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNeutralButtonStyle"/>
|
||||
<android.widget.Space
|
||||
android:id="@+id/spacer"
|
||||
android:visibility="?attr/materialAlertDialogButtonSpacerVisibility"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
<Button
|
||||
android:id="@android:id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarNegativeButtonStyle"/>
|
||||
<Button
|
||||
android:id="@android:id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/buttonBarPositiveButtonStyle"/>
|
||||
</androidx.appcompat.widget.ButtonBarLayout>
|
||||
</ScrollView>
|
94
02-Easy5/E5/resources/res/layout-v22/mtrl_search_view.xml
Normal file
94
02-Easy5/E5/resources/res/layout-v22/mtrl_search_view.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<View
|
||||
android:id="@+id/open_search_view_scrim"
|
||||
android:background="?attr/scrimBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"/>
|
||||
<com.google.android.material.internal.ClippableRoundedCornerLayout
|
||||
android:id="@+id/open_search_view_root"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/open_search_view_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<View
|
||||
android:id="@+id/open_search_view_status_bar_spacer"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/open_search_view_header_container"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/open_search_view_toolbar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:layout_gravity="end"
|
||||
android:id="@+id/open_search_view_dummy_toolbar"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:navigationIcon="@null"
|
||||
style="?attr/materialSearchViewToolbarStyle"/>
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/open_search_view_toolbar"
|
||||
android:clipChildren="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:navigationContentDescription="@string/searchview_navigation_content_description"
|
||||
style="?attr/materialSearchViewToolbarStyle">
|
||||
<LinearLayout
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/materialSearchViewToolbarHeight">
|
||||
<TextView
|
||||
android:id="@+id/open_search_view_search_prefix"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?attr/materialSearchViewPrefixStyle"/>
|
||||
<EditText
|
||||
android:id="@+id/open_search_view_edit_text"
|
||||
android:background="@null"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:imeOptions="flagNoExtractUi|actionSearch"
|
||||
android:textDirection="firstStrong"
|
||||
android:importantForAutofill="no"/>
|
||||
<ImageButton
|
||||
android:id="@+id/open_search_view_clear_button"
|
||||
android:background="?attr/actionBarItemBackground"
|
||||
android:padding="16dp"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/searchview_clear_text_content_description"
|
||||
app:srcCompat="@drawable/ic_clear_black_24"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/open_search_view_divider"
|
||||
android:background="?attr/colorOutline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/m3_searchview_divider_size"/>
|
||||
<com.google.android.material.internal.TouchObserverFrameLayout
|
||||
android:id="@+id/open_search_view_content_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.internal.ClippableRoundedCornerLayout>
|
||||
</merge>
|
Reference in New Issue
Block a user