diff options
5 files changed, 37 insertions, 1 deletions
diff --git a/android/sdremote/AndroidManifest.xml b/android/sdremote/AndroidManifest.xml index 82bf17eb3930..098345064572 100644 --- a/android/sdremote/AndroidManifest.xml +++ b/android/sdremote/AndroidManifest.xml @@ -78,6 +78,13 @@ <activity android:name=".activity.RequirementsActivity" android:label="@string/title_requirements"> + + <intent-filter> + <action android:name="android.intent.action.VIEW"/> + <data android:scheme="org.libreoffice.impressremote"/> + <category android:name="android.intent.category.DEFAULT"/> + </intent-filter> + </activity> <activity diff --git a/android/sdremote/res/layout/fragment_computers_list.xml b/android/sdremote/res/layout/fragment_computers_list.xml index 03bbbfe44e8f..edc781978dfc 100644 --- a/android/sdremote/res/layout/fragment_computers_list.xml +++ b/android/sdremote/res/layout/fragment_computers_list.xml @@ -48,6 +48,15 @@ android:layout_width="match_parent" android:layout_height="wrap_content"/> + <TextView + android:id="@+id/text_learn_more" + android:text="@string/message_learn_more" + android:layout_gravity="center_horizontal" + android:visibility="invisible" + android:paddingTop="@dimen/padding_vertical_learn_more" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + </LinearLayout> <ListView diff --git a/android/sdremote/res/values/dimens.xml b/android/sdremote/res/values/dimens.xml index 7e761757f90d..82013fb011ef 100644 --- a/android/sdremote/res/values/dimens.xml +++ b/android/sdremote/res/values/dimens.xml @@ -44,6 +44,7 @@ <dimen name="padding_vertical_error_message">12dp</dimen> <dimen name="padding_vertical_edit">8dp</dimen> <dimen name="padding_vertical_progress_message">8dp</dimen> + <dimen name="padding_vertical_learn_more">4dp</dimen> <dimen name="margin_vertical_action_bar_divider">12dp</dimen> <dimen name="margin_slide">8dp</dimen> diff --git a/android/sdremote/res/values/strings.xml b/android/sdremote/res/values/strings.xml index fb31b46978e8..4ec816af049b 100644 --- a/android/sdremote/res/values/strings.xml +++ b/android/sdremote/res/values/strings.xml @@ -59,9 +59,9 @@ <string name="message_time_is_up">Time is up!</string> <string name="message_search_wifi">Make sure LibreOffice is running on a computer on the same WiFi network.</string> <string name="message_search_bluetooth">Make sure LibreOffice is running on a computer with Bluetooth enabled.</string> + <string name="message_learn_more"><a href="org.libreoffice.impressremote://requirements/">Learn more</a></string> <string name="message_paused">Paused</string> <string name="message_notes_empty">Nothing here.</string> - <string name="hint_ip_address">IP address</string> <string name="hint_name">Name (optional)</string> diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java index 5527ea4d61c4..19657cd0f09b 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java @@ -23,7 +23,10 @@ import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.support.v4.content.LocalBroadcastManager; +import android.text.Html; import android.text.TextUtils; +import android.text.method.LinkMovementMethod; +import android.text.util.Linkify; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.View; @@ -107,6 +110,7 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo if (aProgressMessageDisplayed) { showProgressMessage(); + showLearnMoreMessage(); } } @@ -124,6 +128,20 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo return (TextView) getView().findViewById(R.id.text_progress_message); } + private void showLearnMoreMessage() { + TextView learnMoreView = getLearnMoreView(); + Animation aFadeInAnimation = AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in); + + learnMoreView.setMovementMethod(LinkMovementMethod.getInstance()); + + learnMoreView.startAnimation(aFadeInAnimation); + learnMoreView.setVisibility(View.VISIBLE); + } + + private TextView getLearnMoreView() { + return (TextView) getView().findViewById(R.id.text_learn_more); + } + private String getProgressMessage() { switch (getType()) { case WIFI: @@ -238,6 +256,7 @@ public class ComputersFragment extends SherlockListFragment implements ServiceCo } showProgressMessage(); + showLearnMoreMessage(); } private boolean isShowingProgressMessageRequired() { |