我在Facebook SDK for Android中使用AppInvite对话.问题是AppInvite发送给的最终用户/朋友,没有收到推送通知.虽然通知出现在Facebook Native App的"Notification Globe"和"App Invites"部分.用户没有安装App.Applink网址工作正常.
该应用程序正在生产模式下运行,也已将用户添加为TestUsers.
问题只是PushNotification没有显示给用户,尽管在'Notification Globe'中有一个条目可以请有人帮忙.
我在屏幕上有两个视图寻呼机.一个ViewPager使用JakeWharton的circleindicator,第二个使用TabPage Indicator.我需要使用异步调用从后端下载数据.一旦数据下载,我应该在viewpagers中显示数据.这是我的活动的代码片段.
ViewPager pager1;
ViewPager pager2;
public onCreate(){
//I Set Up ContentView
//Locate ViewPagers & Indicators
//pager1 = ...
//pager2= ...
//Locate Indicators
CallAsyncTask().execute();
}
private class CallAsyncTask extends AsynTask{
doinbackground(){
//Download Data
}
onPostExecute(){
displayData();
}
}
private displayData(){
// Set Up Adapters & Indicators for ViewPagers
}
Run Code Online (Sandbox Code Playgroud)
当我执行此代码时,我得到ViewPager Not Bound Exception.是否有解决方案.我认为 解决方法是在AsyncTask的onPostExecute()方法中设置setUpContentView.但是我还需要显示progressBars直到下载数据.我怎样才能实现这一切.
我想打印一个页面的DIV内容.我做的是使用JS检索div的内容并将其传递给我调用.print()的新窗口obj.文本内容和图像显示为这样.就在我将这一行添加到检索到的div内容时
<link href="myprintstyle.css" rel="stylesheet" type="text/css">
Run Code Online (Sandbox Code Playgroud)
打印预览为空白.我尝试添加其他样式表,结果相同.无论我添加什么样式表参考打印html内容,相同的结果-blank预览页面.这是我的JS代码打印页面内容.
var printDivCSS = new String ('<link href="myprintstyle.css" rel="stylesheet" type="text/css">');
function Popup(htmldata)
{
var mywindow = window.open('test', 'eChallanReceipt', 'height=800,width=800,top=20;left=20');
var str ="<html><head><title>test</title>";
str+= "</head><body>"+ printDivCSS + htmldata+"</body></html>";
mywindow.document.write(str);
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10
mywindow.print();
mywindow.close();
return false;
}
Run Code Online (Sandbox Code Playgroud)
请建议一些修复.我想要打印内容的样式.浏览器:Chrome
相同的代码在Mozilla中运行.但在Chrome中我正面临着这个问题.