Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Fix OneBusAway#341 - Move ?android:attr/selectableItemBackground to l…
Browse files Browse the repository at this point in the history
…ayout-v11 folder
  • Loading branch information
barbeau committed Oct 30, 2015
1 parent 6cd2cbc commit 99e00d9
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 3 deletions.
161 changes: 161 additions & 0 deletions onebusaway-android/src/main/res/layout-v11/arrivals_list_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010-2015 Paul Watts (paulcwatts@gmail.com),
University of South Florida (sjbarbeau@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Layout for API Level 11 and higher - uses material ripple on touch -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/stop_info_arrival_list_background"
android:orientation="vertical">
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/arrivals_card_view_eta"
android:layout_gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp"
android:foreground="?android:attr/selectableItemBackground">
<ImageView
android:id="@+id/route_favorite"
android:src="@drawable/ic_toggle_star"
android:contentDescription="@string/stop_info_favorite"
android:maxHeight="10dp"
android:maxWidth="10dp"
android:layout_width="22dp"
android:layout_height="22dp"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_gravity="left|top"
android:paddingLeft="10dp"
android:paddingTop="11dp"/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:stretchColumns="2"
android:shrinkColumns="1"
android:paddingTop="5dp" android:paddingBottom="5dp">
<TableRow
android:gravity="center_vertical">
<TextView
android:layout_column="0"
android:id="@+id/route"
android:text="5"
android:layout_width="80sp"
android:gravity="center"
style="@style/StopInfoRoute">
</TextView>
<LinearLayout
android:orientation="vertical"
android:layout_column="1"
android:gravity="left">
<TextView
android:id="@+id/reminder"
android:drawableLeft="@drawable/ic_drawer_alarm"
android:contentDescription="@string/trip_info_reminder_content_description"
android:drawablePadding="5dp"
android:visibility="gone"
style="@style/StopInfoDestination"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
</TextView>
<TextView
android:id="@+id/destination"
style="@style/StopInfoDestination"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="North to Univerity Area TC"
android:ellipsize="end"
android:singleLine="true">
</TextView>
<include
android:id="@+id/status"
layout="@layout/arrivals_list_tv_template_style_a_status_small"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/time"
style="@style/StopInfoTime"
android:text="11:46 AM"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/eta_and_min"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="2"
android:layout_marginLeft="@dimen/arrival_header_text_pad_left"
android:layout_marginRight="5dp"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:gravity="right"
android:orientation="horizontal">
<TextView
android:id="@+id/eta"
style="@style/StopInfoEta"
android:text="12"
android:maxLines="1"
android:gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/eta_min"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="min"
android:ellipsize="end"
android:singleLine="true"
android:textIsSelectable="false"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/eta"
android:layout_alignBaseline="@id/eta"
android:gravity="bottom"/>
<include
android:id="@+id/eta_realtime_indicator"
layout="@layout/realtime_indicator"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_toRightOf="@id/eta_min"
android:layout_marginTop="22dp"
android:layout_marginLeft="1dp"/>
</RelativeLayout>
</TableRow>
</TableLayout>
<ImageView
android:id="@+id/more_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_navigation_more_horiz"
android:maxHeight="25dp"
android:maxWidth="25dp"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:layout_gravity="right|top"
android:paddingTop="4dp"
android:paddingRight="9dp"/>
</android.support.v7.widget.CardView>
</LinearLayout>
7 changes: 4 additions & 3 deletions onebusaway-android/src/main/res/layout/arrivals_list_item.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 Paul Watts (paulcwatts@gmail.com)
<!-- Copyright (C) 2010-2015 Paul Watts (paulcwatts@gmail.com),
University of South Florida (sjbarbeau@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Legacy layout for lower than API Level 11 - doesn't use material ripple on touch -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -26,8 +28,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="4dp"
android:foreground="?android:attr/selectableItemBackground">
card_view:cardCornerRadius="4dp">
<ImageView
android:id="@+id/route_favorite"
android:src="@drawable/ic_toggle_star"
Expand Down

0 comments on commit 99e00d9

Please sign in to comment.