Merge branch 'develop' into feature/crypto

This commit is contained in:
ganfra
2019-06-07 18:53:24 +02:00
404 changed files with 12812 additions and 2612 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<activity android:name="im.vector.riotredesign.features.debug.TestLinkifyActivity" />
<activity
android:name="im.vector.riotredesign.features.debug.DebugMaterialThemeLightActivity"
android:theme="@style/VectorMaterialThemeDebugLight" />
<activity
android:name="im.vector.riotredesign.features.debug.DebugMaterialThemeDarkActivity"
android:theme="@style/VectorMaterialThemeDebugDark" />
</application>
</manifest>

View File

@ -0,0 +1,65 @@
/*
* Copyright 2019 New Vector Ltd
*
* 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.
*/
package im.vector.riotredesign.features.debug
import android.os.Bundle
import android.view.Menu
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.google.android.material.snackbar.Snackbar
import im.vector.riotredesign.R
import im.vector.riotredesign.core.utils.toast
import kotlinx.android.synthetic.debug.activity_test_material_theme.*
// Rendering is not the same with VectorBaseActivity
abstract class DebugMaterialThemeActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_test_material_theme)
debugShowSnackbar.setOnClickListener {
Snackbar.make(debugMaterialCoordinator, "Snackbar!", Snackbar.LENGTH_SHORT)
.setAction("Action") { }
.show()
}
debugShowToast.setOnClickListener {
toast("Toast")
}
debugShowDialog.setOnClickListener {
AlertDialog.Builder(this)
.setMessage("Dialog content")
.setIcon(R.drawable.ic_settings_x)
.setPositiveButton("Positive", null)
.setNegativeButton("Negative", null)
.setNeutralButton("Neutral", null)
.show()
}
debugShowBottomSheet.setOnClickListener {
BottomSheetDialogFragment().show(supportFragmentManager, "TAG")
}
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.vector_home, menu)
return true
}
}

View File

@ -0,0 +1,19 @@
/*
* Copyright 2019 New Vector Ltd
*
* 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.
*/
package im.vector.riotredesign.features.debug
class DebugMaterialThemeDarkActivity : DebugMaterialThemeActivity()

View File

@ -0,0 +1,19 @@
/*
* Copyright 2019 New Vector Ltd
*
* 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.
*/
package im.vector.riotredesign.features.debug
class DebugMaterialThemeLightActivity : DebugMaterialThemeActivity()

View File

@ -0,0 +1,137 @@
/*
* Copyright 2019 New Vector Ltd
*
* 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.
*/
package im.vector.riotredesign.features.debug
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
import android.os.Build
import androidx.core.app.NotificationCompat
import androidx.core.app.Person
import butterknife.OnClick
import im.vector.riotredesign.R
import im.vector.riotredesign.core.platform.VectorBaseActivity
class DebugMenuActivity : VectorBaseActivity() {
override fun getLayoutRes() = R.layout.activity_debug_menu
@OnClick(R.id.debug_test_text_view_link)
fun testTextViewLink() {
startActivity(Intent(this, TestLinkifyActivity::class.java))
}
@OnClick(R.id.debug_test_notification)
fun testNotification() {
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// Create channel first
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel =
NotificationChannel(
"CHAN",
"Channel name",
NotificationManager.IMPORTANCE_DEFAULT
)
channel.description = "Channel description"
(getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).createNotificationChannel(channel)
val channel2 =
NotificationChannel(
"CHAN2",
"Channel name 2",
NotificationManager.IMPORTANCE_DEFAULT
)
channel2.description = "Channel description 2"
(getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).createNotificationChannel(channel2)
}
val builder = NotificationCompat.Builder(this, "CHAN")
.setWhen(System.currentTimeMillis())
.setContentTitle("Title")
.setContentText("Content")
// No effect because it's a group summary notif
.setNumber(33)
.setSmallIcon(R.drawable.logo_transparent)
// This provocate the badge issue: no badge for group notification
.setGroup("GroupKey")
.setGroupSummary(true)
val messagingStyle1 = NotificationCompat.MessagingStyle(
Person.Builder()
.setName("User name")
.build()
)
.addMessage("Message 1 - 1", System.currentTimeMillis(), Person.Builder().setName("user 1-1").build())
.addMessage("Message 1 - 2", System.currentTimeMillis(), Person.Builder().setName("user 1-2").build())
val messagingStyle2 = NotificationCompat.MessagingStyle(
Person.Builder()
.setName("User name 2")
.build()
)
.addMessage("Message 2 - 1", System.currentTimeMillis(), Person.Builder().setName("user 1-1").build())
.addMessage("Message 2 - 2", System.currentTimeMillis(), Person.Builder().setName("user 1-2").build())
notificationManager.notify(10, builder.build())
notificationManager.notify(
11,
NotificationCompat.Builder(this, "CHAN")
.setChannelId("CHAN")
.setWhen(System.currentTimeMillis())
.setContentTitle("Title 1")
.setContentText("Content 1")
// For shortcut on long press on launcher icon
.setBadgeIconType(NotificationCompat.BADGE_ICON_NONE)
.setStyle(messagingStyle1)
.setSmallIcon(R.drawable.logo_transparent)
.setGroup("GroupKey")
.build()
)
notificationManager.notify(
12,
NotificationCompat.Builder(this, "CHAN2")
.setWhen(System.currentTimeMillis())
.setContentTitle("Title 2")
.setContentText("Content 2")
.setStyle(messagingStyle2)
.setSmallIcon(R.drawable.logo_transparent)
.setGroup("GroupKey")
.build()
)
}
@OnClick(R.id.debug_test_material_theme_light)
fun testMaterialThemeLight() {
startActivity(Intent(this, DebugMaterialThemeLightActivity::class.java))
}
@OnClick(R.id.debug_test_material_theme_dark)
fun testMaterialThemeDark() {
startActivity(Intent(this, DebugMaterialThemeDarkActivity::class.java))
}
}

