POS-47 Dodano scroll do ekranów historii i z materiałami

This commit is contained in:
Wojciech Przybyła 2021-01-15 15:45:32 +01:00
parent f0e62f261e
commit 925b79e1ca
3 changed files with 34 additions and 8 deletions

View File

@ -37,7 +37,12 @@ namespace Klient.Droid
base.OnCreate(savedInstanceState); base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App()); LoadApplication(new App());
SetContentView(Resource.Layout.ekranStartowy); SetContentView(Resource.Layout.ekranZLinkami);
for (int i = 0; i < 15; i++)
{
// FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].Title + ": " + fullLink[i].Link + "\n\n";
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + "teeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeest \n";
}
} }
[Java.Interop.Export("SignIn")] [Java.Interop.Export("SignIn")]
@ -249,13 +254,14 @@ namespace Klient.Droid
var second_jsonString = await response.Content.ReadAsStringAsync(); var second_jsonString = await response.Content.ReadAsStringAsync();
dynamic second_jsonObject = JsonConvert.DeserializeObject(second_jsonString); dynamic second_jsonObject = JsonConvert.DeserializeObject(second_jsonString);
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonObject); // List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonObject);
int end = 10; int end = 10;
if (fullLink.Count < 10) end = fullLink.Count; //if (fullLink.Count < 10) end = fullLink.Count;
for (int i = 0; i < end; i++) for (int i = 0; i < end; i++)
{ {
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].Title + ": " + fullLink[i].Link + "\n\n"; // FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].Title + ": " + fullLink[i].Link + "\n\n";
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + "teeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeest \n";
} }
} }
else else

View File

@ -25,7 +25,7 @@
android:id="@+id/text3" android:id="@+id/text3"
android:textColor="#ff000000" android:textColor="#ff000000"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true"/>
<TextView <TextView
android:text="Historia wyszukiwań" android:text="Historia wyszukiwań"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
@ -44,6 +44,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/history" android:id="@+id/history"
android:layout_below="@+id/HistoryTitle" android:layout_below="@+id/HistoryTitle"
android:textColor="#ff000000" /> android:textColor="#ff000000"
android:paddingBottom="35dp"
android:focusableInTouchMode="true"
android:isScrollContainer="true"
android:fadeScrollbars="true"
android:scrollbars="vertical"
android:verticalScrollbarPosition="right"
android:scrollIndicators="right"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:textIsSelectable="true"
android:paddingTop="35dp"/>
</RelativeLayout> </RelativeLayout>

View File

@ -27,7 +27,17 @@
android:layout_below="@+id/linkTitle" android:layout_below="@+id/linkTitle"
android:textColor="#ff393939" android:textColor="#ff393939"
android:linksClickable="true" android:linksClickable="true"
android:autoLink="web" /> android:autoLink="web"
android:fadeScrollbars="true"
android:scrollbars="vertical"
android:verticalScrollbarPosition="right"
android:scrollIndicators="right"
android:paddingBottom="35dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:isScrollContainer="true"
android:textIsSelectable="true"
android:focusableInTouchMode="true"
android:paddingTop="35dp" />
<ImageButton <ImageButton
android:src="@drawable/obraz4" android:src="@drawable/obraz4"
android:layout_width="38.5dp" android:layout_width="38.5dp"
@ -47,4 +57,4 @@
android:textColor="#ff000000" android:textColor="#ff000000"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" /> android:layout_centerHorizontal="true" />
</RelativeLayout> </RelativeLayout>