Skip to content

Commit

Permalink
Add back ui/android
Browse files Browse the repository at this point in the history
Apparently these files are needed to build for Android.
  • Loading branch information
abarth committed Jul 16, 2015
1 parent fe5e54c commit 5e5011f
Show file tree
Hide file tree
Showing 119 changed files with 8,250 additions and 0 deletions.
79 changes: 79 additions & 0 deletions ui/android/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import("//build/config/android/rules.gni")

assert(is_android)

java_cpp_enum("java_enums_srcjar") {
sources = [
"../gfx/android/java_bitmap.h",
]
outputs = [
"org/chromium/ui/gfx/BitmapFormat.java",
]
}

java_strings_grd("ui_strings_grd") {
grd_file = "java/strings/android_ui_strings.grd"
outputs = [
"values-am/android_ui_strings.xml",
"values-ar/android_ui_strings.xml",
"values-bg/android_ui_strings.xml",
"values-ca/android_ui_strings.xml",
"values-cs/android_ui_strings.xml",
"values-da/android_ui_strings.xml",
"values-de/android_ui_strings.xml",
"values-el/android_ui_strings.xml",
"values/android_ui_strings.xml",
"values-en-rGB/android_ui_strings.xml",
"values-es/android_ui_strings.xml",
"values-es-rUS/android_ui_strings.xml",
"values-fa/android_ui_strings.xml",
"values-fi/android_ui_strings.xml",
"values-tl/android_ui_strings.xml",
"values-fr/android_ui_strings.xml",
"values-hi/android_ui_strings.xml",
"values-hr/android_ui_strings.xml",
"values-hu/android_ui_strings.xml",
"values-in/android_ui_strings.xml",
"values-it/android_ui_strings.xml",
"values-iw/android_ui_strings.xml",
"values-ja/android_ui_strings.xml",
"values-ko/android_ui_strings.xml",
"values-lt/android_ui_strings.xml",
"values-lv/android_ui_strings.xml",
"values-nl/android_ui_strings.xml",
"values-nb/android_ui_strings.xml",
"values-pl/android_ui_strings.xml",
"values-pt-rBR/android_ui_strings.xml",
"values-pt-rPT/android_ui_strings.xml",
"values-ro/android_ui_strings.xml",
"values-ru/android_ui_strings.xml",
"values-sk/android_ui_strings.xml",
"values-sl/android_ui_strings.xml",
"values-sr/android_ui_strings.xml",
"values-sv/android_ui_strings.xml",
"values-sw/android_ui_strings.xml",
"values-th/android_ui_strings.xml",
"values-tr/android_ui_strings.xml",
"values-uk/android_ui_strings.xml",
"values-vi/android_ui_strings.xml",
"values-zh-rCN/android_ui_strings.xml",
"values-zh-rTW/android_ui_strings.xml",
]
}

android_resources("ui_java_resources") {
custom_package = "org.chromium.ui"
resource_dirs = [ "java/res" ]
deps = [
":ui_strings_grd",
]
}

android_library("ui_java") {
DEPRECATED_java_in_dir = "java/src"
deps = [
":ui_java_resources",
"//base:base_java",
]
srcjar_deps = [ ":java_enums_srcjar" ]
}
4 changes: 4 additions & 0 deletions ui/android/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdduke@chromium.org
miguelg@chromium.org
newt@chromium.org
tedchoc@chromium.org
12 changes: 12 additions & 0 deletions ui/android/java/PageTransitionTypes.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.ui.base;

