Skip to content

Commit

Permalink
Version 1.0.0.52-rc: Small UI Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
developerfromjokela committed Jan 29, 2020
1 parent 5910354 commit 55637ad
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 60 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
def versionMajor = 1
def versionMinor = 0
def versionPatch = 0
def versionBuild = 51 // 0-50=Alpha / 51-98=RC / 90-99=stable
def versionBuild = 52 // 0-50=Alpha / 51-98=RC / 90-99=stable
android {
compileSdkVersion 28
defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static String getCurrentWifiBSSID(Context context) {
ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (networkInfo.isConnected()) {
final WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
final WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
final WifiInfo connectionInfo = wifiManager.getConnectionInfo();
if (connectionInfo != null && !StringUtil.isBlank(connectionInfo.getBSSID())) {
bSSID = connectionInfo.getBSSID();
Expand All @@ -116,7 +116,7 @@ public static int getCurrentWifiNetworkId(Context context) {
ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (networkInfo.isConnected()) {
final WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
final WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
final WifiInfo connectionInfo = wifiManager.getConnectionInfo();
if (connectionInfo != null) {
networkId = connectionInfo.getNetworkId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ protected CameraImage doInBackground(String... urls) {
e.printStackTrace();
return new CameraImage(false, e.getMessage());
}
return null;
return new CameraImage(false, "Got no image from motionEye");

}

Expand Down
10 changes: 3 additions & 7 deletions app/src/main/res/layout/activity_full_camera_viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activities.FullCameraViewer"
android:animateLayoutChanges="true"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical">


android:gravity="start"
android:orientation="vertical"
tools:context=".ui.activities.FullCameraViewer">

<LinearLayout
android:id="@+id/progressBar"
Expand Down Expand Up @@ -224,7 +221,6 @@
</LinearLayout>

</RelativeLayout>

</LinearLayout>


99 changes: 50 additions & 49 deletions app/src/main/res/layout/camera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,67 +16,68 @@
-->


<android.support.v7.widget.CardView android:id="@+id/itemCard"
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v7.widget.CardView 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"
app:cardElevation="6dp"
android:id="@+id/itemCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_margin="10dp"
app:cardElevation="6dp">

<LinearLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:orientation="vertical">

<ImageView
android:id="@+id/cameraImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:orientation="vertical">
android:layout_height="300dp"
android:scaleType="fitCenter"
android:visibility="gone"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />

<ImageView
android:id="@+id/cameraImage"
android:layout_width="match_parent"
android:layout_height="300dp"
android:scaleType="fitCenter"
android:visibility="gone"
tools:srcCompat="@tools:sample/backgrounds/scenic[5]" />
<LinearLayout
android:id="@+id/cameraBar"
android:layout_width="match_parent"
android:layout_height="300dp"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"
android:visibility="visible">

<LinearLayout
android:id="@+id/cameraBar"
<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical"
android:visibility="visible">

<TextView
android:id="@+id/status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center_vertical"
android:text="@string/loading"
android:textSize="24sp"
android:visibility="visible" />
android:text="@string/loading"
android:textSize="24sp"
android:visibility="visible" />

<ProgressBar
android:id="@+id/progressar"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<Button
android:id="@+id/tryagain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/try_again"
android:visibility="gone" />

</LinearLayout>
<ProgressBar
android:id="@+id/progressar"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/fps"
<Button
android:id="@+id/tryagain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="0 fps"
android:textSize="18sp" />
android:text="@string/try_again"
android:visibility="gone" />

</LinearLayout>
</android.support.v7.widget.CardView>

<TextView
android:id="@+id/fps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:text="0 fps"
android:textSize="18sp" />

</LinearLayout>
</android.support.v7.widget.CardView>

0 comments on commit 55637ad

Please sign in to comment.