Merge pull request #1537 from GaidamakUA/dashboard_swipe_to_dismiss
Dashboard swipe to dismiss build fix
This commit is contained in:
commit
1d0d05d831
39 changed files with 1190 additions and 28 deletions
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" >
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<Switch
|
||||
android:id="@+id/check_item"
|
||||
|
@ -13,4 +10,4 @@
|
|||
android:focusable="false"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</merge>
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical">
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_item"
|
||||
|
@ -16,4 +13,4 @@
|
|||
android:focusable="false"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
</RelativeLayout>
|
||||
</merge>
|
94
OsmAnd/res/layout/dash_dash_options.xml
Normal file
94
OsmAnd/res/layout/dash_dash_options.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/bg_card"
|
||||
android:layout_marginTop="@dimen/dash_margin"
|
||||
android:layout_marginBottom="@dimen/dash_margin"
|
||||
android:layout_marginLeft="@dimen/dash_margin_h"
|
||||
android:layout_marginRight="@dimen/dash_margin_h"
|
||||
android:orientation="vertical">
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@+id/header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Options"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="20sp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"
|
||||
android:paddingTop="8dp"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
style="@style/DashboardSubHeader"
|
||||
android:text="Remove permanently"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
<include
|
||||
layout="@layout/check_item_rel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
style="@style/DashboardSubHeader"
|
||||
android:text="# of rows"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
<Spinner
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:entries="@array/numbers_from_1_to_10">
|
||||
|
||||
</Spinner>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/list_header_height"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/positive_button"
|
||||
style="@style/DashboardGeneralButton"
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/shared_string_ok"/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/dashboard_divider"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/negative_button"
|
||||
style="@style/DashboardGeneralButton"
|
||||
android:layout_width="0dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="UNDO" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:osmand="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/bg_card"
|
||||
|
|
15
OsmAnd/res/values/spinner_entries_numbers_from_1_to_10.xml
Normal file
15
OsmAnd/res/values/spinner_entries_numbers_from_1_to_10.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="numbers_from_1_to_10">
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
</string-array>
|
||||
</resources>
|
|
@ -11,6 +11,7 @@ import android.support.v4.view.ViewCompat;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import net.osmand.plus.OsmAndAppCustomization;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
@ -49,13 +50,17 @@ public abstract class DashBaseFragment extends Fragment {
|
|||
final public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View childView = initView(inflater, container, savedInstanceState);
|
||||
ViewGroup.LayoutParams layoutParams =
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams layoutParams =
|
||||
new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
|
||||
InterceptorFrameLayout frameLayout = new InterceptorFrameLayout(getActivity());
|
||||
frameLayout.setLayoutParams(layoutParams);
|
||||
frameLayout.addView(childView);
|
||||
|
||||
FrameLayout.LayoutParams childLayoutParams =
|
||||
new FrameLayout.LayoutParams(
|
||||
(ViewGroup.MarginLayoutParams) childView.getLayoutParams());
|
||||
frameLayout.addView(childView, childLayoutParams);
|
||||
|
||||
if (isDismissAllowed()) {
|
||||
SwipeDismissTouchListener listener = new SwipeDismissTouchListener(childView, null,
|
||||
new SwipeDismissTouchListener.DismissCallbacks() {
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.content.Context;
|
|||
import android.os.Build;
|
||||
import android.support.v4.view.MotionEventCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.widget.FrameLayout;
|
||||
|
@ -16,11 +15,9 @@ import net.osmand.plus.widgets.tools.SwipeDismissTouchListener;
|
|||
* Created by GaidamakUA on 8/5/15.
|
||||
*/
|
||||
public class InterceptorFrameLayout extends FrameLayout {
|
||||
private static final String TAG = "InterceptorFrameLayout";
|
||||
private int mTouchSlop;
|
||||
private boolean mIsScrolling;
|
||||
private float mDownX;
|
||||
private boolean mShown;
|
||||
private SwipeDismissTouchListener listener;
|
||||
|
||||
public InterceptorFrameLayout(Context context) {
|
||||
|
@ -52,19 +49,15 @@ public class InterceptorFrameLayout extends FrameLayout {
|
|||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
Log.v(TAG, "onInterceptTouchEvent(" + "ev=" + ev + ")");
|
||||
final int action = MotionEventCompat.getActionMasked(ev);
|
||||
|
||||
// Always handle the case of the touch gesture being complete.
|
||||
if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) {
|
||||
// Release the scroll.
|
||||
mIsScrolling = false;
|
||||
return false; // Do not intercept touch event, let the child handle it
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mShown = false;
|
||||
mDownX = ev.getRawX();
|
||||
listener.onTouch(this, ev);
|
||||
return false;
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.app.ListActivity;
|
|||
import android.app.ListFragment;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.ViewPropertyAnimatorListener;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.VelocityTracker;
|
||||
import android.view.View;
|
||||
|
@ -102,7 +101,6 @@ public class SwipeDismissTouchListener implements View.OnTouchListener {
|
|||
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||
Log.v(TAG, "onTouch(" + "view=" + view + ", motionEvent=" + motionEvent + ")");
|
||||
// offset because the view is translated during swipe
|
||||
motionEvent.offsetLocation(mTranslationX, 0);
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
src/main/AndroidManifest.xml
|
5
eclipse-compile/design/AndroidManifest.xml
Normal file
5
eclipse-compile/design/AndroidManifest.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="android.support.design">
|
||||
<uses-sdk android:minSdkVersion="7"/>
|
||||
<application/>
|
||||
</manifest>
|
|
@ -1 +0,0 @@
|
|||
src/main/res/
|
30
eclipse-compile/design/res/anim/fab_in.xml
Normal file
30
eclipse-compile/design/res/anim/fab_in.xml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<alpha android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0"/>
|
||||
|
||||
<scale android:fromXScale="0.0"
|
||||
android:fromYScale="0.0"
|
||||
android:toXScale="1.0"
|
||||
android:toYScale="1.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"/>
|
||||
|
||||
</set>
|
30
eclipse-compile/design/res/anim/fab_out.xml
Normal file
30
eclipse-compile/design/res/anim/fab_out.xml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<alpha android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0"/>
|
||||
|
||||
<scale android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:toXScale="0.0"
|
||||
android:toYScale="0.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"/>
|
||||
|
||||
</set>
|
20
eclipse-compile/design/res/anim/snackbar_in.xml
Normal file
20
eclipse-compile/design/res/anim/snackbar_in.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromYDelta="100%"
|
||||
android:toYDelta="0"/>
|
20
eclipse-compile/design/res/anim/snackbar_out.xml
Normal file
20
eclipse-compile/design/res/anim/snackbar_out.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<translate xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="100%"/>
|
21
eclipse-compile/design/res/drawable/fab_background.xml
Normal file
21
eclipse-compile/design/res/drawable/fab_background.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
22
eclipse-compile/design/res/drawable/snackbar_background.xml
Normal file
22
eclipse-compile/design/res/drawable/snackbar_background.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/snackbar_background_corner_radius"/>
|
||||
<solid android:color="@color/snackbar_background_color"/>
|
||||
</shape>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<view xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
class="android.support.design.widget.Snackbar$SnackbarLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
style="@style/Widget.Design.Snackbar" />
|
26
eclipse-compile/design/res/layout/design_navigation_item.xml
Normal file
26
eclipse-compile/design/res/layout/design_navigation_item.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<android.support.design.internal.NavigationMenuItemView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/listPreferredItemHeightSmall"
|
||||
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||
android:drawablePadding="@dimen/navigation_icon_padding"
|
||||
android:gravity="center_vertical|start"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/navigation_separator_vertical_padding" />
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"/>
|
||||
|
||||
</FrameLayout>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/listPreferredItemHeightSmall"
|
||||
android:gravity="center_vertical|start"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorSecondary"/>
|
25
eclipse-compile/design/res/layout/design_navigation_menu.xml
Normal file
25
eclipse-compile/design/res/layout/design_navigation_menu.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<android.support.design.internal.NavigationMenuView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/navigation_padding_top_default"
|
||||
android:paddingBottom="@dimen/navigation_padding_bottom"
|
||||
android:clipToPadding="false"
|
||||
android:divider="@null"
|
||||
android:listSelector="?attr/selectableItemBackground"/>
|
23
eclipse-compile/design/res/layout/layout_snackbar.xml
Normal file
23
eclipse-compile/design/res/layout/layout_snackbar.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<view xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
class="android.support.design.widget.Snackbar$SnackbarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
style="@style/Widget.Design.Snackbar" />
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/snackbar_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="@dimen/snackbar_padding_vertical"
|
||||
android:paddingBottom="@dimen/snackbar_padding_vertical"
|
||||
android:paddingLeft="@dimen/snackbar_padding_horizontal"
|
||||
android:paddingRight="@dimen/snackbar_padding_horizontal"
|
||||
android:textAppearance="@style/TextAppearance.Design.Snackbar.Message"
|
||||
android:maxLines="@integer/snackbar_text_max_lines"
|
||||
android:layout_gravity="center_vertical|left|start"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/snackbar_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/snackbar_extra_spacing_horizontal"
|
||||
android:layout_marginStart="@dimen/snackbar_extra_spacing_horizontal"
|
||||
android:layout_gravity="center_vertical|right|end"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingTop="@dimen/snackbar_padding_vertical"
|
||||
android:paddingBottom="@dimen/snackbar_padding_vertical"
|
||||
android:paddingLeft="@dimen/snackbar_padding_horizontal"
|
||||
android:paddingRight="@dimen/snackbar_padding_horizontal"
|
||||
android:visibility="gone"
|
||||
android:textAppearance="@style/TextAppearance.Design.Snackbar.Action"/>
|
||||
|
||||
</merge>
|
21
eclipse-compile/design/res/layout/layout_tab_icon.xml
Normal file
21
eclipse-compile/design/res/layout/layout_tab_icon.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"/>
|
23
eclipse-compile/design/res/layout/layout_tab_text.xml
Normal file
23
eclipse-compile/design/res/layout/layout_tab_text.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"/>
|
25
eclipse-compile/design/res/values-land/styles.xml
Normal file
25
eclipse-compile/design/res/values-land/styles.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
|
||||
<item name="tabGravity">center</item>
|
||||
<item name="tabMode">fixed</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
22
eclipse-compile/design/res/values-sw600dp/config.xml
Normal file
22
eclipse-compile/design/res/values-sw600dp/config.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<integer name="snackbar_text_max_lines">1</integer>
|
||||
|
||||
</resources>
|
29
eclipse-compile/design/res/values-sw600dp/dimens.xml
Normal file
29
eclipse-compile/design/res/values-sw600dp/dimens.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<dimen name="tab_min_width">160dp</dimen>
|
||||
|
||||
<dimen name="snackbar_min_width">320dp</dimen>
|
||||
<dimen name="snackbar_max_width">576dp</dimen>
|
||||
<dimen name="snackbar_padding_vertical_2lines">@dimen/snackbar_padding_vertical</dimen>
|
||||
<dimen name="snackbar_extra_spacing_horizontal">24dp</dimen>
|
||||
<dimen name="snackbar_background_corner_radius">2dp</dimen>
|
||||
<dimen name="snackbar_action_inline_max_width">0dp</dimen>
|
||||
|
||||
</resources>
|
25
eclipse-compile/design/res/values-sw600dp/styles.xml
Normal file
25
eclipse-compile/design/res/values-sw600dp/styles.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
|
||||
<item name="tabGravity">center</item>
|
||||
<item name="tabMode">fixed</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
19
eclipse-compile/design/res/values-v21/dimens.xml
Normal file
19
eclipse-compile/design/res/values-v21/dimens.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
<dimen name="navigation_padding_top_default">24dp</dimen>
|
||||
</resources>
|
260
eclipse-compile/design/res/values/attrs.xml
Normal file
260
eclipse-compile/design/res/values/attrs.xml
Normal file
|
@ -0,0 +1,260 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="FloatingActionButton">
|
||||
<!-- Background for the FloatingActionButton -->
|
||||
<attr name="android:background"/>
|
||||
<attr name="backgroundTint"/>
|
||||
<attr name="backgroundTintMode"/>
|
||||
|
||||
<!-- Ripple color for the FAB. -->
|
||||
<attr name="rippleColor" format="color"/>
|
||||
<!-- Size for the FAB. -->
|
||||
<attr name="fabSize">
|
||||
<enum name="normal" value="0"/>
|
||||
<enum name="mini" value="1"/>
|
||||
</attr>
|
||||
<!-- Elevation value for the FAB -->
|
||||
<attr name="elevation"/>
|
||||
<!-- TranslationZ value for the FAB when pressed-->
|
||||
<attr name="pressedTranslationZ" format="dimension"/>
|
||||
<!-- The width of the border around the FAB. -->
|
||||
<attr name="borderWidth" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ScrimInsetsFrameLayout">
|
||||
<attr name="insetForeground" format="color|reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="NavigationView">
|
||||
<attr name="android:background"/>
|
||||
<attr name="android:fitsSystemWindows"/>
|
||||
<attr name="android:maxWidth"/>
|
||||
<attr name="elevation"/>
|
||||
<!-- The menu resource to inflate and populate items from. -->
|
||||
<attr name="menu" format="reference"/>
|
||||
<attr name="itemIconTint" format="color"/>
|
||||
<attr name="itemTextColor" format="color"/>
|
||||
<attr name="itemBackground" format="reference"/>
|
||||
<!-- Layout resource to inflate as the header -->
|
||||
<attr name="headerLayout" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TabLayout">
|
||||
<attr name="tabIndicatorColor" format="color"/>
|
||||
<attr name="tabIndicatorHeight" format="dimension"/>
|
||||
<attr name="tabContentStart" format="dimension"/>
|
||||
|
||||
<attr name="tabBackground" format="reference"/>
|
||||
|
||||
<attr name="tabMode">
|
||||
<enum name="scrollable" value="0"/>
|
||||
<enum name="fixed" value="1"/>
|
||||
</attr>
|
||||
|
||||
<!-- Standard gravity constant that a child supplies to its parent.
|
||||
Defines how the child view should be positioned, on both the X and Y axes,
|
||||
within its enclosing layout. -->
|
||||
<attr name="tabGravity">
|
||||
<enum name="fill" value="0"/>
|
||||
<enum name="center" value="1"/>
|
||||
</attr>
|
||||
|
||||
<attr name="tabMinWidth" format="dimension"/>
|
||||
<attr name="tabMaxWidth" format="dimension"/>
|
||||
|
||||
<attr name="tabTextAppearance" format="reference"/>
|
||||
<attr name="tabTextColor" format="color"/>
|
||||
<attr name="tabSelectedTextColor" format="color"/>
|
||||
|
||||
<attr name="tabPaddingStart" format="dimension"/>
|
||||
<attr name="tabPaddingTop" format="dimension"/>
|
||||
<attr name="tabPaddingEnd" format="dimension"/>
|
||||
<attr name="tabPaddingBottom" format="dimension"/>
|
||||
<attr name="tabPadding" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CoordinatorLayout">
|
||||
<!-- A reference to an array of integers representing the
|
||||
locations of horizontal keylines in dp from the starting edge.
|
||||
Child views can refer to these keylines for alignment using
|
||||
layout_keyline="index" where index is a 0-based index into
|
||||
this array. -->
|
||||
<attr name="keylines" format="reference"/>
|
||||
<!-- Drawable to display behind the status bar when the view is set to draw behind it. -->
|
||||
<attr name="statusBarBackground" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CoordinatorLayout_LayoutParams">
|
||||
<attr name="android:layout_gravity"/>
|
||||
<!-- The class name of a Behavior class defining special runtime behavior
|
||||
for this child view. -->
|
||||
<attr name="layout_behavior" format="string"/>
|
||||
<!-- The id of an anchor view that this view should position relative to. -->
|
||||
<attr name="layout_anchor" format="reference"/>
|
||||
<!-- The index of a keyline this view should position relative to.
|
||||
android:layout_gravity will affect how the view aligns to the
|
||||
specified keyline. -->
|
||||
<attr name="layout_keyline" format="integer"/>
|
||||
|
||||
<!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
|
||||
within its parent's bounds. -->
|
||||
<attr name="layout_anchorGravity">
|
||||
<!-- Push object to the top of its container, not changing its size. -->
|
||||
<flag name="top" value="0x30"/>
|
||||
<!-- Push object to the bottom of its container, not changing its size. -->
|
||||
<flag name="bottom" value="0x50"/>
|
||||
<!-- Push object to the left of its container, not changing its size. -->
|
||||
<flag name="left" value="0x03"/>
|
||||
<!-- Push object to the right of its container, not changing its size. -->
|
||||
<flag name="right" value="0x05"/>
|
||||
<!-- Place object in the vertical center of its container, not changing its size. -->
|
||||
<flag name="center_vertical" value="0x10"/>
|
||||
<!-- Grow the vertical size of the object if needed so it completely fills its container. -->
|
||||
<flag name="fill_vertical" value="0x70"/>
|
||||
<!-- Place object in the horizontal center of its container, not changing its size. -->
|
||||
<flag name="center_horizontal" value="0x01"/>
|
||||
<!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
|
||||
<flag name="fill_horizontal" value="0x07"/>
|
||||
<!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
|
||||
<flag name="center" value="0x11"/>
|
||||
<!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
|
||||
<flag name="fill" value="0x77"/>
|
||||
<!-- Additional option that can be set to have the top and/or bottom edges of
|
||||
the child clipped to its container's bounds.
|
||||
The clip will be based on the vertical gravity: a top gravity will clip the bottom
|
||||
edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
|
||||
<flag name="clip_vertical" value="0x80"/>
|
||||
<!-- Additional option that can be set to have the left and/or right edges of
|
||||
the child clipped to its container's bounds.
|
||||
The clip will be based on the horizontal gravity: a left gravity will clip the right
|
||||
edge, a right gravity will clip the left edge, and neither will clip both edges. -->
|
||||
<flag name="clip_horizontal" value="0x08"/>
|
||||
<!-- Push object to the beginning of its container, not changing its size. -->
|
||||
<flag name="start" value="0x00800003"/>
|
||||
<!-- Push object to the end of its container, not changing its size. -->
|
||||
<flag name="end" value="0x00800005"/>
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="TextInputLayout">
|
||||
<attr name="hintTextAppearance" format="reference"/>
|
||||
<!-- The hint to display in the floating label -->
|
||||
<attr name="android:hint"/>
|
||||
<!-- Whether the layout is laid out as if an error will be displayed -->
|
||||
<attr name="errorEnabled" format="boolean"/>
|
||||
<!-- TextAppearance of any error message displayed -->
|
||||
<attr name="errorTextAppearance" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="SnackbarLayout">
|
||||
<attr name="android:maxWidth"/>
|
||||
<attr name="elevation"/>
|
||||
<attr name="maxActionInlineWidth" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AppBarLayout">
|
||||
<attr name="elevation" />
|
||||
<attr name="android:background" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AppBarLayout_LayoutParams">
|
||||
<attr name="layout_scrollFlags">
|
||||
<!-- The view will be scroll in direct relation to scroll events. This flag needs to be
|
||||
set for any of the other flags to take effect. If any sibling views
|
||||
before this one do not have this flag, then this value has no effect. -->
|
||||
<flag name="scroll" value="0x1"/>
|
||||
|
||||
<!-- When exiting (scrolling off screen) the view will be scrolled until it is
|
||||
'collapsed'. The collapsed height is defined by the view's minimum height. -->
|
||||
<flag name="exitUntilCollapsed" value="0x2"/>
|
||||
|
||||
<!-- When entering (scrolling on screen) the view will scroll on any downwards
|
||||
scroll event, regardless of whether the scrolling view is also scrolling. This
|
||||
is commonly referred to as the 'quick return' pattern. -->
|
||||
<flag name="enterAlways" value="0x4"/>
|
||||
|
||||
<!-- An additional flag for 'enterAlways' which modifies the returning view to
|
||||
only initially scroll back to it's collapsed height. Once the scrolling view has
|
||||
reached the end of it's scroll range, the remainder of this view will be scrolled
|
||||
into view. -->
|
||||
<flag name="enterAlwaysCollapsed" value="0x8"/>
|
||||
</attr>
|
||||
|
||||
<!-- An interpolator to use when scrolling this View. Only takes effect when View
|
||||
is scrollable. -->
|
||||
<attr name="layout_scrollInterpolator" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="ScrollingViewBehavior_Params">
|
||||
<!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
|
||||
<attr name="behavior_overlapTop" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CollapsingToolbarLayout">
|
||||
<!-- Specifies extra space on the start, top, end and bottom
|
||||
sides of the the expanded title text. Margin values should be positive. -->
|
||||
<attr name="expandedTitleMargin" format="dimension"/>
|
||||
<!-- Specifies extra space on the start side of the the expanded title text.
|
||||
Margin values should be positive. -->
|
||||
<attr name="expandedTitleMarginStart" format="dimension"/>
|
||||
<!-- Specifies extra space on the top side of the the expanded title text.
|
||||
Margin values should be positive. -->
|
||||
<attr name="expandedTitleMarginTop" format="dimension"/>
|
||||
<!-- Specifies extra space on the end side of the the expanded title text.
|
||||
Margin values should be positive. -->
|
||||
<attr name="expandedTitleMarginEnd" format="dimension"/>
|
||||
<!-- Specifies extra space on the bottom side of the the expanded title text.
|
||||
Margin values should be positive. -->
|
||||
<attr name="expandedTitleMarginBottom" format="dimension"/>
|
||||
<!-- The text appearance of the CollapsingToolbarLayout's title when it is fully
|
||||
'expanded' -->
|
||||
<attr name="expandedTitleTextAppearance" format="reference"/>
|
||||
<!-- The text appearance of the CollapsingToolbarLayouts title when it is fully
|
||||
'collapsed' -->
|
||||
<attr name="collapsedTitleTextAppearance" format="reference"/>
|
||||
<!-- The drawable to use as a scrim on top of the CollapsingToolbarLayouts content when
|
||||
it has been scrolled sufficiently off screen. -->
|
||||
<attr name="contentScrim" format="color"/>
|
||||
<!-- The drawable to use as a scrim for the status bar content when the
|
||||
CollapsingToolbarLayout has been scrolled sufficiently off screen. Only works on
|
||||
Lollipop with the correct setup. -->
|
||||
<attr name="statusBarScrim" format="color" />
|
||||
<!-- The id of the primary Toolbar child that you wish to use for the purpose of collapsing.
|
||||
If you do not set this then the first Toolbar child found will be used. -->
|
||||
<attr name="toolbarId" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CollapsingAppBarLayout_LayoutParams">
|
||||
<attr name="layout_collapseMode">
|
||||
<!-- The view will act as normal with no collapsing behavior. -->
|
||||
<enum name="none" value="0"/>
|
||||
<!-- The view will pin in place. -->
|
||||
<enum name="pin" value="1"/>
|
||||
<!-- The view will scroll in a parallax fashion. See the
|
||||
layout_collapseParallaxMultiplier attribute to change the multiplier. -->
|
||||
<enum name="parallax" value="2"/>
|
||||
</attr>
|
||||
|
||||
<!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
|
||||
be between 0.0 and 1.0. -->
|
||||
<attr name="layout_collapseParallaxMultiplier" format="float"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
40
eclipse-compile/design/res/values/colors.xml
Normal file
40
eclipse-compile/design/res/values/colors.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<!-- Color for the top outer pixels in the stroke: 18% white (these are multiplied) -->
|
||||
<color name="fab_stroke_top_outer_color">#2EFFFFFF</color>
|
||||
<!-- Color for the top inner pixels in the stroke: 10% white (these are multiplied) -->
|
||||
<color name="fab_stroke_top_inner_color">#1AFFFFFF</color>
|
||||
<!-- Color for the bottom outer pixels in the stroke: 6% black (these are multiplied) -->
|
||||
<color name="fab_stroke_end_outer_color">#0F000000</color>
|
||||
<!-- Color for the bottom inner pixels in the stroke: 4% black (these are multiplied) -->
|
||||
<color name="fab_stroke_end_inner_color">#0A000000</color>
|
||||
|
||||
<!-- Shadow color for the first pixels of a shadow -->
|
||||
<color name="shadow_start_color">#44000000</color>
|
||||
<!-- Shadow color for the middle pixels of a shadow -->
|
||||
<color name="shadow_mid_color">#14000000</color>
|
||||
<!-- Shadow color for the furthest pixels of a shadow -->
|
||||
<color name="shadow_end_color">@android:color/transparent</color>
|
||||
|
||||
<color name="error_color">#FFDD2C00</color>
|
||||
|
||||
<color name="snackbar_background_color">#323232</color>
|
||||
|
||||
</resources>
|
22
eclipse-compile/design/res/values/config.xml
Normal file
22
eclipse-compile/design/res/values/config.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<integer name="snackbar_text_max_lines">2</integer>
|
||||
|
||||
</resources>
|
56
eclipse-compile/design/res/values/dimens.xml
Normal file
56
eclipse-compile/design/res/values/dimens.xml
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<dimen name="fab_elevation">8dp</dimen>
|
||||
<dimen name="fab_translation_z_pressed">6dp</dimen>
|
||||
<dimen name="fab_content_size">24dp</dimen>
|
||||
<dimen name="fab_size_normal">56dp</dimen>
|
||||
<dimen name="fab_size_mini">40dp</dimen>
|
||||
<dimen name="fab_border_width">0.5dp</dimen>
|
||||
|
||||
<dimen name="navigation_max_width">320dp</dimen>
|
||||
<dimen name="navigation_elevation">12dp</dimen>
|
||||
<dimen name="navigation_icon_padding">32dp</dimen>
|
||||
<dimen name="navigation_icon_size">24dp</dimen>
|
||||
<dimen name="navigation_separator_vertical_padding">8dp</dimen>
|
||||
<dimen name="navigation_padding_top_default">0dp</dimen>
|
||||
<dimen name="navigation_padding_bottom">8dp</dimen>
|
||||
|
||||
<dimen name="tab_min_width">72dp</dimen>
|
||||
<dimen name="tab_max_width">264dp</dimen>
|
||||
|
||||
<dimen name="snackbar_min_width">-1px</dimen>
|
||||
<dimen name="snackbar_max_width">-1px</dimen>
|
||||
<dimen name="snackbar_elevation">2dp</dimen>
|
||||
<dimen name="snackbar_background_corner_radius">0dp</dimen>
|
||||
|
||||
<dimen name="snackbar_padding_horizontal">12dp</dimen>
|
||||
<dimen name="snackbar_padding_vertical">14dp</dimen>
|
||||
<dimen name="snackbar_padding_vertical_2lines">24dp</dimen>
|
||||
|
||||
<!-- Extra spacing between the action and message views -->
|
||||
<dimen name="snackbar_extra_spacing_horizontal">0dp</dimen>
|
||||
<!-- The maximum width for a Snackbar's inline action. If the view is width than this then
|
||||
the Snackbar will change to vertical stacking -->
|
||||
<dimen name="snackbar_action_inline_max_width">128dp</dimen>
|
||||
|
||||
<dimen name="snackbar_text_size">14sp</dimen>
|
||||
|
||||
<dimen name="appbar_elevation">4dp</dimen>
|
||||
|
||||
</resources>
|
22
eclipse-compile/design/res/values/ids.xml
Normal file
22
eclipse-compile/design/res/values/ids.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<item name="view_offset_helper" type="id" />
|
||||
|
||||
</resources>
|
||||
|
21
eclipse-compile/design/res/values/strings.xml
Normal file
21
eclipse-compile/design/res/values/strings.xml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
<!-- The class name to the ScrollingChildBehavior required for AppBarLayout -->
|
||||
<string name="appbar_scrolling_view_behavior" translatable="false">android.support.design.widget.AppBarLayout$ScrollingViewBehavior</string>
|
||||
</resources>
|
||||
|
116
eclipse-compile/design/res/values/styles.xml
Normal file
116
eclipse-compile/design/res/values/styles.xml
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2015 The Android Open Source Project
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<style name="Widget.Design.FloatingActionButton" parent="android:Widget">
|
||||
<item name="android:background">@drawable/fab_background</item>
|
||||
<item name="backgroundTint">?attr/colorAccent</item>
|
||||
<item name="fabSize">normal</item>
|
||||
<item name="elevation">@dimen/fab_elevation</item>
|
||||
<item name="pressedTranslationZ">@dimen/fab_translation_z_pressed</item>
|
||||
<item name="rippleColor">?attr/colorControlHighlight</item>
|
||||
<item name="borderWidth">@dimen/fab_border_width</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.ScrimInsetsFrameLayout" parent="">
|
||||
<item name="insetForeground">#4000</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.NavigationView" parent="">
|
||||
<item name="elevation">@dimen/navigation_elevation</item>
|
||||
<item name="android:background">?android:attr/windowBackground</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
<item name="android:maxWidth">@dimen/navigation_max_width</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
|
||||
<item name="tabGravity">fill</item>
|
||||
<item name="tabMode">fixed</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.Widget.Design.TabLayout" parent="android:Widget">
|
||||
<item name="tabMaxWidth">@dimen/tab_max_width</item>
|
||||
<item name="tabIndicatorColor">?attr/colorAccent</item>
|
||||
<item name="tabIndicatorHeight">2dp</item>
|
||||
<item name="tabPaddingStart">12dp</item>
|
||||
<item name="tabPaddingEnd">12dp</item>
|
||||
<item name="tabBackground">?attr/selectableItemBackground</item>
|
||||
<item name="tabTextAppearance">@style/TextAppearance.Design.Tab</item>
|
||||
<item name="tabSelectedTextColor">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.Tab" parent="TextAppearance.AppCompat.Button">
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:textColor">?android:textColorSecondary</item>
|
||||
<item name="textAllCaps">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.TextInputLayout" parent="android:Widget">
|
||||
<item name="hintTextAppearance">@style/TextAppearance.Design.Hint</item>
|
||||
<item name="errorTextAppearance">@style/TextAppearance.Design.Error</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.Hint" parent="TextAppearance.AppCompat.Caption">
|
||||
<item name="android:textColor">?attr/colorControlActivated</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.Error" parent="TextAppearance.AppCompat.Caption">
|
||||
<item name="android:textColor">@color/error_color</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance">
|
||||
<item name="android:textSize">@dimen/snackbar_text_size</item>
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.Snackbar.Action" parent="TextAppearance.AppCompat.Button">
|
||||
<item name="android:textColor">?colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.Snackbar" parent="android:Widget">
|
||||
<item name="android:theme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="android:minWidth">@dimen/snackbar_min_width</item>
|
||||
<item name="android:maxWidth">@dimen/snackbar_max_width</item>
|
||||
<item name="android:background">@drawable/snackbar_background</item>
|
||||
<item name="android:paddingLeft">@dimen/snackbar_padding_horizontal</item>
|
||||
<item name="android:paddingRight">@dimen/snackbar_padding_horizontal</item>
|
||||
<item name="elevation">@dimen/snackbar_elevation</item>
|
||||
<item name="maxActionInlineWidth">@dimen/snackbar_action_inline_max_width</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.CollapsingToolbar" parent="android:Widget">
|
||||
<item name="expandedTitleMargin">32dp</item>
|
||||
<item name="expandedTitleTextAppearance">@style/TextAppearance.Design.CollapsingToolbar.Expanded</item>
|
||||
<item name="collapsedTitleTextAppearance">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
|
||||
<item name="statusBarScrim">?attr/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.AppBarLayout" parent="android:Widget">
|
||||
<item name="elevation">@dimen/appbar_elevation</item>
|
||||
<item name="android:background">?attr/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Design.CoordinatorLayout" parent="android:Widget">
|
||||
<item name="statusBarBackground">?attr/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Design.CollapsingToolbar.Expanded" parent="TextAppearance.AppCompat.Display1">
|
||||
<item name="android:textColor">?android:attr/textColorPrimary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
include ':OsmAnd-java', ':design'
|
||||
include ':OsmAnd-java', ':eclipse-compile:design'
|
||||
include ':OsmAnd'
|
||||
include ':eclipse-compile:appcompat'
|
||||
include ':plugins:OsmAnd-AddressPlugin'
|
||||
|
|
Loading…
Reference in a new issue