Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5e5011f

Browse files
committed
Add back ui/android
Apparently these files are needed to build for Android.
1 parent fe5e54c commit 5e5011f

File tree

119 files changed

+8250
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+8250
-0
lines changed

ui/android/BUILD.gn

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import("//build/config/android/rules.gni")
2+
3+
assert(is_android)
4+
5+
java_cpp_enum("java_enums_srcjar") {
6+
sources = [
7+
"../gfx/android/java_bitmap.h",
8+
]
9+
outputs = [
10+
"org/chromium/ui/gfx/BitmapFormat.java",
11+
]
12+
}
13+
14+
java_strings_grd("ui_strings_grd") {
15+
grd_file = "java/strings/android_ui_strings.grd"
16+
outputs = [
17+
"values-am/android_ui_strings.xml",
18+
"values-ar/android_ui_strings.xml",
19+
"values-bg/android_ui_strings.xml",
20+
"values-ca/android_ui_strings.xml",
21+
"values-cs/android_ui_strings.xml",
22+
"values-da/android_ui_strings.xml",
23+
"values-de/android_ui_strings.xml",
24+
"values-el/android_ui_strings.xml",
25+
"values/android_ui_strings.xml",
26+
"values-en-rGB/android_ui_strings.xml",
27+
"values-es/android_ui_strings.xml",
28+
"values-es-rUS/android_ui_strings.xml",
29+
"values-fa/android_ui_strings.xml",
30+
"values-fi/android_ui_strings.xml",
31+
"values-tl/android_ui_strings.xml",
32+
"values-fr/android_ui_strings.xml",
33+
"values-hi/android_ui_strings.xml",
34+
"values-hr/android_ui_strings.xml",
35+
"values-hu/android_ui_strings.xml",
36+
"values-in/android_ui_strings.xml",
37+
"values-it/android_ui_strings.xml",
38+
"values-iw/android_ui_strings.xml",
39+
"values-ja/android_ui_strings.xml",
40+
"values-ko/android_ui_strings.xml",
41+
"values-lt/android_ui_strings.xml",
42+
"values-lv/android_ui_strings.xml",
43+
"values-nl/android_ui_strings.xml",
44+
"values-nb/android_ui_strings.xml",
45+
"values-pl/android_ui_strings.xml",
46+
"values-pt-rBR/android_ui_strings.xml",
47+
"values-pt-rPT/android_ui_strings.xml",
48+
"values-ro/android_ui_strings.xml",
49+
"values-ru/android_ui_strings.xml",
50+
"values-sk/android_ui_strings.xml",
51+
"values-sl/android_ui_strings.xml",
52+
"values-sr/android_ui_strings.xml",
53+
"values-sv/android_ui_strings.xml",
54+
"values-sw/android_ui_strings.xml",
55+
"values-th/android_ui_strings.xml",
56+
"values-tr/android_ui_strings.xml",
57+
"values-uk/android_ui_strings.xml",
58+
"values-vi/android_ui_strings.xml",
59+
"values-zh-rCN/android_ui_strings.xml",
60+
"values-zh-rTW/android_ui_strings.xml",
61+
]
62+
}
63+
64+
android_resources("ui_java_resources") {
65+
custom_package = "org.chromium.ui"
66+
resource_dirs = [ "java/res" ]
67+
deps = [
68+
":ui_strings_grd",
69+
]
70+
}
71+
72+
android_library("ui_java") {
73+
DEPRECATED_java_in_dir = "java/src"
74+
deps = [
75+
":ui_java_resources",
76+
"//base:base_java",
77+
]
78+
srcjar_deps = [ ":java_enums_srcjar" ]
79+
}

