splash pane with custom loading progressbar; custom pre splash screen for android
This commit is contained in:
parent
b75b374e57
commit
abef1472d8
|
@ -4,6 +4,7 @@
|
||||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
|
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||||
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
||||||
android:label="cwtch"
|
android:label="cwtch"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
android:screenOrientation="unspecified"
|
android:screenOrientation="unspecified"
|
||||||
android:launchMode="singleTop">
|
android:launchMode="singleTop">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
<!-- Messages maps -->
|
<!-- Messages maps -->
|
||||||
|
|
||||||
<!-- Splash screen -->
|
<!-- Splash screen -->
|
||||||
|
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splash"/>
|
||||||
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
|
<!-- meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/logo"/ -->
|
||||||
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
|
<!-- meta-data android:name="android.app.splash_screen_sticky" android:value="true"/ -->
|
||||||
<!-- Splash screen -->
|
<!-- Splash screen -->
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle" >
|
||||||
|
<solid android:color="#FFFFFFFF"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<bitmap android:src="@drawable/cwtch_logo"
|
||||||
|
android:gravity="center" />
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="AppTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
|
||||||
|
<item name="android:windowBackground">@drawable/splash</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
3
qml.qrc
3
qml.qrc
|
@ -12,6 +12,7 @@
|
||||||
<file>qml/panes/OverlayPane.qml</file>
|
<file>qml/panes/OverlayPane.qml</file>
|
||||||
<file>qml/panes/PeerSettingsPane.qml</file>
|
<file>qml/panes/PeerSettingsPane.qml</file>
|
||||||
<file>qml/panes/SettingsPane.qml</file>
|
<file>qml/panes/SettingsPane.qml</file>
|
||||||
|
<file>qml/panes/SplashPane.qml</file>
|
||||||
<file>qml/styles/CwtchComboBoxStyle.qml</file>
|
<file>qml/styles/CwtchComboBoxStyle.qml</file>
|
||||||
<file>qml/styles/CwtchExpandingButton.qml</file>
|
<file>qml/styles/CwtchExpandingButton.qml</file>
|
||||||
<file>qml/styles/CwtchTextAreaStyle.qml</file>
|
<file>qml/styles/CwtchTextAreaStyle.qml</file>
|
||||||
|
@ -34,5 +35,7 @@
|
||||||
<file>i18n/translation_en.qm</file>
|
<file>i18n/translation_en.qm</file>
|
||||||
<file>i18n/translation_fr.qm</file>
|
<file>i18n/translation_fr.qm</file>
|
||||||
<file>i18n/translation_pt.qm</file>
|
<file>i18n/translation_pt.qm</file>
|
||||||
|
<file>qml/images/cwtch_logo.png</file>
|
||||||
|
<file>qml/styles/CwtchProgress.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
22
qml/main.qml
22
qml/main.qml
|
@ -106,6 +106,26 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
StackLayout {
|
||||||
|
id: parentStack
|
||||||
|
currentIndex: 0
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Rectangle { // Splash pane
|
||||||
|
color: "#FFFFFF"
|
||||||
|
//Layout.fillHeight: true
|
||||||
|
//Layout.minimumWidth: Layout.maximumWidth
|
||||||
|
//Layout.minimumHeight: parent.height
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
visible: true
|
||||||
|
|
||||||
|
SplashPane {
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR
|
RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR
|
||||||
/* anchors.left: ratio >= 0.92 ? parent.left : toolbar.right
|
/* anchors.left: ratio >= 0.92 ? parent.left : toolbar.right
|
||||||
anchors.top: ratio >= 0.92 ? toolbar.bottom : parent.top
|
anchors.top: ratio >= 0.92 ? toolbar.bottom : parent.top
|
||||||
|
@ -115,6 +135,7 @@ ApplicationWindow {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS
|
Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS
|
||||||
color: "#D2C0DD"
|
color: "#D2C0DD"
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
@ -167,6 +188,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; target: popup; property: "opacity"; to: 0; }
|
PropertyAnimation { id: anmPopup; easing.type: Easing.InQuart; duration: 7000; target: popup; property: "opacity"; to: 0; }
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.4
|
||||||
|
import QtQuick.Controls.Material 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
import "../styles"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Image {
|
||||||
|
id: splashImage
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
source: "qrc:/qml/images/cwtch_logo.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
ProgressBar {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: splashImage.bottom
|
||||||
|
anchors.topMargin: 10
|
||||||
|
|
||||||
|
indeterminate: true
|
||||||
|
|
||||||
|
style: ProgressBarStyle {
|
||||||
|
progress: CwtchProgress {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.4
|
||||||
|
import QtQuick.Controls.Material 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
border.color: "#D2C0DD"
|
||||||
|
color: "red"
|
||||||
|
|
||||||
|
// Indeterminate animation by animating alternating stripes:
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 1
|
||||||
|
visible: control.indeterminate
|
||||||
|
clip: true
|
||||||
|
Row {
|
||||||
|
Repeater {
|
||||||
|
Rectangle {
|
||||||
|
color: index % 2 ? "#D2C0DD" : "#b29dbe"
|
||||||
|
width: 20 ; height: control.height
|
||||||
|
}
|
||||||
|
model: control.width / 20 + 2
|
||||||
|
}
|
||||||
|
XAnimator on x {
|
||||||
|
from: 0 ; to: -40
|
||||||
|
loops: Animation.Infinite
|
||||||
|
running: parentStack.currentIndex == 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -229,6 +229,7 @@ ColumnLayout {
|
||||||
lblNick.text = _nick
|
lblNick.text = _nick
|
||||||
onion = _onion
|
onion = _onion
|
||||||
image = _image
|
image = _image
|
||||||
|
parentStack.currentIndex = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
onTorStatus: function(code, str) {
|
onTorStatus: function(code, str) {
|
||||||
|
|
Reference in New Issue