質問編集履歴
4
Xamarin\.Formsの内容追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -45,30 +45,74 @@
|
|
45
45
|
|
46
46
|
###追記
|
47
47
|
回答ありがとうございます。
|
48
|
-
|
48
|
+
Xamarin.Androidの方法ですと、
|
49
|
-
Visual Studioのツールボックスにもそれらしきものが見当たらなかったのですが、外部からダウンロードする必要がありますか?
|
50
49
|
```
|
51
|
-
|
50
|
+
No resource found that matches the given name: attr 'windowNoTitle'.
|
51
|
+
No resource found that matches the given name: attr 'windowActionBar'.
|
52
|
-
|
52
|
+
Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light'.
|
53
|
-
android:orientation="vertical"
|
54
|
-
android:layout_width="match_parent"
|
55
|
-
android:layout_height="match_parent" />
|
56
53
|
```
|
54
|
+
とエラーが表示されてしまい、コード内からクイックアクションやリファクタリングもできず、解決方法がわからなかったので断念しました。
|
55
|
+
Xamarin.Formsではないと使用できないとのことでしたので、Xamarin.Formsで作成しなおしました。
|
56
|
+
エラーは消えましたが、画面はNavigationPage.SetHasNavigationBar(this, false);を入れる前と変わらず、どこにコードを書いてよいかわからない状態です。またxamlファイルがないので、編集部分がわからない状態です。
|
57
57
|
|
58
|
+
現在以下の状態です。手探りですが、エラーが出ない場所にNavigationPage.SetHasNavigationBar(this, false);を入れました。
|
59
|
+
MainActivity.csにはどこに入れても「CS1503 引数 1: は 'XFApp3.Droid.MainActivity' から 'Xamarin.Forms.BindableObject' へ変換することはできません。」
|
60
|
+
と、エラーが出てしまったので編集していません。
|
58
61
|
|
62
|
+
App.cs
|
63
|
+
```
|
64
|
+
using System;
|
65
|
+
using System.Collections.Generic;
|
66
|
+
using System.Linq;
|
67
|
+
using System.Text;
|
59
68
|
|
60
|
-
|
69
|
+
using Xamarin.Forms;
|
61
70
|
|
71
|
+
namespace XFApp3
|
72
|
+
{
|
73
|
+
|
74
|
+
public class App : Application
|
75
|
+
{
|
76
|
+
public App()
|
77
|
+
{
|
78
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
79
|
+
// The root page of your application
|
80
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
81
|
+
MainPage = new ContentPage
|
82
|
+
{
|
83
|
+
|
84
|
+
Content = new StackLayout
|
85
|
+
{
|
86
|
+
VerticalOptions = LayoutOptions.Center,
|
87
|
+
|
88
|
+
Children = {
|
89
|
+
new Label {
|
90
|
+
HorizontalTextAlignment = TextAlignment.Center,
|
91
|
+
Text = "Welcome to Xamarin Forms!"
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
};
|
96
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
97
|
+
}
|
98
|
+
|
99
|
+
protected override void OnStart()
|
100
|
+
{
|
101
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
102
|
+
// Handle when your app starts
|
103
|
+
}
|
104
|
+
|
105
|
+
protected override void OnSleep()
|
106
|
+
{
|
107
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
108
|
+
// Handle when your app sleeps
|
109
|
+
}
|
110
|
+
|
111
|
+
protected override void OnResume()
|
112
|
+
{
|
113
|
+
NavigationPage.SetHasNavigationBar(this, false);
|
114
|
+
// Handle when your app resumes
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
62
|
-
```
|
118
|
+
```
|
63
|
-
<?xml version="1.0" encoding="utf-8"?>
|
64
|
-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
65
|
-
android:orientation="vertical"
|
66
|
-
android:layout_width="match_parent"
|
67
|
-
android:layout_height="match_parent">
|
68
|
-
<NavigationPage
|
69
|
-
android:orientation="vertical"
|
70
|
-
android:layout_width="match_parent"
|
71
|
-
android:layout_height="match_parent" />
|
72
|
-
</LinearLayout>
|
73
|
-
```
|
74
|
-
ですが、エラーが表示されます。
|
3
綴り間違いがあったので修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -65,7 +65,7 @@
|
|
65
65
|
android:orientation="vertical"
|
66
66
|
android:layout_width="match_parent"
|
67
67
|
android:layout_height="match_parent">
|
68
|
-
<
|
68
|
+
<NavigationPage
|
69
69
|
android:orientation="vertical"
|
70
70
|
android:layout_width="match_parent"
|
71
71
|
android:layout_height="match_parent" />
|
2
axmlの内容をの記述が明らかに間違えていたので修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -64,10 +64,11 @@
|
|
64
64
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
65
65
|
android:orientation="vertical"
|
66
66
|
android:layout_width="match_parent"
|
67
|
+
android:layout_height="match_parent">
|
68
|
+
<NavigaionPage
|
69
|
+
android:orientation="vertical"
|
70
|
+
android:layout_width="match_parent"
|
67
|
-
|
71
|
+
android:layout_height="match_parent" />
|
68
|
-
<NavigaionPage xmlns:android="http://schemas.android.com/apk/res/android"
|
69
|
-
|
72
|
+
</LinearLayout>
|
70
|
-
android:layout_width="match_parent"
|
71
|
-
android:layout_height="match_parent" />
|
72
73
|
```
|
73
74
|
ですが、エラーが表示されます。
|
1
axmlの内容と、試したことを追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,4 +40,34 @@
|
|
40
40
|
}
|
41
41
|
|
42
42
|
|
43
|
-
```
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
###追記
|
47
|
+
回答ありがとうございます。
|
48
|
+
現状axmlはこのような形ですが、NavigationPageはどのように加えればよろしいでしょうか?
|
49
|
+
Visual Studioのツールボックスにもそれらしきものが見当たらなかったのですが、外部からダウンロードする必要がありますか?
|
50
|
+
```
|
51
|
+
<?xml version="1.0" encoding="utf-8"?>
|
52
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
53
|
+
android:orientation="vertical"
|
54
|
+
android:layout_width="match_parent"
|
55
|
+
android:layout_height="match_parent" />
|
56
|
+
```
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
現状試したものは
|
61
|
+
|
62
|
+
```
|
63
|
+
<?xml version="1.0" encoding="utf-8"?>
|
64
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
65
|
+
android:orientation="vertical"
|
66
|
+
android:layout_width="match_parent"
|
67
|
+
android:layout_height="match_parent" />
|
68
|
+
<NavigaionPage xmlns:android="http://schemas.android.com/apk/res/android"
|
69
|
+
android:orientation="vertical"
|
70
|
+
android:layout_width="match_parent"
|
71
|
+
android:layout_height="match_parent" />
|
72
|
+
```
|
73
|
+
ですが、エラーが表示されます。
|