diff options
Diffstat (limited to 'remoteExample/src/main')
15 files changed, 149 insertions, 0 deletions
diff --git a/remoteExample/src/main/AndroidManifest.xml b/remoteExample/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4e922e56 --- /dev/null +++ b/remoteExample/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="de.blinkt.openvpn.remote" > + + <application + android:allowBackup="true" + android:icon="@drawable/ic_launcher2" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name="de.blinkt.openvpn.remote.MainActivity" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> diff --git a/remoteExample/src/main/ic_launcher2-web.png b/remoteExample/src/main/ic_launcher2-web.png Binary files differnew file mode 100644 index 00000000..5c63bc5e --- /dev/null +++ b/remoteExample/src/main/ic_launcher2-web.png diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainActivity.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainActivity.java new file mode 100644 index 00000000..900383a2 --- /dev/null +++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainActivity.java @@ -0,0 +1,51 @@ +package de.blinkt.openvpn.remote; + +import android.app.Activity; +import android.app.ActionBar; +import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.os.Build; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + if (savedInstanceState == null) { + getFragmentManager().beginTransaction() + .add(R.id.container, new MainFragment()) + .commit(); + } + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.main, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_settings) { + return true; + } + return super.onOptionsItemSelected(item); + } + + + +} diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java new file mode 100644 index 00000000..e14d7d3c --- /dev/null +++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java @@ -0,0 +1,17 @@ +package de.blinkt.openvpn.remote; + +import android.app.Activity; +import android.app.Fragment; +import android.os.Bundle; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +public class MainFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + return inflater.inflate(R.layout.fragment_main,container,false); + + } +}
\ No newline at end of file diff --git a/remoteExample/src/main/res/drawable-hdpi/ic_launcher2.png b/remoteExample/src/main/res/drawable-hdpi/ic_launcher2.png Binary files differnew file mode 100644 index 00000000..55621cc1 --- /dev/null +++ b/remoteExample/src/main/res/drawable-hdpi/ic_launcher2.png diff --git a/remoteExample/src/main/res/drawable-mdpi/ic_launcher2.png b/remoteExample/src/main/res/drawable-mdpi/ic_launcher2.png Binary files differnew file mode 100644 index 00000000..11ec2068 --- /dev/null +++ b/remoteExample/src/main/res/drawable-mdpi/ic_launcher2.png diff --git a/remoteExample/src/main/res/drawable-xhdpi/ic_launcher2.png b/remoteExample/src/main/res/drawable-xhdpi/ic_launcher2.png Binary files differnew file mode 100644 index 00000000..7c02b784 --- /dev/null +++ b/remoteExample/src/main/res/drawable-xhdpi/ic_launcher2.png diff --git a/remoteExample/src/main/res/drawable-xxhdpi/ic_launcher2.png b/remoteExample/src/main/res/drawable-xxhdpi/ic_launcher2.png Binary files differnew file mode 100644 index 00000000..915d9144 --- /dev/null +++ b/remoteExample/src/main/res/drawable-xxhdpi/ic_launcher2.png diff --git a/remoteExample/src/main/res/layout/activity_main.xml b/remoteExample/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..42dd4dfb --- /dev/null +++ b/remoteExample/src/main/res/layout/activity_main.xml @@ -0,0 +1,7 @@ +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="de.blinkt.openvpn.remote.MainActivity" + tools:ignore="MergeRootFrame" /> diff --git a/remoteExample/src/main/res/layout/fragment_main.xml b/remoteExample/src/main/res/layout/fragment_main.xml new file mode 100644 index 00000000..fef7793f --- /dev/null +++ b/remoteExample/src/main/res/layout/fragment_main.xml @@ -0,0 +1,16 @@ +<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:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + android:paddingBottom="@dimen/activity_vertical_margin" + tools:context="de.blinkt.openvpn.remote.MainActivity$PlaceholderFragment"> + + <TextView + android:text="@string/hello_world" + android:layout_width="wrap_content" + android:layout_height="wrap_content" /> + +</RelativeLayout> diff --git a/remoteExample/src/main/res/menu/main.xml b/remoteExample/src/main/res/menu/main.xml new file mode 100644 index 00000000..f732c1b4 --- /dev/null +++ b/remoteExample/src/main/res/menu/main.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:context="de.blinkt.openvpn.remote.MainActivity" > + + <item android:id="@+id/action_settings" + android:title="@string/action_settings" + android:orderInCategory="100" + android:showAsAction="never" /> +</menu> diff --git a/remoteExample/src/main/res/values-w820dp/dimens.xml b/remoteExample/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 00000000..63fc8164 --- /dev/null +++ b/remoteExample/src/main/res/values-w820dp/dimens.xml @@ -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> diff --git a/remoteExample/src/main/res/values/dimens.xml b/remoteExample/src/main/res/values/dimens.xml new file mode 100644 index 00000000..a0171a70 --- /dev/null +++ b/remoteExample/src/main/res/values/dimens.xml @@ -0,0 +1,6 @@ +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> + + </resources> diff --git a/remoteExample/src/main/res/values/strings.xml b/remoteExample/src/main/res/values/strings.xml new file mode 100644 index 00000000..c1da58ca --- /dev/null +++ b/remoteExample/src/main/res/values/strings.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">My Module</string> + <string name="hello_world">Hello world!</string> + <string name="action_settings">Settings</string> + +</resources> diff --git a/remoteExample/src/main/res/values/styles.xml b/remoteExample/src/main/res/values/styles.xml new file mode 100644 index 00000000..ff6c9d2c --- /dev/null +++ b/remoteExample/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- Customize your theme here. --> + </style> + +</resources> |