Commit 180eba7a authored by Antek Grzanka's avatar Antek Grzanka

ui fixes

parent 086b4224
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<application <application
android:name=".PeepersApplication" android:name=".PeepersApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher_peepers" android:icon="@drawable/ic_launcher_perspektiva"
android:label="@string/app_name"> android:label="@string/app_name">
<activity <activity
android:name=".StreamCameraActivity" android:name=".StreamCameraActivity"
......
...@@ -2,6 +2,8 @@ package com.foxdogstudios.peepers; ...@@ -2,6 +2,8 @@ package com.foxdogstudios.peepers;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
...@@ -30,6 +32,8 @@ public class MainActivity extends Activity { ...@@ -30,6 +32,8 @@ public class MainActivity extends Activity {
myIp = tryGetIpV4Address(); myIp = tryGetIpV4Address();
myIpView = (TextView) findViewById(R.id.my_ip); myIpView = (TextView) findViewById(R.id.my_ip);
myIpView.setText(myIp); myIpView.setText(myIp);
myIpView.setTextColor(Color.parseColor("#000000"));
mEdit.setRawInputType(Configuration.KEYBOARD_12KEY);
} }
@Override @Override
......
...@@ -41,6 +41,7 @@ import android.view.View; ...@@ -41,6 +41,7 @@ import android.view.View;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
...@@ -78,6 +79,7 @@ public final class StreamCameraActivity extends Activity ...@@ -78,6 +79,7 @@ public final class StreamCameraActivity extends Activity
private WebView myWebView = null; private WebView myWebView = null;
private String clientAddressIp = ""; private String clientAddressIp = "";
private Button webViewButton = null; private Button webViewButton = null;
private ImageView howTo = null;
public StreamCameraActivity() public StreamCameraActivity()
{ {
...@@ -103,6 +105,8 @@ public final class StreamCameraActivity extends Activity ...@@ -103,6 +105,8 @@ public final class StreamCameraActivity extends Activity
mIpAddress = (String) b.get("myIp"); mIpAddress = (String) b.get("myIp");
updatePrefCacheAndUi(); updatePrefCacheAndUi();
howTo = (ImageView) findViewById(R.id.how_to);
final PowerManager powerManager = final PowerManager powerManager =
(PowerManager) getSystemService(POWER_SERVICE); (PowerManager) getSystemService(POWER_SERVICE);
mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK,
...@@ -297,6 +301,7 @@ public final class StreamCameraActivity extends Activity ...@@ -297,6 +301,7 @@ public final class StreamCameraActivity extends Activity
public void showWebView(View myView){ public void showWebView(View myView){
webViewButton.setVisibility(View.INVISIBLE); webViewButton.setVisibility(View.INVISIBLE);
howTo.setVisibility(View.INVISIBLE);
String mDescText = "<head>\n" + String mDescText = "<head>\n" +
"\n" + "\n" +
"</head>\n" + "</head>\n" +
......
...@@ -4,28 +4,40 @@ ...@@ -4,28 +4,40 @@
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.foxdogstudios.peepers.MainActivity"> tools:context="com.foxdogstudios.peepers.MainActivity"
android:id="@+id/rel_lay"
android:background="@drawable/perspektiva_bg">
<EditText <EditText
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/input_address" android:id="@+id/input_address"
android:text="192.168.43.116" android:text="192.168.43.116"
android:layout_alignEnd="@+id/go_to_view" /> android:layout_above="@+id/go_to_view"
android:textColor="#000000"
android:layout_alignParentEnd="true" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/my_ip_is"
android:textColor="#000000"
android:layout_alignParentEnd="true"
android:text="Your IP is:"/>
<TextView <TextView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/my_ip" android:id="@+id/my_ip"
android:layout_below="@+id/input_address" android:layout_below="@+id/my_ip_is"
android:color="#FFFFFF"/> android:layout_alignParentEnd="true" />
<Button <Button
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id='@+id/go_to_view' android:id='@+id/go_to_view'
android:onClick="startView" android:onClick="startView"
android:text="Dupa" android:text="START STREAMING"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"/> android:layout_alignParentEnd="true"/>
......
...@@ -45,6 +45,14 @@ ...@@ -45,6 +45,14 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
/> />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/how_to"
android:src="@drawable/how_to"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
</RelativeLayout> </RelativeLayout>
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
limitations under the License. limitations under the License.
--> -->
<resources> <resources>
<string name="app_name">Peepers</string> <string name="app_name">Perspektiva</string>
<string name="settings">Settings</string> <string name="settings">Settings</string>
<string name="title_activity_main">MainActivity</string> <string name="title_activity_main">Perspektiva</string>
<string name="hello_world">Hello world!</string> <string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment