Skip to content

Commit 2b8365e

Browse files
JoseAlcerrecaGerrit Code Review
authored and
Gerrit Code Review
committedJun 5, 2020
Merge "Jetchat: creates new themes" into jetapps
2 parents 8852d78 + 1feffe7 commit 2b8365e

24 files changed

+351
-214
lines changed
 

‎JetChat/ASSETS_LICENSE

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
All font files are licensed under the SIL OPEN FONT LICENSE license. All other files are licensed under the Apache 2 license.
2+
3+
4+
SIL OPEN FONT LICENSE
5+
Version 1.1 - 26 February 2007
6+
7+
PREAMBLE
8+
The goals of the Open Font License (OFL) are to stimulate worldwide
9+
development of collaborative font projects, to support the font creation
10+
efforts of academic and linguistic communities, and to provide a free and
11+
open framework in which fonts may be shared and improved in partnership
12+
with others.
13+
14+
The OFL allows the licensed fonts to be used, studied, modified and
15+
redistributed freely as long as they are not sold by themselves. The
16+
fonts, including any derivative works, can be bundled, embedded,
17+
redistributed and/or sold with any software provided that any reserved
18+
names are not used by derivative works. The fonts and derivatives,
19+
however, cannot be released under any other type of license. The
20+
requirement for fonts to remain under this license does not apply
21+
to any document created using the fonts or their derivatives.
22+
23+
DEFINITIONS
24+
"Font Software" refers to the set of files released by the Copyright
25+
Holder(s) under this license and clearly marked as such. This may
26+
include source files, build scripts and documentation.
27+
28+
"Reserved Font Name" refers to any names specified as such after the
29+
copyright statement(s).
30+
31+
"Original Version" refers to the collection of Font Software components as
32+
distributed by the Copyright Holder(s).
33+
34+
"Modified Version" refers to any derivative made by adding to, deleting,
35+
or substituting — in part or in whole — any of the components of the
36+
Original Version, by changing formats or by porting the Font Software to a
37+
new environment.
38+
39+
"Author" refers to any designer, engineer, programmer, technical
40+
writer or other person who contributed to the Font Software.
41+
42+
PERMISSION & CONDITIONS
43+
Permission is hereby granted, free of charge, to any person obtaining
44+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
45+
redistribute, and sell modified and unmodified copies of the Font
46+
Software, subject to the following conditions:
47+
48+
1) Neither the Font Software nor any of its individual components,
49+
in Original or Modified Versions, may be sold by itself.
50+
51+
2) Original or Modified Versions of the Font Software may be bundled,
52+
redistributed and/or sold with any software, provided that each copy
53+
contains the above copyright notice and this license. These can be
54+
included either as stand-alone text files, human-readable headers or
55+
in the appropriate machine-readable metadata fields within text or
56+
binary files as long as those fields can be easily viewed by the user.
57+
58+
3) No Modified Version of the Font Software may use the Reserved Font
59+
Name(s) unless explicit written permission is granted by the corresponding
60+
Copyright Holder. This restriction only applies to the primary font name as
61+
presented to the users.
62+
63+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
64+
Software shall not be used to promote, endorse or advertise any
65+
Modified Version, except to acknowledge the contribution(s) of the
66+
Copyright Holder(s) and the Author(s) or with their explicit written
67+
permission.
68+
69+
5) The Font Software, modified or unmodified, in part or in whole,
70+
must be distributed entirely under this license, and must not be
71+
distributed under any other license. The requirement for fonts to
72+
remain under this license does not apply to any document created
73+
using the Font Software.
74+
75+
TERMINATION
76+
This license becomes null and void if any of the above conditions are
77+
not met.
78+
79+
DISCLAIMER
80+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
81+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
82+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
83+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
84+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
85+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
86+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
87+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
88+
OTHER DEALINGS IN THE FONT SOFTWARE.

‎JetChat/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
android:icon="@mipmap/ic_launcher"
2424
android:label="@string/app_name"
2525
android:supportsRtl="true"
26-
android:theme="@style/Theme.JetChat.NoActionBar">
26+
android:theme="@style/Theme.Jetchat.NoActionBar">
2727
<activity
2828
android:name=".NavActivity"
2929
android:windowSoftInputMode="adjustResize"

‎JetChat/app/src/main/java/com/example/compose/jetchat/Themes.kt

Lines changed: 0 additions & 139 deletions
This file was deleted.

