MTD issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MTD issue

Paul Johnson
Hi,

I have a MTD controlling the settings for my app but have hit upon a
problem which I don't know if it's me (which is probably) or MTD.

My calling code looks like this

NavigationController.SetNavigationBarHidden(false, true);
NavigationController.Title = StringUtils.GetString("UserSettings.Title");
dvc = new DialogViewController(null);
dvc.View.Frame = new RectangleF(0, 0, AppDelegate.Self.ScreenX,
AppDelegate.Self.ScreenY);

usersettings user = new usersettings(this);
dvc.Root = user.Root;
View.AddSubview(dvc.View);

and my MTD code is this (well, an example of it at least!)

var advancedLog = new
EntryElement(StringUtils.GetString("UserSettings.MTD.Log.Advanced"),
StringUtils.GetString("Common.NotSet"), string.Empty);
var basicLog = new
EntryElement(StringUtils.GetString("UserSettings.MTD.Log.Basic"),
StringUtils.GetString("Common.NotSet"), string.Empty);
var logFunctionSettings = new
Section(StringUtils.GetString("UserSettings.MTD.Log.Message"))
             {
                 advancedLog, basicLog,
             };

var textHigh = new
EntryElement(StringUtils.GetString("UserSettings.MTD.Text.High"),
StringUtils.GetString("Common.NotSet"), string.Empty);
var textMedium = new
EntryElement(StringUtils.GetString("UserSettings.MTD.Text.Medium"),
StringUtils.GetString("Common.NotSet"), string.Empty);
var textLow = new
EntryElement(StringUtils.GetString("UserSettings.MTD.Text.Low"),
StringUtils.GetString("Common.NotSet"), string.Empty);
var textRestrictSettings = new Section("UserSettings.MTD.Text.Message")
             {
                 textHigh, textMedium, textLow,
             };

var mainSettings = new Section()
             {
                 new
RootElement(StringUtils.GetString("UserSettings.MTD.Main.Text"), new
Group("text"))
                 {
                     textRestrictSettings,
                 },
                 new
RootElement(StringUtils.GetString("UserSettings.MTD.Main.Logging"), new
Group("logging"))
                 {
                     logFunctionSettings,
                 },
};

var mainRootElement = new
RootElement(StringUtils.GetString("UserSettings.Title"))
             {
                 mainSettings
             };

Root = mainRootElement;

I can compile and run this without a problem but I've got three issues

1. The string in the RootElement never appears on the navigation bar
2. Both of the sections have some text in the section definition. This
is partially hidden by the navigation bar. If I pull down and release,
it springs back under the nav bar.
3. Clicking on the back button doesn't return me to the initial MTD, but
returns me to the buttons that call the settings

I can't see anything in the Xamarin tutorials that suggest I need to set
the back button to return to the MTD.

Any help or suggestions here would be appreciated - I'm using MTD more
and more and keep hitting these 3 issues.

Thanks

Paul
--
"Voila! In view humble vaudevillian veteran, cast vicariously as both
victim and villain by the vicissitudes of fate. This visage, no mere
veneer of vanity, is a vestige of the “vox populi” now vacant, vanished.
However, this valorous visitation of a bygone vexation stands vivified,
and has vowed to vanquish these venal and virulent vermin, van guarding
vice and vouchsafing the violently vicious and voracious violation of
volition.
The only verdict is vengeance; a vendetta, held as a votive not in vain,
for the value and veracity of such shall one day vindicate the vigilant
and the virtuous.
Verily this vichyssoise of verbiage veers most verbose, so let me simply
add that it’s my very good honour to meet you and you may call me V.."

_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MTD issue

Nic Wise
Hi Paul

have you worked this one out yet? I think I marked it read, then
forgot to come back to it :)

N

On 4 July 2013 12:20, Paul Johnson <[hidden email]> wrote:

