毕业,证 @微927,0079多伦多大学毕业,证 @微927,0079毕业,证成绩单/留学认证,教育部公证
WEB API service fails with 3g/4g but fine with WIFI.
Hi,
I am developing Xamarin.Forms (PCL) application and I have created separate PCL to consume Web API using HttpClient.
I am able to consume Web API through WIFI but not able to consume with 3g/4g.
Below is sample code.
HttpClient client;
async public Task<List> GetPatientAsync()
{
client = new HttpClient();
client.MaxResponseContentBufferSize = 256000;
List<Patient> responseData;
var uri = new Uri(Constants.PatientUrl);
try
{
var response = await client.GetAsync(uri.AbsoluteUri);
if (response.IsSuccessStatusCode)
{
var jsonString = await response.Content.ReadAsStringAsync();
responseData = JsonConvert.DeserializeObject<List<Patient>>(jsonString);
}
else
{
responseData = new List<Patient>();
}
}
catch (Exception ex)
{
responseData = new List<Patient>();
}
return responseData;
}
Please help.
Thanks
毕业,证 @微927,0079麦马斯特大学毕业,证 @微927,0079毕业,证 @微927,0079,教育部公证
Help Needed with Collection View Grid - rewritten swift project
Hi All, Just wondered if anyone can help I am required to display some grid data in both an iOS app and Android app which I have written. I found the following blog post for the iOS option.
https://github.com/brightec/CustomCollectionViewLayout
which allows a static header and grid view as I need one object per row i.e (titles in the first row and then date, time, name etc etc for each row)
I also looked at the dev express control as an option however my app is not written as a forms app and have never used forms so I have no idea how to implement the control or whether it is suitable as it seems overkill. The grid also needs to be clickable per row to segue to another VC to display the detail.
public class TachRecordsFlowLayout : UICollectionViewLayout
{
int numberOfColumns = 4;
bool shouldPinFirstColumn = true;
bool shouldPinFirstRow = true;
List<List<UICollectionViewLayoutAttributes>> itemAttributes = new List<List<UICollectionViewLayoutAttributes>>();
List<CGSize> itemsSize = new List<CGSize>();
CGSize contentSize = CGSize.Empty;
public TachRecordsFlowLayout()
{
}
public TachRecordsFlowLayout(IntPtr handle) : base(handle)
{
}
public override void PrepareLayout()
{
if (this.CollectionView.NumberOfSections() == 0)
{
return;
}
if (itemAttributes.Count != CollectionView.NumberOfSections())
{
GenerateItemAttributes(CollectionView);
return;
}
for (int section = 0; section < CollectionView.NumberOfSections(); section++)
{
for (int item = 0; item < CollectionView.NumberOfItemsInSection(section); item++) {
if (section != 0 && item != 0) {
continue;
}
var attributes = LayoutAttributesForItem(NSIndexPath.FromItemSection(item, section));
if (section==0) {
var frame = attributes.Frame;
frame.Y = CollectionView.ContentOffset.Y;
attributes.Frame = frame;
}
}
}
}
public override CGSize CollectionViewContentSize
{
get
{
return contentSize;
}
}
public override UICollectionViewLayoutAttributes LayoutAttributesForItem(NSIndexPath indexPath)
{
return itemAttributes[indexPath.Section][indexPath.Row];
}
public override UICollectionViewLayoutAttributes[] LayoutAttributesForElementsInRect(CGRect rect)
{
var attributes = new List<UICollectionViewLayoutAttributes>();
foreach (var section in itemAttributes)
{
var filteredArray = section.Where(obj => rect.IntersectsWith(obj.Frame));
attributes.AddRange(filteredArray);
}
return attributes.ToArray();
}
public override bool ShouldInvalidateLayout(UICollectionViewLayoutAttributes preferredAttributes, UICollectionViewLayoutAttributes originalAttributes)
{
return true;
}
void GenerateItemAttributes(UICollectionView collectionView)
{
if (itemsSize.Count != numberOfColumns)
{
CalculateItemSizes();
}
int column = 0;
nfloat xOffset = 0;
nfloat yOffset = 0;
nfloat contentWidth = 0;
itemAttributes = new List<List<UICollectionViewLayoutAttributes>>();
for (int section = 0; section < collectionView.NumberOfSections(); section++)
{
var sectionAttributes = new List<UICollectionViewLayoutAttributes>();
for (var index = 0; index < numberOfColumns; index++)
{
var itemSize = itemsSize[index];
var indexPath = NSIndexPath.FromItemSection(index, section);
var attributes = UICollectionViewLayoutAttributes.CreateForCell(indexPath);
attributes.Frame = new CGRect(xOffset, yOffset, itemSize.Width, itemSize.Height).Integral();
if (section == 0 && index == 0)
{
// First cell should be on top
attributes.ZIndex = 1024;
}
else if (section == 0 || index == 0)
{
// First row/column should be above other cells
attributes.ZIndex = 1023;
}
if (section == 0)
{
var frame = attributes.Frame;
frame.Y = collectionView.ContentOffset.Y;
attributes.Frame = frame;
}
if (index == 0)
{
var frame = attributes.Frame;
frame.X = collectionView.ContentOffset.X;
attributes.Frame = frame;
}
sectionAttributes.Add(attributes);
xOffset += itemSize.Width;
column += 1;
if (column == numberOfColumns)
{
if (xOffset > contentWidth)
{
contentWidth = xOffset;
}
column = 0;
xOffset = 0;
yOffset += itemSize.Height;
}
}
itemAttributes.Add(sectionAttributes);
}
var lastattributearray = itemAttributes[itemAttributes.Count - 1];
var lastattributes = lastattributearray[lastattributearray.Count - 1];
contentSize = new CGSize(contentWidth, lastattributes.Frame.GetMaxY());
}
void CalculateItemSizes()
{
itemsSize = new List<CGSize>();
for (var index = 0; index < numberOfColumns; index++)
{
itemsSize.Add(SizeForItemWithColumnIndex(index));
}
}
CGSize SizeForItemWithColumnIndex(int columnIndex) {
NSString text;
switch (columnIndex) {
case 0:
text = new NSString("MMM-99");
break;
default:
text = new NSString("Content");
break;
}
var fsize = new nfloat(14.0);
CGSize size = text.StringSize(UIFont.SystemFontOfSize(fsize));
var width = size.Width + 16;
return new CGSize(width, 30);
}
}
How can I increase the font size of the "Tabbed Page" tab?
I was able to display the icon on the tab of "Tabbed Page" using "Font Awesome".
However, I can not change the font size.
First, look at the source you wrote to display the icon.
`
[assembly: ExportRenderer(typeof(TabbedPage), typeof(ContentPageRenderers))]
namespace Social.Droid.Renderers
{
class ContentPageRenderers : TabbedPageRenderer, TabLayout.IOnTabSelectedListener
{
protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
{
base.OnElementChanged(e);
var fieldInfo = typeof(TabbedPageRenderer).GetField("_tabLayout", BindingFlags.Instance | BindingFlags.NonPublic);
var tabs = (TabLayout)fieldInfo.GetValue(this);
changeTabsFont(tabs);
}
private void changeTabsFont(TabLayout tabs)
{
ViewGroup vg = (ViewGroup)tabs.GetChildAt(0);
int tabsCount = vg.ChildCount;
for (int j = 0; j < tabsCount; j++)
{
ViewGroup vgTab = (ViewGroup)vg.GetChildAt(j);
int tabChildsCount = vgTab.ChildCount;
for (int i = 0; i < tabChildsCount; i++)
{
var tabViewChild = vgTab.GetChildAt(i);
if (tabViewChild is TextView)
{
Typeface tf = Typeface.CreateFromAsset(Forms.Context.Assets, "Fonts/FontAwesome.otf");
var child = (TextView)tabViewChild;
child.Typeface = tf;
//child.SetTextSize(ComplexUnitType.Px, 50);
}
}
}
}
}
}
`
Is it wrong with the code commented out with this source?
help me.
Second page does not fully cover previous page (Xamarin Forms)
I'm currently working on Xamarin Forms app. My application works in full screen mode without toolbar. When I move from first to second page, the second page shows properly, but I still see small part of the first page on the top of application.
I added this annotation to MainActivity.cs
tthis.Window.AddFlags(WindowManagerFlags.Fullscreen);
App.xaml.cs:
public App()
{
InitializeComponent();
MainPage = new App3.MainPage();
}
My question is, how can I show only second page on full screen?
I can't attach images becouse i'm new forum user.
找@微927,0079快速优惠购买麦克马斯特大学毕业,证/文,凭毕业,证/成绩单@微927,0079文,凭 它国请详询9200079
找@微927,0079快速优惠购买麦克马斯特大学毕业,证/文,凭毕业,证/成绩单@微927,0079文,凭 它国请详询9200079
Firebase Analytics supports for Xamarin.Forms?
I want to integrate Firebase analytic with the Xamarin.Form application so I wanted to know
Firebase analytics support for Xamarin.forms?
How can I integrate with it?
找@微927,0079快速优惠购买多伦多大学毕业,证/文,凭毕业,证/成绩单@微927,0079文,凭 它国请详询9200079
找@微927,0079快速优惠购买多伦多大学毕业,证/文,凭毕业,证/成绩单@微927,0079文,凭 它国请详询9200079
Which Graphics Library for simple (Poss 3D) drag and drop of objects
At the early stages of scoping a project which is a line of business app that requires a visual interaction element. Think warehousing / storage and we have pallets (boxes /rectangles visually) that need to be quickly moved around a floor plan, colour coded based on contents etc, this is to be done by touch drag and drop, and force press or similar pops up detail on the contents.
Visually I think this would look nicer in 3D, better represents the real world, but 2D floor plan style is feasible, I can sell the client on either. What I'm looking for is which graphics framework would allow me to do this most easily, cross platform, within Xamarin Forms - basically where would you go? Urhosharp, Skiasharp, some other? Or would I be better off doing it the older way and building shared core and 'Native' Xamarin UI applications for iOS and Android.
Am comfortable with all elements other than the graphics side, so don't really have the time scales to go off in the wrong direction. Advice and gotchas appreciated.
Thanks
XLabs Image Button Control Not Displaying Image
Hi I'm using XLabs Image Control , i'm not using any Nuget Package , as i need only that image control I pulled out all classes which are required for Image Button, Everything working fine But Image is Not Displaying ,i 'm using the following link
https://github.com/XLabs/Xamarin-Forms-Labs/wiki/ImageButton
Here i'm Attaching one Sample Project Also,Please Check that
This project type requires Xamarin.Android to be installed help!
After updating, this error appeared
This project type requires Xamarin.Android to be installed help!
After update VS 15.5 can't load MonoAndroidDesignerPackage, any workaround ?
Hello,
after update VS with 15.5 when open VS i catch this error "Can't load MonoAndroidDesignerPackage",
how can resolve this problem ?
Is it possible to restart my app?
I am wondering if it is possible to reset my app from within the app itself (assuming this is not "not recommended").
I am simply wanting to be able to change the language from within the app. Right now the app's language is determined by the system language, but I also want to include the option to change the language that the app uses from within the app. I've managed to do so, but when I updated the CultureInfo, any page that has already rendered still displays the old language. So I am wanting to restart the app after selecting the new language, in order to make sure it is using the correct localized strings for every page.
Otherwise, I will just have to display a message telling the user they will need to manually restart the app to see the changes.
Automation anywhere Vs Automated testing.?
We are looking for automation processes and we read about automation anywhere . We do have regular automated functional testing tool. Why cant we use them in production versus buying huge license product such as automation anywhere ? Writing automation in functional testing tool involves development effort but it heavily reduces license cost versus automation anywhere RPA.
Can someone expertise in automation anywhere please explain how RPA is different in these perspective ?
ExtractSubset with rotation
Hi everyone!
I wanted to ask, is there any way to extract a subset from rotated bitmap(or rotated subset from source bitmap)?
I'm creating an image cropper with image rotation support. I need to crop out the selected area from an image rotated by the user.
All this in xamarin forms.
Accessing Android Asset files and iOS resource files from PCL
I want to avoid having things like API keys hard-coded in variables, and so am going to store them in a file which is read into variables at runtime.
In Android this will be a file under Assets, and in iOS it will be a file under Resources.
Is there a library I can use in the PCL to retrieve an asset from the current OS? I can't remember seeing one!
If not, I've got no problem creating my own simple interface with platform-specific implementations, but don't want to reinvent the wheel.
Using Xamarin.Auth just in the PCL Project
Hey,
is it possible to use Xamarin.Auth only in the Portable Project (= not using a CustomRenderer for the Login Page on each platform)?
I followed some guides but I didn't find the ultimate solution for this
Cheers!
[Xlabs] HybridWebView zoom help on Android
Hi, I need help! I have to allow the zoom at the HybridWebViev into an xamarin application for android. Is possible to enable it without modifying the HybridWebViewRenderer.cs file?
Pricing for using Xamarin and Visual Studio
Hi,
I'm thinking about developing an application for IOS and Android with Xamarin. If I check the pricing it seems to be free of charge for individuals and small companies. Is this really the case? Even if I develop an app with in-app purchase? Or should I pay any fees for using Xamarin and VS and/or when the app will be uploaded to the app store and purchased by users ? Thanks !!