‎JetChat/app/src/main/java/com/example/compose/jetchat/conversation/Conversation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ import androidx.ui.res.vectorResource
5454
import androidx.ui.tooling.preview.Preview
5555
import androidx.ui.unit.PxPosition
5656
import androidx.ui.unit.dp
57-
import com.example.compose.jetchat.JetChatTheme
5857
import com.example.compose.jetchat.R
58+
import com.example.compose.jetchat.theme.JetchatTheme
5959

6060
/**
6161
* Entry point for a conversation screen.
@@ -220,7 +220,7 @@ fun AuthorAndTextMessage(
220220
@Preview()
221221
@Composable
222222
fun ConversationPreview() {
223-
JetChatTheme {
223+
JetchatTheme {
224224
ConversationContent(
225225
uiState = ConversationUiState(),
226226
navigateToProfile = { }

‎JetChat/app/src/main/java/com/example/compose/jetchat/conversation/ConversationFragment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import androidx.core.os.bundleOf
2727
import androidx.fragment.app.Fragment
2828
import androidx.navigation.findNavController
2929
import androidx.ui.core.setContent
30-
import com.example.compose.jetchat.JetChatTheme
3130
import com.example.compose.jetchat.R
31+
import com.example.compose.jetchat.theme.JetchatTheme
3232

3333
class ConversationFragment : Fragment() {
3434

@@ -47,7 +47,7 @@ class ConversationFragment : Fragment() {
4747
)
4848
setContent(Recomposer.current()) {
4949
Providers(BackPressedDispatcherAmbient provides requireActivity()) {
50-
JetChatTheme {
50+
JetchatTheme {
5151
ConversationContent(
5252
uiState = ConversationUiState(),
5353
navigateToProfile = { user ->

‎JetChat/app/src/main/java/com/example/compose/jetchat/profile/Previews.kt

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,68 +17,52 @@
1717
package com.example.compose.jetchat.profile
1818

1919
import androidx.compose.Composable
20-
import androidx.compose.State
21-
import androidx.compose.mutableStateOf
22-
import androidx.compose.state
2320
import androidx.ui.tooling.preview.Preview
24-
import com.example.compose.jetchat.JetChatProfileTheme
25-
21+
import com.example.compose.jetchat.theme.JetchatTheme
2622

2723
@Preview(widthDp = 340, name = "340 width - Me")
2824
@Composable
2925
fun ProfilePreview340() {
30-
JetChatProfileTheme(userIsMe = true) {
31-
ProfileScreen(
32-
aliConnors
33-
)
26+
JetchatTheme {
27+
ProfileScreen(aliConnors)
3428
}
3529
}
3630

3731
@Preview(widthDp = 480, name = "480 width - Me")
3832
@Composable
3933
fun ProfilePreview480Me() {
40-
JetChatProfileTheme(userIsMe = true) {
41-
ProfileScreen(
42-
aliConnors
43-
)
34+
JetchatTheme {
35+
ProfileScreen(aliConnors)
4436
}
4537
}
4638

4739
@Preview(widthDp = 480, name = "480 width - Other")
4840
@Composable
4941
fun ProfilePreview480Other() {
50-
JetChatProfileTheme(userIsMe = false) {
51-
ProfileScreen(
52-
someOneElse
53-
)
42+
JetchatTheme {
43+
ProfileScreen(someOneElse)
5444
}
5545
}
5646
@Preview(widthDp = 340, name = "340 width - Me - Dark")
5747
@Composable
5848
fun ProfilePreview340MeDark() {
59-
JetChatProfileTheme(isDarkTheme = true, userIsMe = true) {
60-
ProfileScreen(
61-
aliConnors
62-
)
49+
JetchatTheme(isDarkTheme = true) {
50+
ProfileScreen(aliConnors)
6351
}
6452
}
6553

6654
@Preview(widthDp = 480, name = "480 width - Me - Dark")
6755
@Composable
6856
fun ProfilePreview480MeDark() {
69-
JetChatProfileTheme(isDarkTheme = true, userIsMe = true) {
70-
ProfileScreen(
71-
aliConnors
72-
)
57+
JetchatTheme(isDarkTheme = true) {
58+
ProfileScreen(aliConnors)
7359
}
7460
}
7561

7662
@Preview(widthDp = 480, name = "480 width - Other - Dark")
7763
@Composable
7864
fun ProfilePreview480OtherDark() {
79-
JetChatProfileTheme(isDarkTheme = true, userIsMe = false) {
80-
ProfileScreen(
81-
someOneElse
82-
)
65+
JetchatTheme(isDarkTheme = true) {
66+
ProfileScreen(someOneElse)
8367
}
8468
}

0 commit comments

Comments
 (0)