public class PageTransitionTypes {
#define PAGE_TRANSITION(label, value) public static final int \
PAGE_TRANSITION_ ## label = value;
#include "ui/base/page_transition_types_list.h"
#undef PAGE_TRANSITION
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions ui/android/java/res/drawable/color_button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
android:left="0dp">
<shape android:shape="rectangle">
<solid android:color="@color/color_picker_border_color"/>
</shape>
</item>
<item android:top="0px"
android:right="1px"
android:bottom="0px"
android:left="1px">
<shape android:shape="rectangle">
<solid android:color="@color/color_picker_background_color"/>
</shape>
</item>
<item
android:id="@+id/color_button_swatch"
android:top="1px"
android:right="2px"
android:bottom="1px"
android:left="2px">
<shape android:shape="rectangle">
<solid android:color="#FF0000"/>
</shape>
</item>
</layer-list>
12 changes: 12 additions & 0 deletions ui/android/java/res/drawable/color_picker_border.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<stroke android:width="1px" android:color="@color/color_picker_border_color" />
<solid android:color="@color/color_picker_background_color"/>
</shape>
13 changes: 13 additions & 0 deletions ui/android/java/res/drawable/dropdown_popup_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_above_anchor="true"
android:drawable="@drawable/dropdown_popup_background_up" />
<item android:drawable="@drawable/dropdown_popup_background_down" />
</selector>
40 changes: 40 additions & 0 deletions ui/android/java/res/layout-land/date_time_picker_dialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!-- ScrollView is needed since sometimes the dialog does not fit in small screen devices. -->
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
android:gravity="center">

<DatePicker
android:id="@+id/date_picker"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnersShown="true"
android:calendarViewShown="false"
android:contentDescription="@string/accessibility_datetime_picker_date"
/>

<TimePicker
android:id="@+id/time_picker"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/accessibility_datetime_picker_time"
/>

</LinearLayout>

</HorizontalScrollView>
46 changes: 46 additions & 0 deletions ui/android/java/res/layout/color_picker_advanced_component.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/color_picker_gradient_margin"
android:layout_marginEnd="@dimen/color_picker_gradient_margin"
android:textAppearance="@android:style/TextAppearance.Medium"
android:textIsSelectable="false" />

<FrameLayout
android:id="@+id/gradient_border"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@id/text"
android:layout_marginStart="@dimen/color_picker_gradient_margin"
android:layout_marginEnd="@dimen/color_picker_gradient_margin"
android:layout_marginTop="3dp"
android:background="@drawable/color_picker_border"
android:padding="1dp" >

<View
android:id="@+id/gradient"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>

<SeekBar
android:id="@+id/seek_bar"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_below="@id/text"
android:progressDrawable="@android:color/transparent"
android:thumb="@drawable/color_picker_advanced_select_handle"
android:translationY="25dp" />

</RelativeLayout>
51 changes: 51 additions & 0 deletions ui/android/java/res/layout/color_picker_dialog_content.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

<org.chromium.ui.ColorPickerAdvanced
android:id="@+id/color_picker_advanced"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</ScrollView>

<org.chromium.ui.ColorPickerSimple
android:id="@+id/color_picker_simple"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@color/color_picker_border_color"
android:dividerHeight="1px"
android:paddingStart="1px"
android:paddingEnd="1px"
android:paddingTop="1px"
android:background="@drawable/color_picker_border" />

<FrameLayout
android:id="@+id/more_colors_button_border"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/color_picker_border"
android:padding="1px">

<org.chromium.ui.ColorPickerMoreButton
android:id="@+id/more_colors_button"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/color_picker_button_more" />
</FrameLayout>
</LinearLayout>
41 changes: 41 additions & 0 deletions ui/android/java/res/layout/color_picker_dialog_title.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="15dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingTop="15dp" >

<TextView
android:id="@+id/title"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/selected_color_view_border"
android:layout_centerVertical="true"
android:textColor="#33B5E5"
android:ellipsize="end"
android:singleLine="true" />

<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:id="@+id/selected_color_view_border"
android:background="@drawable/color_picker_border"
android:padding="2px">

<View
android:id="@+id/selected_color_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" />
</FrameLayout>

</RelativeLayout>
40 changes: 40 additions & 0 deletions ui/android/java/res/layout/date_time_picker_dialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2012 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!-- ScrollView is needed since sometimes the dialog does not fit in small screen devices. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:gravity="center">

<DatePicker
android:id="@+id/date_picker"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnersShown="true"
android:calendarViewShown="false"
android:contentDescription="@string/accessibility_datetime_picker_date"
/>

<TimePicker
android:id="@+id/time_picker"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/accessibility_datetime_picker_time"
/>

</LinearLayout>

</ScrollView>
Loading

0 comments on commit 5e5011f

Please sign in to comment.