You are using :
[self.navigationController popToRootViewControllerAnimated:TRUE];

pcwiki 發表在 痞客邦 留言(0) 人氣()

如何调整这个模拟器的大小。 command + R  模拟器运行后, 再按 command +1、 command+2、 command+3, 试试看。 你会发现 模拟器的大小发生了变化。

pcwiki 發表在 痞客邦 留言(0) 人氣()

[yourSKView presentScene:nil];
http://stackoverflow.com/questions/21920308/how-to-dismiss-skscene

pcwiki 發表在 痞客邦 留言(0) 人氣()

開始學習IOS開發
會陸續貼上一些學習心得
------------------------
 

pcwiki 發表在 痞客邦 留言(0) 人氣()

下載ndk來用的時候要注意一下,
有分成看作業系統位元來下載的X86-64
然後是看目標裝置的位元來下載X86-64

pcwiki 發表在 痞客邦 留言(0) 人氣()

【圖片:失去版型的 Skype 登入畫面】
http://atelier-wini.blogspot.tw/2013/12/skype-css.html
 
通常是更新 Skype 時發生這問題,目前看到是 Windows 7 使用者會碰上,但應該是任何作業系統都可能發生。
問題畫面擷圖

pcwiki 發表在 痞客邦 留言(1) 人氣()


http://blog.csdn.net/geekwangminli/article/details/8007114
 
  最近公司让做一个地图定位系统,需要将山东省大中城市的经纬度写入到sqlite中,手工逐个写入很不现实,最好的方法是将网上的资料导入到sqlite中,我先将网上下载的资源保存成excel表格,再导入sqlite中,这时发现导入的中文数据都是乱码,原来是由于两个工具之间的编码不同造成的,几经周折,问题终于解决,先列出该步骤,以飨网友。
     

pcwiki 發表在 痞客邦 留言(0) 人氣()

http://stackoverflow.com/questions/689370/java-collections-copy-list-i-dont-understand
若想要複製 collections
那要用下列方法:
List
<String> b =newArrayList<String>(a);

pcwiki 發表在 痞客邦 留言(0) 人氣()

http://uki-kemono.blogspot.tw/2009/07/java-stringgetbytes.html
 
因為放到server上一直出現亂碼,但又不是db和網頁的問題,找了一下是程式中關於getByte()的問題。
 

pcwiki 發表在 痞客邦 留言(0) 人氣()


一:只改变当前程序android屏幕亮度
(1)方法:
lp.screenBrightness 取值 0.0 -- 1.0 ※设定值(float)的范围,默认小于 0(系统设定)、0.0(暗)~1.0(亮) ※调用处理的地方,例如, Activity.onCreate()等等

代码:
WindowManager.LayoutParams lp = getWindow().getAttributes();

lp.screenBrightness = 1.0f;

getWindow().setAttributes(lp);


  注:1、b是一个浮点数 从0~1 ,表示亮度
 
         2、当我们遇到把Activity做为子Activity潜入到TabActivity 或者 ViewGroup 类容器时,通常上面的方法设置无法取得成功。

pcwiki 發表在 痞客邦 留言(0) 人氣()

从Android 2.2开始,加入了一个新的锁屏API位于android.app.admin.DevicePolicyManager包,DevicePolicyManager类的lockNow方法可以锁住屏幕,查看Android源代码发现其实是从IDevicePolicyManager实现的,整个AIDL接口调用代码为:



  1.       private final IDevicePolicyManager mService;


  2.    mService = IDevicePolicyManager.Stub.asInterface(

  3.                 ServiceManager.getService(Context.DEVICE_POLICY_SERVICE));


  4.   if (mService != null) {

  5.             try {

  6.                 mService.lockNow();

  7.             } catch (RemoteException e) {

  8.                 Log.w(TAG, "Failed talking with device policy service", e);

  9.             }

  10.         }


复制代码

pcwiki 發表在 痞客邦 留言(0) 人氣()








http://stackoverflow.com/questions/9561320/android-how-to-turn-screen-on-and-off-programmatically


Before marking this post as a "duplicate", I am writing this post because no other post holds the solution to the problem.


I am trying to turn off the device, then after a few minutes or sensor change, turn it back on.


Turn Off Display Tests


I am able to turn off the screen using:


params.flags |=LayoutParams.FLAG_KEEP_SCREEN_ON;params.screenBrightness =0;
getWindow
().setAttributes(params);

I have been unable to turn off the screen using the wl.release() method.


Turn On Display Test


My first guess, as follows, does not work. Nothing happens, screen remains off.


params.flags |=LayoutParams.FLAG_KEEP_SCREEN_ON;params.screenBrightness =-1f;
getWindow
().setAttributes(params);

I also then tried to use wakelocks, with no success.


PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK,"tag");
wl
.acquire();

Finally I have tried the following, with no result.


getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);

All in all, I don't get any kind of error in the console for any of these methods. My test text "Screen should be on", is on the the screen when I turn on the device using the power button. This shows that the code should have ran. Please only answer if you have tested the code, it seems like many of the functions such as params.screenBrightness = -1, do not work as they should according to the sdk.


Thanks!













share|improve this question










 







pcwiki 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。