ui/android/OWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
4+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2012 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
package org.chromium.ui.base;
6+
7+
public class PageTransitionTypes {
8+
#define PAGE_TRANSITION(label, value) public static final int \
9+
PAGE_TRANSITION_ ## label = value;
10+
#include "ui/base/page_transition_types_list.h"
11+
#undef PAGE_TRANSITION
12+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2013 The Chromium Authors. All rights reserved.
4+
Use of this source code is governed by a BSD-style license that can be
5+
found in the LICENSE file.
6+
-->
7+
8+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item
10+
android:top="0dp"
11+
android:right="0dp"
12+
android:bottom="0dp"
13+
android:left="0dp">
14+
<shape android:shape="rectangle">
15+
<solid android:color="@color/color_picker_border_color"/>
16+
</shape>
17+
</item>
18+
<item android:top="0px"
19+
android:right="1px"
20+
android:bottom="0px"
21+
android:left="1px">
22+
<shape android:shape="rectangle">
23+
<solid android:color="@color/color_picker_background_color"/>
24+
</shape>
25+
</item>
26+
<item
27+
android:id="@+id/color_button_swatch"
28+
android:top="1px"
29+
android:right="2px"
30+
android:bottom="1px"
31+
android:left="2px">
32+
<shape android:shape="rectangle">
33+
<solid android:color="#FF0000"/>
34+
</shape>
35+
</item>
36+
</layer-list>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file.
5+
-->
6+
7+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
8+
android:shape="rectangle">
9+
10+
<stroke android:width="1px" android:color="@color/color_picker_border_color" />
11+
<solid android:color="@color/color_picker_background_color"/>
12+
</shape>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
4+
5+
Use of this source code is governed by a BSD-style license that can be
6+
found in the LICENSE file.
7+
-->
8+
9+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
10+
<item android:state_above_anchor="true"
11+
android:drawable="@drawable/dropdown_popup_background_up" />
12+
<item android:drawable="@drawable/dropdown_popup_background_down" />
13+
</selector>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (c) 2012 The Chromium Authors. All rights reserved.
3+
4+
Use of this source code is governed by a BSD-style license that can be
5+
found in the LICENSE file.
6+
-->
7+
8+
<!-- ScrollView is needed since sometimes the dialog does not fit in small screen devices. -->
9+
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
10+
android:layout_width="wrap_content"
11+
android:layout_height="wrap_content">
12+
13+
<LinearLayout
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:layout_gravity="center_vertical"
17+
android:orientation="horizontal"
18+
android:gravity="center">
19+
20+
<DatePicker
21+
android:id="@+id/date_picker"
22+
android:layout_gravity="center_vertical"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:spinnersShown="true"
26+
android:calendarViewShown="false"
27+
android:contentDescription="@string/accessibility_datetime_picker_date"
28+
/>
29+
30+
<TimePicker
31+
android:id="@+id/time_picker"
32+
android:layout_gravity="center_vertical"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:contentDescription="@string/accessibility_datetime_picker_time"
36+
/>
37+
38+
</LinearLayout>
39+
40+
</HorizontalScrollView>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2013 The Chromium Authors. All rights reserved.
4+
Use of this source code is governed by a BSD-style license that can be
5+
found in the LICENSE file.
6+
-->
7+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
8+
android:layout_width="wrap_content"
9+
android:layout_height="wrap_content">
10+
11+
<TextView
12+
android:id="@+id/text"
13+
android:layout_width="match_parent"
14+
android:layout_height="wrap_content"
15+
android:layout_marginStart="@dimen/color_picker_gradient_margin"
16+
android:layout_marginEnd="@dimen/color_picker_gradient_margin"
17+
android:textAppearance="@android:style/TextAppearance.Medium"
18+
android:textIsSelectable="false" />
19+
20+
<FrameLayout
21+
android:id="@+id/gradient_border"
22+
android:layout_width="match_parent"
23+
android:layout_height="50dp"
24+
android:layout_below="@id/text"
25+
android:layout_marginStart="@dimen/color_picker_gradient_margin"
26+
android:layout_marginEnd="@dimen/color_picker_gradient_margin"
27+
android:layout_marginTop="3dp"
28+
android:background="@drawable/color_picker_border"
29+
android:padding="1dp" >
30+
31+
<View
32+
android:id="@+id/gradient"
33+
android:layout_width="match_parent"
34+
android:layout_height="match_parent" />
35+
</FrameLayout>
36+
37+
<SeekBar
38+
android:id="@+id/seek_bar"
39+
android:layout_width="match_parent"
40+
android:layout_height="75dp"
41+
android:layout_below="@id/text"
42+
android:progressDrawable="@android:color/transparent"
43+
android:thumb="@drawable/color_picker_advanced_select_handle"
44+
android:translationY="25dp" />
45+
46+
</RelativeLayout>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2013 The Chromium Authors. All rights reserved.
4+
Use of this source code is governed by a BSD-style license that can be
5+
found in the LICENSE file.
6+
-->
7+
8+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
9+
android:layout_width="match_parent"
10+
android:layout_height="wrap_content"
11+
android:orientation="vertical"
12+
android:padding="15dp">
13+
14+
<ScrollView
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content">
17+
18+
<org.chromium.ui.ColorPickerAdvanced
19+
android:id="@+id/color_picker_advanced"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content" />
22+
</ScrollView>
23+
24+
<org.chromium.ui.ColorPickerSimple
25+
android:id="@+id/color_picker_simple"
26+
android:layout_width="match_parent"
27+
android:layout_height="wrap_content"
28+
android:divider="@color/color_picker_border_color"
29+
android:dividerHeight="1px"
30+
android:paddingStart="1px"
31+
android:paddingEnd="1px"
32+
android:paddingTop="1px"
33+
android:background="@drawable/color_picker_border" />
34+
35+
<FrameLayout
36+
android:id="@+id/more_colors_button_border"
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content"
39+
android:background="@drawable/color_picker_border"
40+
android:padding="1px">
41+
42+
<org.chromium.ui.ColorPickerMoreButton
43+
android:id="@+id/more_colors_button"
44+
style="?android:attr/buttonBarButtonStyle"
45+
android:layout_width="match_parent"
46+
android:layout_height="wrap_content"
47+
android:minHeight="48dp"
48+
android:textAppearance="?android:attr/textAppearanceSmall"
49+
android:text="@string/color_picker_button_more" />
50+
</FrameLayout>
51+
</LinearLayout>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright 2013 The Chromium Authors. All rights reserved.
3+
Use of this source code is governed by a BSD-style license that can be
4+
found in the LICENSE file.
5+
-->
6+
7+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:paddingBottom="15dp"
11+
android:paddingStart="20dp"
12+
android:paddingEnd="20dp"
13+
android:paddingTop="15dp" >
14+
15+
<TextView
16+
android:id="@+id/title"
17+
style="?android:attr/textAppearanceLarge"
18+
android:layout_width="match_parent"
19+
android:layout_height="wrap_content"
20+
android:layout_toStartOf="@+id/selected_color_view_border"
21+
android:layout_centerVertical="true"
22+
android:textColor="#33B5E5"
23+
android:ellipsize="end"
24+
android:singleLine="true" />
25+
26+
<FrameLayout
27+
android:layout_width="40dp"
28+
android:layout_height="40dp"
29+
android:layout_alignParentEnd="true"
30+
android:id="@+id/selected_color_view_border"
31+
android:background="@drawable/color_picker_border"
32+
android:padding="2px">
33+
34+
<View
35+
android:id="@+id/selected_color_view"
36+
android:layout_width="match_parent"
37+
android:layout_height="match_parent"
38+
android:background="@android:color/black" />
39+
</FrameLayout>
40+
41+
</RelativeLayout>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright 2012 The Chromium Authors. All rights reserved.
3+
4+
Use of this source code is governed by a BSD-style license that can be
5+
found in the LICENSE file.
6+
-->
7+
8+
<!-- ScrollView is needed since sometimes the dialog does not fit in small screen devices. -->
9+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
10+
android:layout_width="wrap_content"
11+
android:layout_height="wrap_content">
12+
13+
<LinearLayout
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:layout_gravity="center_horizontal"
17+
android:orientation="vertical"
18+
android:gravity="center">
19+
20+
<DatePicker
21+
android:id="@+id/date_picker"
22+
android:layout_gravity="center_horizontal"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:spinnersShown="true"
26+
android:calendarViewShown="false"
27+
android:contentDescription="@string/accessibility_datetime_picker_date"
28+
/>
29+
30+
<TimePicker
31+
android:id="@+id/time_picker"
32+
android:layout_gravity="center_horizontal"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:contentDescription="@string/accessibility_datetime_picker_time"
36+
/>
37+
38+
</LinearLayout>
39+
40+
</ScrollView>

0 commit comments

Comments
 (0)