Fixed about screen

This commit is contained in:
Ziver Koc 2014-07-29 10:27:48 +02:00
parent ba153f5708
commit 433f60dac7
6 changed files with 20 additions and 8 deletions

View file

@ -32,5 +32,5 @@
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View file

@ -2,7 +2,7 @@
<body>
<h1>About</h1>
<hr />
This application was developed by Ziver Koc 2014 at Ericsson AB.
This application was developed by Ziver Koc (Ericsson AB).
<br /><br />
<h3>Attributions:</h3>
<ul>

View file

@ -13,7 +13,7 @@ public class AboutActivity extends Activity{
super.onCreate(savedInstanceState);
WebView view = new WebView(this);
view.loadUrl("file://assets/www/about.html");
view.loadUrl("file:///android_asset/www/about.html");
this.setContentView(view);
}
}

View file

@ -57,8 +57,8 @@ public class MainActivity extends FragmentActivity
currentExecutor = 0;
UeControlExecutor exec = new UeControlExecutor();
exec.addBehaviour(new UeBehaviourSleep(1000));
exec.addBehaviour(new UeBehaviourSurfing("http://google.com"));
exec.addBehaviour(new UeBehaviourSleep());
exec.addBehaviour(new UeBehaviourSurfing());
exec.addBehaviour(new UeBehaviourSleep(4000));
exec.setThroughputListener(statusFragment.getThroughputListener());
executors.add(exec);
@ -70,6 +70,7 @@ public class MainActivity extends FragmentActivity
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction()
.replace(R.id.container, BehaviourListFragment.newInstance(position)).commit();
currentExecutor = position;
}
public void onSectionAttached(int number) {

View file

@ -1,7 +1,9 @@
package com.ericsson.uecontrol.gui;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import com.ericsson.uecontrol.R;
@ -15,6 +17,7 @@ public class SettingsActivity extends Activity {
getFragmentManager().beginTransaction()
.replace(android.R.id.content, new SettingsFragment())
.commit();
}
@ -25,6 +28,15 @@ public class SettingsActivity extends Activity {
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.preferences);
// Setup About intent
Preference aboutPreference = findPreference("about");
aboutPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
public boolean onPreferenceClick(Preference preference) {
startActivity(new Intent(getActivity(), AboutActivity.class));
return true;
}
});
}
}
}

View file

@ -20,12 +20,11 @@
android:title="@string/pref_other_title"
android:key="pref_key_storage_settings">
<PreferenceScreen
<Preference
android:key="about"
android:title="@string/pref_about"
android:defaultValue="false">
<intent android:targetClass="com.ericsson.uecontrol.gui.AboutActivity" />
</PreferenceScreen>
</Preference>
</PreferenceCategory>
</PreferenceScreen>