摘要: 今天做项目的时候遇到一个问题:当html通过js调用input of type file时候,希望android手机的选择器可以同时出现“相机”和“图片”等,但通过下面代码Intent i = new Intent(Intent.ACTION_GET_CONTENT);i.addCategory... 阅读全文
posted @ 2014-12-02 17:34 ╰→劉じ尛鶴 阅读(216) 评论(0) 推荐(0) 编辑
摘要: public class MyWb extends Activity { /** Called when the activity is first created. */ WebView web; ProgressBar progressBar; private Value... 阅读全文
posted @ 2014-11-27 20:14 ╰→劉じ尛鶴 阅读(3569) 评论(0) 推荐(0) 编辑
摘要: TextView中的超链接点击时,其实是通过Intent方式的,因此会调用Activity中的startActivity(Intent intent)方法,所以可在此方法中做些简单的拦截操作例如拦截Intent.ACTION_VIEW操作@Overridepublic void startActiv... 阅读全文
posted @ 2014-11-25 11:00 ╰→劉じ尛鶴 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 关于收起虚拟键盘,网上能找到的大多是这个:InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);imm.hideSoftInputFromWindow(editText... 阅读全文
posted @ 2014-10-11 16:36 ╰→劉じ尛鶴 阅读(183) 评论(0) 推荐(0) 编辑
摘要: package com.lxh.textview;import android.app.Activity;import android.os.Bundle;import android.view.View;imp... 阅读全文
posted @ 2014-10-08 11:30 ╰→劉じ尛鶴 阅读(177) 评论(0) 推荐(0) 编辑
摘要: ***********************************总结******************************************* * 显示到前台:* MyFragme... 阅读全文
posted @ 2014-09-26 14:22 ╰→劉じ尛鶴 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Reminder reminder = ScheduledActionService.Find("MY REMINDER") as Reminder;if ( reminder != null ) { ScheduledActionService.Remove("MY REMINDER");}... 阅读全文
posted @ 2014-06-27 16:51 ╰→劉じ尛鶴 阅读(176) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Net;using... 阅读全文
posted @ 2014-06-13 18:12 ╰→劉じ尛鶴 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 一、获取某个元素相对另一元素的相对位置1、使用TransformToVisual获取某个元素相对于另外一个元素的偏移量。 例如:要获得rect相对于LayoutRoot的偏移量,就将LayoutRoot作为参数传进去,然后针对0,0这个点做一个transform:Point translate = this.rect.TransformToVisual(this.LayoutRoot).Transform(new Point(0, 0)); 之后就可以在e.ManipulationOrigin的基础上加上这个偏移量了:x += translate.X;y += translate.Y; 在更高 阅读全文
posted @ 2013-08-28 10:11 ╰→劉じ尛鶴 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 通过 ConnectionSettingsType 的设置,可以跳转 到 wifi、蓝牙、飞行模式、以及网络连接其他方案跳转1 private async void Button_Click_1(object sender, RoutedEventArgs e)2 {3 var op = await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-location:"));4 }更多操作可以参加下面链接 http://msdn.microsoft.com/zh-cn/library/windowspho 阅读全文
posted @ 2013-08-16 10:22 ╰→劉じ尛鶴 阅读(1176) 评论(0) 推荐(0) 编辑