Add "learn more" link for providing additional information.
Change-Id: I3bb3480491d5f92ed7c4e3e6b5cf233636c4bb64
This commit is contained in:
parent
2e605fcb12
commit
16c53fb6aa
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user