任何人都可以用C#解释我这个Java代码,因为我使用Mono for Android?例如,我在Mono for Android中找不到OnGlobalLayoutListener.
在Android上它看起来像这样:
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
int newWidth, newHeight, oldHeight, oldWidth;
//the new width will fit the screen
newWidth = metrics.widthPixels;
//so we can scale proportionally
oldHeight = iv.getDrawable().getIntrinsicHeight();
oldWidth = iv.getDrawable().getIntrinsicWidth();
newHeight = Math.floor((oldHeight * newWidth) / oldWidth);
iv.setLayoutParams(new LinearLayout.LayoutParams(newWidth, newHeight));
iv.setScaleType(ImageView.ScaleType.CENTER_CROP);
//so this only happens once
iv.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
});
Run Code Online (Sandbox Code Playgroud)
什么是Mono for Android等价物?
我在请求访问Addressbook时遇到问题,因为ABAddressbook.Create始终为null.
那么我该如何申请Access?
NSError err = new NSError ();
ABAddressBook ab = ABAddressBook.Create(out err)
ab.RequestAccess (delegate {}); //ab always null
Run Code Online (Sandbox Code Playgroud)
感谢帮助.
有没有办法通过php从子页面获取所有父ID?
...
Page
Page 12
Subpage 21
Subpage 22
CurrentPage 23
Run Code Online (Sandbox Code Playgroud)
想得到12,21
我正在寻找一个解决方案,在默认情况下在新窗口中打开外部菜单链接.(不在目标字段中写入_blank)但是如果不更改网址,网址应该是....../test.html而不是...... www.external-url.co .....
我已经试过了
在typoscript
config.extTarget = _blank
Run Code Online (Sandbox Code Playgroud)
在常数中
styles.content.links.extTarget = _blank
Run Code Online (Sandbox Code Playgroud)
但没有成功.谢谢你的帮助.
c# ×2
typo3 ×2
typoscript ×2
android ×1
extbase ×1
ios ×1
java ×1
php ×1
xamarin ×1
xamarin.ios ×1