解决方案 »
- 关于用Eclipse搭建Android平台的问题-错误提示PANIC: Could not open
- 在使用GPS定位时,如何获取定位的精确度
- 截屏
- 推荐几款性价比比较高的双核智能机?
- 请问这是什么文件?该怎么解析?是调用新浪API返回来的数据
- 网络图片写进文件
- 麻烦牛人看看,我这程序在虚拟机上正常运行,在真机上就出问题了,下载TOMCAT的某资源。
- [color=#FF99CC]应用里使用百度地图,但百度地图显示和反应太慢了,怎么办[/color]
- 广州谷歌开发者社区DevFest2014
- 【求助】我从网上粘了一段代码,imageview缩放和平移的,在模拟器里可以运行(反应及其缓慢,还时不时的报无响应),但在手机上一打开就闪退。
- 如何美化android app
- SAXReader解析xml抛异常
import android.os.Binder;
import android.os.RemoteException;
import android.os.IBinder;
import android.os.ServiceManager;
import android.util.Slog;
import android.view.View;import com.android.internal.statusbar.IStatusBarService;/**
* Allows an app to control the status bar.
*
* @hide
*/
public class StatusBarManager {这是类的源码,看上去是@hide 隐藏的。所以直接写就ok了,如果eclipse报错,就需要使用命令生成apk
* Allows an app to control the status bar.
*
* @hide
*/打了Hide注解,就是不允许外面直接调用。可以在源码环境下编译或者用反射,或者把编译好的classes.jar包放到eclipse的buildpath。
Object service = getSystemService("statusbar");
if (service != null) {
Method expand = service.getClass().getMethod("expandNotificationsPanel");
expand.invoke(service);
}
} catch (Exception e) {
e.printStackTrace();
}