> Hi,
>
> I have a MTD controlling the settings for my app but have hit upon a problem
> which I don't know if it's me (which is probably) or MTD.
>
> My calling code looks like this
>
> NavigationController.SetNavigationBarHidden(false, true);
> NavigationController.Title = StringUtils.GetString("UserSettings.Title");
> dvc = new DialogViewController(null);
> dvc.View.Frame = new RectangleF(0, 0, AppDelegate.Self.ScreenX,
> AppDelegate.Self.ScreenY);
>
> usersettings user = new usersettings(this);
> dvc.Root = user.Root;
> View.AddSubview(dvc.View);
>
> and my MTD code is this (well, an example of it at least!)
>
> var advancedLog = new
> EntryElement(StringUtils.GetString("UserSettings.MTD.Log.Advanced"),
> StringUtils.GetString("Common.NotSet"), string.Empty);
> var basicLog = new
> EntryElement(StringUtils.GetString("UserSettings.MTD.Log.Basic"),
> StringUtils.GetString("Common.NotSet"), string.Empty);
> var logFunctionSettings = new
> Section(StringUtils.GetString("UserSettings.MTD.Log.Message"))
>             {
>                 advancedLog, basicLog,
>             };
>
> var textHigh = new
> EntryElement(StringUtils.GetString("UserSettings.MTD.Text.High"),
> StringUtils.GetString("Common.NotSet"), string.Empty);
> var textMedium = new
> EntryElement(StringUtils.GetString("UserSettings.MTD.Text.Medium"),
> StringUtils.GetString("Common.NotSet"), string.Empty);
> var textLow = new
> EntryElement(StringUtils.GetString("UserSettings.MTD.Text.Low"),
> StringUtils.GetString("Common.NotSet"), string.Empty);
> var textRestrictSettings = new Section("UserSettings.MTD.Text.Message")
>             {
>                 textHigh, textMedium, textLow,
>             };
>
> var mainSettings = new Section()
>             {
>                 new
> RootElement(StringUtils.GetString("UserSettings.MTD.Main.Text"), new
> Group("text"))
>                 {
>                     textRestrictSettings,
>                 },
>                 new
> RootElement(StringUtils.GetString("UserSettings.MTD.Main.Logging"), new
> Group("logging"))
>                 {
>                     logFunctionSettings,
>                 },
> };
>
> var mainRootElement = new
> RootElement(StringUtils.GetString("UserSettings.Title"))
>             {
>                 mainSettings
>             };
>
> Root = mainRootElement;
>
> I can compile and run this without a problem but I've got three issues
>
> 1. The string in the RootElement never appears on the navigation bar
> 2. Both of the sections have some text in the section definition. This is
> partially hidden by the navigation bar. If I pull down and release, it
> springs back under the nav bar.
> 3. Clicking on the back button doesn't return me to the initial MTD, but
> returns me to the buttons that call the settings
>
> I can't see anything in the Xamarin tutorials that suggest I need to set the
> back button to return to the MTD.
>
> Any help or suggestions here would be appreciated - I'm using MTD more and
> more and keep hitting these 3 issues.
>
> Thanks
>
> Paul
> --
> "Voila! In view humble vaudevillian veteran, cast vicariously as both victim
> and villain by the vicissitudes of fate. This visage, no mere veneer of
> vanity, is a vestige of the “vox populi” now vacant, vanished. However, this
> valorous visitation of a bygone vexation stands vivified, and has vowed to
> vanquish these venal and virulent vermin, van guarding vice and vouchsafing
> the violently vicious and voracious violation of volition.
> The only verdict is vengeance; a vendetta, held as a votive not in vain, for
> the value and veracity of such shall one day vindicate the vigilant and the
> virtuous.
> Verily this vichyssoise of verbiage veers most verbose, so let me simply add
> that it’s my very good honour to meet you and you may call me V.."
>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MTD issue

efontana
In reply to this post by Paul Johnson
If the string never shows up in the NavBar, did you pass "true" as the 3rd parameter to the constructor
indicating "pushing" ?

I think i remember seeing that.
Loading...