Skip to content

Commit

Permalink
Move EcoClient to demo-gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
om26er committed May 7, 2017
1 parent ce07c01 commit 3134127
Show file tree
Hide file tree
Showing 34 changed files with 144 additions and 198 deletions.
1 change: 0 additions & 1 deletion Autobahn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ dependencies {
compile 'org.codehaus.jackson:jackson-core-asl:1.9.7'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.7'
}

2 changes: 1 addition & 1 deletion Autobahn/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="de.tavendo.autobahn">
<application
android:allowBackup="true"
android:label="Sample App"
android:label="Autobahn Android"
android:supportsRtl="true">
</application>
</manifest>
10 changes: 0 additions & 10 deletions Demo/EchoClient/.classpath

This file was deleted.

3 changes: 0 additions & 3 deletions Demo/EchoClient/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions Demo/EchoClient/.project

This file was deleted.

19 changes: 0 additions & 19 deletions Demo/EchoClient/AndroidManifest.xml

This file was deleted.

30 changes: 0 additions & 30 deletions Demo/EchoClient/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions Demo/EchoClient/pom.xml

This file was deleted.

40 changes: 0 additions & 40 deletions Demo/EchoClient/proguard.cfg

This file was deleted.

15 changes: 0 additions & 15 deletions Demo/EchoClient/project.properties

This file was deleted.

Binary file removed Demo/EchoClient/res/drawable-hdpi/icon.png
Binary file not shown.
Binary file removed Demo/EchoClient/res/drawable-ldpi/icon.png
Binary file not shown.
Binary file removed Demo/EchoClient/res/drawable-mdpi/icon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions Demo/EchoClient/res/values/strings.xml

This file was deleted.

1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ allprojects {
jcenter()
}
}

1 change: 1 addition & 0 deletions demo-gallery/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
28 changes: 28 additions & 0 deletions demo-gallery/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/ASL2.0'
}

defaultConfig {
minSdkVersion 10
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
return true
}

dependencies {
compile project(path: ':Autobahn')
compile 'com.android.support:appcompat-v7:25.3.1'
}
24 changes: 24 additions & 0 deletions demo-gallery/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.tavendo.autobahn.demogallery">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:label">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".EchoClientActivity"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
******************************************************************************/

package de.tavendo.autobahn.echoclient;
package de.tavendo.autobahn.demogallery;

import android.app.Activity;
import android.content.SharedPreferences;
Expand Down Expand Up @@ -128,7 +128,6 @@ public void onClose(int code, String reason) {
}
});
} catch (WebSocketException e) {

Log.d(TAG, e.toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package de.tavendo.autobahn.demogallery;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button buttonWebSocketGallery = (Button) findViewById(R.id.button_websocket_gallery);
Button buttonWAMPGallery = (Button) findViewById(R.id.button_wamp_gallery);
buttonWebSocketGallery.setOnClickListener(this);
buttonWAMPGallery.setOnClickListener(this);
}

@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.button_websocket_gallery:
startActivity(new Intent(getApplicationContext(), EchoClientActivity.class));
break;
case R.id.button_wamp_gallery:
// Need to open the WAMP demo gallery browser.
break;
}
}
}
25 changes: 25 additions & 0 deletions demo-gallery/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity">

<Button
android:id="@+id/button_websocket_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/button_text_websocket_gallery"/>

<Button
android:id="@+id/button_wamp_gallery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/button_websocket_gallery"
android:text="@string/button_text_wamp_gallery"/>
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="@color/lightgrey" android:text="Message to echo"></TextView>
<EditText android:id="@+id/msg" android:layout_width="match_parent" android:textColor="@color/darkgrey" android:text="Hello, world!" android:maxLines="1" android:layout_height="wrap_content"></EditText>
<Button android:layout_width="120dip" android:layout_gravity="center" android:layout_height="80dip" android:layout_margin="16dip" android:id="@+id/sendMsg" android:bufferType="editable" android:text="Send"></Button>
</LinearLayout>
</LinearLayout>
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions demo-gallery/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="autobahn">#028ec9</color>
<color name="lightgrey">#cccccc</color>
<color name="darkgrey">#333333</color>
Expand Down
5 changes: 5 additions & 0 deletions demo-gallery/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
5 changes: 5 additions & 0 deletions demo-gallery/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<string name="app_name">Autobahn Demo Gallery</string>
<string name="button_text_websocket_gallery">WebSocket Gallery</string>
<string name="button_text_wamp_gallery">WAMP Gallery</string>
</resources>
11 changes: 11 additions & 0 deletions demo-gallery/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>

</resources>
Loading

0 comments on commit 3134127

Please sign in to comment.