ITeye博客

liangoogle

liangoogle · 共 132 篇文章

android eclipse 安装

从 这个网址下载: h ttp://developer.android.com/sdk/index.html#win-bundle 解压后的eclipse就可以直接使用。 安装svn: help---->install new software,输入网址: http://subclipse.tigris.org/update 选择 subclipse plugin 一个选项,进行安装即可。

2013-10-11 16:22 · 评论(0)

android attr.xml 怎么在主工程中设置library项目中背景或者其他一些属性。

怎么在主工程中设置library项目中背景或者其他一些属性值。 attr.xml :自定义属性。 format值参考: http://huangbo-2020.iteye.com/blog/1477611 1、自定义属性: <resources> <attr name="searchViewCloseIcon" format="reference" /> </resources> <ImageView android:layout_width="wrap_content" android:layout_height="match_parent" android:src="?attr/sear…

2013-04-16 19:38 · android 控件 · 评论(0)

android 中theme.xml与style.xml的区别

android 中theme.xml与style.xml的区别: 相同点: 两者的定义相同。 <resources> <stylename="theme"parent="android:Theme.Black"> <itemname="android:windowNoTitle">true< /item> <itemname="android:textSize">14sp< /item> <itemname="android:textColor">#FFFF0000< /item> < /style> < /resources> 不同点: 一、使用的地方不同 1.theme.xml:对整个应…

2013-04-16 19:03 · android 控件 · activity · 评论(0)

android 键盘 搜索键

想让软键盘上的enter键显示搜索图标: xml中设置: android:imeOptions="actionSearch" android:inputType="text" .java中: mQueryTextView.setImeOptions(EditorInfo.IME_ACTION_SEARCH);//显示搜索图标。 mQueryTextView.setInputType(EditorInfo.TYPE_CLASS_TEXT);

2013-04-15 16:52 · android 控件 · 评论(0)

android activity 自定义标题 工具栏 requestWindowFeature

当应用需要一个相同的标题时或者是工具栏时我们可以使用requestWindowFeature属性: public class AndroidTestActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); …

2013-02-04 17:34 · view · activity · 评论(0)

在一个按钮正下方显示一个popwindow

//这是show一个PopupWindow PopupWindow mPopupWindow; public void showPopupWindow() { LayoutInflater mLayoutInflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); View music_popunwindwow = mLayoutInflater.inflate(R.layout.portal_select_layout, null); ListView portal_select_listView =…

2012-11-06 23:48 · android 控件 · 评论(0)

wp7 HttpWebRequest 网络请求

这是开始网络请求的方法,网络返回在 ResponseCallback 处理****: private void DoHttpWebRequest() { string url = "http://www.cnblogs.com/linzheng"; var request = HttpWebRequest.Create(url);//创建WebRequest类 var result = (IAsyncResult)request.BeginGetResponse(ResponseCallback, request); } 这里处理网络返回流: private void ResponseCal…

2012-05-15 00:04 · window7 · 评论(0)

wp7 WebClient请求

这事一个开始加载url的 方法 ,在 加载 完成时发生 webClient_OpenReadCompleted方法: private void DoWebClient() { WebClient webClient = new WebClient(); webClient.OpenReadAsync(new Uri("http://www.cnblogs.com/linzheng")); webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted); } 这个方法是u…

2012-05-14 23:52 · window7 · 评论(0)

wp7 判断网络是否可用,判断网络状态

判断网络是否可用: true为 有网可用,false为无网可用。 var network = Microsoft.Phone.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(); 判断网络状态: 方法返回网络类型。 public static string GetNetStates() { var info = Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType; switch (info) { case Netwo…

2012-05-10 00:45 · window7 · 评论(0)

app widget 进入主客户端代码。

做widget : 想点击widget一个按钮时就进入客户端,要和点击应用程序的图标效果一样,纠结了很久,得出代码: if (action.equals("Enter")) { Intent i = new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setComponent(new ComponentName("com.yourpakage", "com.yourpakage" + ".WelcomeActivity")); i.putExtra("opentype", OPEN_NAORMA…

2012-04-25 16:56 · android 控件 · view · activity · 页面跳转 intent · 评论(0)

eclipse 提示慢 Alt+/

eclipse Alt+/ 这个快捷键提示慢解决: 下载org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar, 关闭Eclipse, 将它放到:Eclipse\plugins下覆盖同名文件.

2012-04-10 17:46 · eclipse · 评论(0)

acitvitygroup edittext 软盘弹出时 底部菜单挤压到上面的问题

userName = (EditText) layout.findViewById(R.id.username); //TODO 显示软盘 使用EditText的getContext InputMethodManager imm = (InputMethodManager)userName.getContext(). getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);

2012-03-31 17:28 · android 控件 · 评论(0)

widget

1:在清单注册: <receiver android:name="com.youku.widget2.LenovoLeosWidgetDemoWidgetProvider" android:label="@string/app_name" > <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/d…

2012-03-13 14:26 · android 控件 · 评论(0)

wifi 通知栏上 选择程序时出现你的应用

<activity android:configChanges="orientation|keyboardHidden" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:screenOrientation="portrait" android:name="com.wiwigo.app.SplashActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="and…

2012-02-08 10:06 · android 控件 · view · activity · 评论(0)

让软盘消失和出现

在程序中加入以下代码时,软键盘会出现: InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.toggleSoftInput(0, InputMethodManager.RESULT_SHOWN); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas,"Courier New",courier,monospace; background-color: …

2012-02-07 18:28 · android 控件 · view · activity · 评论(0)