Initial commit
BIN
app/src/main/res/drawable-hdpi/draggable.png
Executable file
|
After Width: | Height: | Size: 690 B |
BIN
app/src/main/res/drawable-hdpi/drawer_shadow.9.png
Executable file
|
After Width: | Height: | Size: 161 B |
BIN
app/src/main/res/drawable-hdpi/ic_drawer.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_launcher.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
app/src/main/res/drawable-mdpi/drawer_shadow.9.png
Executable file
|
After Width: | Height: | Size: 142 B |
BIN
app/src/main/res/drawable-mdpi/ic_drawer.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_launcher.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/drawer_shadow.9.png
Executable file
|
After Width: | Height: | Size: 174 B |
BIN
app/src/main/res/drawable-xhdpi/ic_drawer.png
Executable file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_launcher.png
Executable file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
Executable file
|
After Width: | Height: | Size: 208 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_drawer.png
Executable file
|
After Width: | Height: | Size: 202 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_launcher.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
16
app/src/main/res/layout/activity_edit.xml
Executable file
|
|
@ -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"
|
||||
tools:context="com.ericsson.uecontrol.gui.EditActivity">
|
||||
|
||||
<!--<com.ericsson.uecontrol.gui.util.TouchInterceptor
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" /> -->
|
||||
<com.ericsson.uecontrol.gui.util.DynamicListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
44
app/src/main/res/layout/activity_main.xml
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<fragment android:id="@+id/status_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:name="com.ericsson.uecontrol.gui.fragments.StatusFragment"
|
||||
tools:layout="@layout/fragment_status" />
|
||||
|
||||
<!-- As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions. -->
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- android:layout_gravity="start" tells DrawerLayout to treat
|
||||
this as a sliding drawer on the left side for left-to-right
|
||||
languages and on the right side for right-to-left languages.
|
||||
If you're not building against API 17 or higher, use
|
||||
android:layout_gravity="left" instead. -->
|
||||
<!-- The drawer is given a fixed width in dp and extends the full height of
|
||||
the container. -->
|
||||
<fragment android:id="@+id/navigation_drawer"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:name="com.ericsson.uecontrol.gui.fragments.NavigationDrawerFragment"
|
||||
tools:layout="@layout/fragment_navigation_drawer" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
68
app/src/main/res/layout/behaviour_list_item.xml
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/draggable"
|
||||
android:layout_alignParentTop="true"
|
||||
android:src="@drawable/draggable"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Behaviour name-->
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Title"
|
||||
android:textColor="#040404"
|
||||
android:typeface="sans"
|
||||
android:textSize="17dip"
|
||||
android:textStyle="bold"
|
||||
android:layout_toEndOf="@+id/draggable"
|
||||
android:layout_alignParentTop="true" />
|
||||
|
||||
<!-- Behaviour description -->
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12dip"
|
||||
android:layout_marginTop="1dip"
|
||||
android:text="Description"
|
||||
android:layout_toEndOf="@+id/draggable"/>
|
||||
|
||||
|
||||
<!-- Rightend Arrow -->
|
||||
<ProgressBar
|
||||
android:id="@+id/active"
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/progress"
|
||||
android:layout_below="@+id/description"
|
||||
android:layout_alignParentStart="true"
|
||||
android:visibility="invisible" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
19
app/src/main/res/layout/fragment_item_list.xml
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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"
|
||||
tools:context="com.ericsson.uecontrol.gui.fragments.BehaviourListFragment">
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
|
||||
</FrameLayout>
|
||||
9
app/src/main/res/layout/fragment_navigation_drawer.xml
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<ListView 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:choiceMode="singleChoice"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"
|
||||
android:background="#cccc"
|
||||
tools:context=".NavigationDrawerFragment" />
|
||||
62
app/src/main/res/layout/fragment_status.xml
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/background_dark">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView2"
|
||||
android:src="@android:drawable/stat_sys_download" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="0 Mbits"
|
||||
android:id="@+id/down_speed"
|
||||
android:textColor="#ffffffff"
|
||||
android:typeface="sans"
|
||||
android:layout_weight="0" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.08" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView3"
|
||||
android:src="@android:drawable/stat_sys_upload" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="0 Mbits"
|
||||
android:id="@+id/up_speed"
|
||||
android:textColor="#ffffffff"
|
||||
android:typeface="sans"
|
||||
android:layout_weight="0.45" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/graph"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="horizontal" >
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
9
app/src/main/res/menu/edit.xml
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="com.ericsson.uecontrol.gui.EditActivity" >
|
||||
|
||||
<item android:id="@+id/action_add"
|
||||
android:title="@string/action_add"
|
||||
android:showAsAction="withText|ifRoom" />
|
||||
|
||||
</menu>
|
||||
6
app/src/main/res/menu/global.xml
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never" />
|
||||
</menu>
|
||||
25
app/src/main/res/menu/main.xml
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".MainActivity" >
|
||||
<item android:id="@+id/action_execute"
|
||||
android:title="@string/action_run"
|
||||
android:showAsAction="withText|ifRoom" />
|
||||
|
||||
<item android:id="@+id/action_edit"
|
||||
android:title="@string/action_edit"
|
||||
android:orderInCategory="50"
|
||||
android:showAsAction="never" />
|
||||
<item android:id="@+id/action_import"
|
||||
android:title="@string/action_import"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never" />
|
||||
<item android:id="@+id/action_export"
|
||||
android:title="@string/action_export"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never" />
|
||||
|
||||
<item android:id="@+id/action_settings"
|
||||
android:title="@string/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never" />
|
||||
</menu>
|
||||
6
app/src/main/res/values-w820dp/dimens.xml
Executable file
|
|
@ -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>
|
||||
8
app/src/main/res/values/arrays.xml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="behaviours" >
|
||||
<item>com.ericsson.uecontrol.core.behaviour.UeBehaviourSleep</item>
|
||||
<item>com.ericsson.uecontrol.core.behaviour.UeBehaviourSurfing</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
9
app/src/main/res/values/dimens.xml
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
|
||||
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
|
||||
https://developer.android.com/design/patterns/navigation-drawer.html -->
|
||||
<dimen name="navigation_drawer_width">240dp</dimen>
|
||||
</resources>
|
||||
12
app/src/main/res/values/refs.xml
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
<resources>
|
||||
|
||||
<!--
|
||||
Layout alias to replace the single-pane version of the layout with a
|
||||
two-pane version on Large screens.
|
||||
|
||||
For more on layout aliases, see:
|
||||
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
|
||||
-->
|
||||
<item name="fragment_item" type="layout">@layout/fragment_item_list</item>
|
||||
|
||||
</resources>
|
||||
25
app/src/main/res/values/strings.xml
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">UeControl</string>
|
||||
<string name="title_section1">Section 1</string>
|
||||
<string name="title_section2">Section 2</string>
|
||||
<string name="title_section3">Section 3</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="action_run">Run</string>
|
||||
<string name="action_stop">Stop</string>
|
||||
<string name="action_edit">Edit</string>
|
||||
<string name="action_import">Import</string>
|
||||
<string name="action_export">Export</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="pref_exec_title">Execution Settings</string>
|
||||
<string name="pref_simulate">Simulate</string>
|
||||
<string name="pref_simulate_summ">The execution will be simulated, no actual data will be transferred.</string>
|
||||
<string name="pref_other_title">Other Settings</string>
|
||||
<string name="title_activity_edit">Edit</string>
|
||||
<string name="action_add">Add</string>
|
||||
<string name="select_behaviour">Select Behaviour</string>
|
||||
<string name="configure_behaviour">Configure Behaviour</string>
|
||||
<string name="action_save">Save</string>
|
||||
<string name="action_cancel">Cancel</string>
|
||||
</resources>
|
||||
8
app/src/main/res/values/styles.xml
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
24
app/src/main/res/xml/preferences.xml
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_exec_title"
|
||||
android:key="pref_key_storage_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="simulation"
|
||||
android:title="@string/pref_simulate"
|
||||
android:summary="@string/pref_simulate_summ"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_other_title"
|
||||
android:key="pref_key_storage_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="simulation"
|
||||
android:title="@string/pref_simulate"
|
||||
android:summary="@string/pref_simulate_summ"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||