translate activity window titles

This commit is contained in:
Eric House 2014-04-14 08:10:49 -07:00
parent 7f48783fb2
commit f0b5584e38
2 changed files with 10 additions and 0 deletions

View file

@ -43,6 +43,7 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
m_activity = activity;
m_delegate = new DlgDelegate( activity, this, bundle );
m_optionsMenuID = optionsMenu;
LocUtils.xlateTitle( activity );
}
public boolean onCreateOptionsMenu( Menu menu )

View file

@ -86,6 +86,15 @@ public class LocUtils {
return view;
}
public static void xlateTitle( Activity activity )
{
String title = activity.getTitle().toString();
String xlated = xlateString( activity, title );
if ( ! title.equals(xlated) ) {
activity.setTitle( xlated );
}
}
public static void xlateView( Activity activity )
{
xlateView( activity, Utils.getContentView( activity ) );