mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
add a show-faq menu
This commit is contained in:
parent
92c1180411
commit
87337ba789
3 changed files with 11 additions and 4 deletions
|
@ -319,10 +319,10 @@ public class DelegateBase implements DlgClickNotify,
|
|||
}
|
||||
}
|
||||
|
||||
private void showFaq( String category, String entry )
|
||||
void showFaq( String[] params )
|
||||
{
|
||||
Context context = getActivity();
|
||||
String uri = getString( R.string.faq_uri_fmt, category, entry );
|
||||
String uri = getString( R.string.faq_uri_fmt, params[0], params[1] );
|
||||
NetUtils.launchWebBrowserWith( context, uri );
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ public class DelegateBase implements DlgClickNotify,
|
|||
NetUtils.launchWebBrowserWith( m_activity, R.string.nbs_ban_url );
|
||||
break;
|
||||
case SHOW_FAQ:
|
||||
showFaq( (String)params[0], (String)params[1] );
|
||||
showFaq( (String[])params[0] );
|
||||
break;
|
||||
default:
|
||||
Log.d( TAG, "onPosButton(): unhandled action %s", action.toString() );
|
||||
|
|
|
@ -60,6 +60,7 @@ public class DictBrowseDelegate extends DelegateBase
|
|||
private static final String TAG = DictBrowseDelegate.class.getSimpleName();
|
||||
private static final String DELIM = ".";
|
||||
private static final boolean SHOW_NUM = false;
|
||||
private static final String[] FAQ_PARAMS = {"filters", "intro"};
|
||||
|
||||
private static final String DICT_NAME = "DICT_NAME";
|
||||
private static final String DICT_LOC = "DICT_LOC";
|
||||
|
@ -362,6 +363,9 @@ public class DictBrowseDelegate extends DelegateBase
|
|||
case R.id.dicts_showtiles:
|
||||
showTiles();
|
||||
break;
|
||||
case R.id.dicts_showfaq:
|
||||
showFaq( FAQ_PARAMS );
|
||||
break;
|
||||
default:
|
||||
handled = false;
|
||||
}
|
||||
|
@ -703,7 +707,7 @@ public class DictBrowseDelegate extends DelegateBase
|
|||
m_newAlertShown = true;
|
||||
makeNotAgainBuilder( R.string.new_feature_filter, R.string.key_na_newFeatureFilter )
|
||||
.setActionPair( Action.SHOW_FAQ, R.string.button_faq )
|
||||
.setParams("filters", "intro")
|
||||
.setParams( (Object)FAQ_PARAMS )
|
||||
.setTitle(R.string.new_feature_title)
|
||||
.show();
|
||||
}
|
||||
|
|
|
@ -5,4 +5,7 @@
|
|||
<item android:id="@+id/dicts_showtiles"
|
||||
android:title="@string/show_tiles_menu"
|
||||
/>
|
||||
<item android:id="@+id/dicts_showfaq"
|
||||
android:title="@string/button_faq"
|
||||
/>
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue