C_B*_*C_B 3 android android-alertdialog
我读过很多像这样的问题,但似乎都没有解决我的问题.
问题在于:
AlertScreen ad = new AlertScreen(SensorListenerService.this);
Run Code Online (Sandbox Code Playgroud)
在我的服务类中:
public class SensorListener extends Service implements SensorEventListener {
public int onStartCommand(Intent intent, int flags, int startId) {
startForeground(Process.myPid(), new Notification());
AlertScreen ad = new AlertScreen(SensorListener.this); //problem
ad.show();
return START_STICKY;
}
...
Run Code Online (Sandbox Code Playgroud)
它调用我的AlertScreen类:
public class AlertScreen extends AlertDialog {
public AlertScreen(Context context) {
super(context);
}
...
Run Code Online (Sandbox Code Playgroud)
LogCat有什么要说的:

谁能解释一下这个问题呢?
| 归档时间: |
|
| 查看次数: |
5839 次 |
| 最近记录: |