Updated documentation

This commit is contained in:
FalsinSoft 2019-03-06 15:06:39 +01:00
parent f0b215e792
commit 6a129caaae
4 changed files with 34 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -46,6 +46,7 @@
<li><a href="#AdMobInterstitial">AdMobInterstitial</a></li>
<li><a href="#ApkInfo">ApkInfo</a></li>
<li><a href="#Images">Images</a></li>
<li><a href="#Screen">Screen</a></li>
<li><a href="#BatteryState">BatteryState</a></li>
<li><a href="#SignalStrength">SignalStrength</a></li>
</ul>
@ -67,6 +68,7 @@
QTAT_APP_PERMISSIONS \
QTAT_APK_EXPANSION_FILES \
QTAT_APK_INFO \
QTAT_SCREEN \
QTAT_BATTERY_STATE \
QTAT_SIGNAL_STRENGTH \
QTAT_IMAGES \
@ -358,6 +360,25 @@ QtAndroidBatteryState.onCharge</pre>
<p>Both properties support QML value binding than you can assign to a control for show always the updated value as in the demo example.</p>
<img src="images/batterystate1.png">
</div>
<div class="section-txt" id="Screen">
<h3>Screen</h3>
<p>This tool allow to change screen orientation.</p>
<p>Currently there is only one call for change screen orientation as follow:</p>
<pre class="prettyprint">import QtAndroidTools 1.0
QtAndroidScreen.setOrientation(orientaion)</pre>
<p>Possible values are the following:</p>
<ul>
<li>SCREEN_ORIENTATION_LANDSCAPE</li>
<li>SCREEN_ORIENTATION_REVERSE_LANDSCAPE</li>
<li>SCREEN_ORIENTATION_SENSOR_LANDSCAPE</li>
<li>SCREEN_ORIENTATION_PORTRAIT</li>
<li>SCREEN_ORIENTATION_REVERSE_PORTRAIT</li>
<li>SCREEN_ORIENTATION_SENSOR_PORTRAIT</li>
</ul>
<p>Check official Android documentation about behaviour of each value.</p>
<img src="images/screen1.png">
</div>
<div class="section-txt" id="SignalStrength">
<h3>SignalStrength</h3>
<p>This tool allow to monitoring the strength of the phone signal.</p>

View File

@ -19,10 +19,20 @@ Page {
text: "SCREEN_ORIENTATION_LANDSCAPE"
onClicked: QtAndroidScreen.setOrientation(QtAndroidScreen.SCREEN_ORIENTATION_LANDSCAPE)
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "SCREEN_ORIENTATION_REVERSE_LANDSCAPE"
onClicked: QtAndroidScreen.setOrientation(QtAndroidScreen.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "SCREEN_ORIENTATION_PORTRAIT"
onClicked: QtAndroidScreen.setOrientation(QtAndroidScreen.SCREEN_ORIENTATION_PORTRAIT)
}
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: "SCREEN_ORIENTATION_REVERSE_PORTRAIT"
onClicked: QtAndroidScreen.setOrientation(QtAndroidScreen.SCREEN_ORIENTATION_REVERSE_PORTRAIT)
}
}
}

View File

@ -25,6 +25,9 @@ Return info about the apk containing the executed app
**Images**
Allow to retrieve the device albums and images
**Screen**
Allow to change screen orientation
**BatteryState**
Allow monitoring the battery level and state