summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-09-01 18:39:47 +0300
committerArtur Dryomov <artur.dryomov@gmail.com>2013-09-03 12:22:46 +0300
commit920370f7d89a6f310c3e98457ed844425de09392 (patch)
tree3e01b683057718118a1fb8755dc82b612802226d /android
parentChange time of intents filter reginstration. (diff)
downloadcore-920370f7d89a6f310c3e98457ed844425de09392.tar.gz
core-920370f7d89a6f310c3e98457ed844425de09392.zip
Add computer name as a subtitle to the connection activity.
Change-Id: I3df33faef2004107cd2a806e536efb63517a18c7
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
index 377f596d13f5..7a5281da08f4 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/activity/ComputerConnectionActivity.java
@@ -24,6 +24,7 @@ public class ComputerConnectionActivity extends SherlockFragmentActivity {
super.onCreate(savedInstanceState);
setUpHomeButton();
+ setUpTitle();
setUpFragment();
}
@@ -31,17 +32,23 @@ public class ComputerConnectionActivity extends SherlockFragmentActivity {
getSupportActionBar().setHomeButtonEnabled(true);
}
- private void setUpFragment() {
- Server aComputer = extractReceivedComputer();
- Fragment aFragment = ComputerConnectionFragment.newInstance(aComputer);
+ private void setUpTitle() {
+ String aComputerName = extractReceivedComputer().getName();
- FragmentOperator.addFragment(this, aFragment);
+ getSupportActionBar().setSubtitle(aComputerName);
}
private Server extractReceivedComputer() {
return getIntent().getParcelableExtra(Intents.Extras.SERVER);
}
+ private void setUpFragment() {
+ Server aComputer = extractReceivedComputer();
+ Fragment aFragment = ComputerConnectionFragment.newInstance(aComputer);
+
+ FragmentOperator.addFragment(this, aFragment);
+ }
+
@Override
public boolean onOptionsItemSelected(MenuItem aMenuItem) {
switch (aMenuItem.getItemId()) {