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

@ -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;
}
});
}
}
}