View File

@ -0,0 +1,133 @@
/*
* Copyright 2019 New Vector Ltd
*
* 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.
*/
package im.vector.riotredesign.features.debug
import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.coordinatorlayout.widget.CoordinatorLayout
import butterknife.BindView
import butterknife.ButterKnife
import im.vector.riotredesign.R
class TestLinkifyActivity : AppCompatActivity() {
@BindView(R.id.test_linkify_content_view)
lateinit var scrollContent: LinearLayout
@BindView(R.id.test_linkify_coordinator)
lateinit var coordinatorLayout: CoordinatorLayout
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_test_linkify)
ButterKnife.bind(this)
scrollContent.removeAllViews()
listOf(
"https://www.html5rocks.com/en/tutorials/webrtc/basics/ |",
"https://www.html5rocks.com/en/tutorials/webrtc/basics/",
"mailto mailto:test@toto.com test@toto.com",
"Here is the link.www.test.com/foo/?23=35 you got it?",
"www.lemonde.fr",
" /www.lemonde.fr",
"://www.lemonde.fr",
"file:///dev/null ",
" ansible/xoxys.matrix#2c0b65eb",
"foo.ansible/xoxys.matrix#2c0b65eb",
"foo.ansible.fpo/xoxys.matrix#2c0b65eb",
"https://foo.ansible.fpo/xoxys.matrix#2c0b65eb",
"@vf:matrix.org",
"+44 207 123 1234",
"+33141437940",
"1234",
"3456.34,089",
"ksks9808",
"For example: geo:48.85828,2.29449?z=16 should be clickable",
"geo:37.786971,-122.399677;u=35",
"37.786971,-122.399677;u=35",
"48.107864,-1.712153",
"synchrone peut tenir la route la",
"that.is.some.sexy.link",
"test overlap 48.107864,0673728392 geo + pn?",
"test overlap 0673728392,48.107864 geo + pn?",
"If I add a link in brackets like (help for Riot: https://about.riot.im/help), the link is usable on Riot for Desktop",
"(help for Riot: https://about.riot.im/help)",
"http://example.com/test(1).html",
"http://example.com/test(1)",
"https://about.riot.im/help)",
"(http://example.com/test(1))",
"http://example.com/test1)",
"http://example.com/test1/, et ca",
"www.example.com/, et ca",
"foo.ansible.toplevel/xoxys.matrix#2c0b65eb",
"foo.ansible.ninja/xoxys.matrix#2c0b65eb",
"in brackets like (help for Riot: https://www.exemple/com/find(1)) , the link is usable ",
"""
In brackets like (help for Riot: https://about.riot.im/help) , the link is usable,
But you can call +44 207 123 1234 and come to 37.786971,-122.399677;u=35 then
see if this mail jhon@riot.im is active but this should not 12345
""".trimIndent()
)
.forEach { textContent ->
val item = LayoutInflater.from(this)
.inflate(R.layout.item_test_linkify, scrollContent, false)
item.findViewById<TextView>(R.id.test_linkify_auto_text)
?.apply {
text = textContent
/* TODO Use BetterLinkMovementMethod when the other PR is merged
movementMethod = MatrixLinkMovementMethod(object : MockMessageAdapterActionListener() {
override fun onURLClick(uri: Uri?) {
Snackbar.make(coordinatorLayout, "URI Clicked: $uri", Snackbar.LENGTH_LONG)
.setAction("open") {
openUrlInExternalBrowser(this@TestLinkifyActivity, uri)
}
.show()
}
})
*/
}
item.findViewById<TextView>(R.id.test_linkify_custom_text)
?.apply {
text = textContent
/* TODO Use BetterLinkMovementMethod when the other PR is merged
movementMethod = MatrixLinkMovementMethod(object : MockMessageAdapterActionListener() {
override fun onURLClick(uri: Uri?) {
Snackbar.make(coordinatorLayout, "URI Clicked: $uri", Snackbar.LENGTH_LONG)
.setAction("open") {
openUrlInExternalBrowser(this@TestLinkifyActivity, uri)
}
.show()
}
})
*/
// TODO Call VectorLinkify.addLinks(text)
}
scrollContent.addView(item, ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
}
}
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:width="8dp"
android:height="8dp" />
</shape>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="im.vector.riotredesign.features.debug.DebugMenuActivity"
tools:ignore="HardcodedText">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/linear_divider"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="@dimen/layout_horizontal_margin"
android:showDividers="middle">
<com.google.android.material.button.MaterialButton
android:id="@+id/debug_test_text_view_link"
style="@style/VectorButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test linkification" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debug_test_notification"
style="@style/VectorButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Notification" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debug_test_material_theme_light"
style="@style/VectorButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Material theme Light" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debug_test_material_theme_dark"
style="@style/VectorButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test Material theme Dark" />
</LinearLayout>
</ScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/test_linkify_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/riot_secondary_text_color_status"
tools:context="im.vector.riotredesign.features.debug.TestLinkifyActivity">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/test_linkify_content_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Will be removed at runtime -->
<include layout="@layout/item_test_linkify" />
<include layout="@layout/item_test_linkify" />
<include layout="@layout/item_test_linkify" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/debugMaterialCoordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".features.debug.DebugMaterialThemeActivity"
tools:ignore="HardcodedText">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/linear_divider"
android:orientation="vertical"
android:padding="16dp"
android:showDividers="middle">
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:subtitle="Toolbar Subtitle"
app:title="Toolbar Title" />
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="OutlinedBox.Dense">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="FilledBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="FilledBox.Dense">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material Button Classic"
app:icon="@drawable/ic_settings_x" />
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material Button OutlinedButton"
app:icon="@drawable/ic_settings_x" />
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material Button TextButton"
app:icon="@drawable/ic_settings_x" />
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material Button UnelevatedButton"
app:icon="@drawable/ic_settings_x" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debugShowSnackbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show Snackbar" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debugShowToast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show Toast" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debugShowDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show Dialog" />
<com.google.android.material.button.MaterialButton
android:id="@+id/debugShowBottomSheet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Show Bottom Sheet" />
<com.google.android.material.checkbox.MaterialCheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material CheckBox" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Material Switch" />
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="48dp"
android:text="TextView in MaterialCardView" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_settings_x" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/store_title" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/store_whats_new" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/store_short_description" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/store_full_description" />
</LinearLayout>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
The aim of this file is to test the different themes of Riot
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="HardcodedText">
<TextView
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="?colorPrimaryDark"
android:gravity="center_vertical"
android:text="Status Bar" />
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="?colorPrimary"
android:gravity="center_vertical"
android:text="This is a simple text" />
</LinearLayout>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
The aim of this file is to test the different themes of Riot
Unfortunately, this does not work in the preview.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="@style/AppTheme.Light">
<include layout="@layout/demo_theme_sample" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="@style/AppTheme.Dark">
<include layout="@layout/demo_theme_sample" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="@style/AppTheme.Black">
<include layout="@layout/demo_theme_sample" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:theme="@style/AppTheme.Status">
<include layout="@layout/demo_theme_sample" />
</FrameLayout>
</LinearLayout>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
tools:ignore="HardcodedText">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
style="@style/ListHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="AutoLink" />
<TextView
android:id="@+id/test_linkify_auto_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:autoLink="all"
tools:text="www.example.org" />
<TextView
style="@style/ListHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Custom Link" />
<TextView
android:id="@+id/test_linkify_custom_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
tools:text="www.example.org" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="VectorDebug">
<item name="android:visibility">visible</item>
</style>
<style name="VectorMaterialThemeDebugLight" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">#7F7F00</item>
<item name="colorPrimaryVariant">#00FF00</item>
<item name="colorOnPrimary">#0000FF</item>
<item name="colorSecondary">#FF00FF</item>
<item name="colorSecondaryVariant">#00FFFF</item>
<item name="colorOnSecondary">#FFF000</item>
<item name="colorError">#FF0000</item>
<item name="colorOnError">#330033</item>
<item name="colorSurface">#003333</item>
<item name="colorOnSurface">#777777</item>
<item name="android:colorBackground">#FF7777</item>
<item name="colorOnBackground">#077700</item>
<!-- TODO is it still required? -->
<item name="colorAccent">#03b381</item>
<item name="android:statusBarColor">#1188FF</item>
<item name="android:navigationBarColor">#FF8811</item>
</style>
<style name="VectorMaterialThemeDebugDark" parent="Theme.MaterialComponents.NoActionBar">
<item name="colorPrimary">#7F7F00</item>
<item name="colorPrimaryVariant">#00FF00</item>
<item name="colorOnPrimary">#0000FF</item>
<item name="colorSecondary">#FF00FF</item>
<item name="colorSecondaryVariant">#00FFFF</item>
<item name="colorOnSecondary">#FFF000</item>
<item name="colorError">#FF0000</item>
<item name="colorOnError">#330033</item>
<item name="colorSurface">#003333</item>
<item name="colorOnSurface">#777777</item>
<item name="android:colorBackground">#FF7777</item>
<item name="colorOnBackground">#077700</item>
<!-- TODO is it still required? -->
<item name="colorAccent">#03b381</item>
<item name="android:statusBarColor">#1188FF</item>
<item name="android:navigationBarColor">#FF8811</item>
</style>
</resources>