Time of Update: 2016-11-13
Android簡單的ListViewDemo及每個控制項的點擊事件,listview控制項點擊事件 main.xml首頁面布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
Time of Update: 2016-11-07
Android 之 Intent(意圖),androidintent意圖 Intent是 Android中重要的橋樑之一,它分為顯式意圖和隱式意圖。接下來分別針對這兩種意圖進行講解。顯式意圖:通過指定一組資料或動作,啟用應用內部的 activity;(相比隱式意圖,此做法更安全)Intent intent = new Intent(); intent.setClass(MainActivity.this,Main2Activity.class);
Time of Update: 2016-11-03
android 自訂控制項——(五)按鈕點擊變色,android控制項----------------------------------按鈕點擊變色(原始碼下有屬性解釋)----------------------------------------------------- 一、shape 樣式:(在drawable建立--》new--》Drawable resource file 在父級標籤selector添加Item ) <?xml version=
Time of Update: 2016-10-29
Popwindow仿右上方菜單,popwindow仿菜單MenuPopwindow: 1 package com.cloudeye.android.cloudeye.view; 2 3 import android.app.Activity; 4 import android.content.Context; 5 import android.graphics.drawable.ColorDrawable; 6 import android.view.LayoutInflater;
Time of Update: 2016-10-27
矽谷新聞5--頂部新聞輪播圖事件處理,矽谷5--重寫dispatchTouchEvent,並且要在按下的時候 getParent().requestDisallowInterceptTouchEvent(true);判斷滑動方向,在X軸和Y軸滑動的絕對值誰大就是在什麼方向滑動一,豎直方向滑動 getParent().requestDisallowInterceptTouchEvent(false);二,水平方向滑動2.1,當滑動到ViewPager的第0個頁面,並且是從左至右滑動
Time of Update: 2016-10-22
Android 手機衛士16--手機殺毒,android16--1.指定動畫一直旋轉rotateAnimation.setRepeatCount(RotateAnimation.INFINITE);android:repeatCount 重複的次數,預設為0,必須是int,可以為-1表示不停止 1 public class AnitVirusActivity extends Activity { 2 protected static final int
Time of Update: 2016-10-22
不帶資料和返回的Activity跳轉,返回activity跳轉public class MainActivity extends Activity { Button bt; Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); context =
Time of Update: 2016-10-11
Android 手機衛士--導航介面2,android衛士本文地址:http://www.cnblogs.com/wuyudong/p/5947504.html,轉載請註明出處。在之前的文章中,實現了導航介面1布局編寫與相關的邏輯代碼,如所示:點擊“下一頁”public class Setup1Activity extends Activity{ @Override protected void onCreate(Bundle
Time of Update: 2016-10-10
Android 手機衛士--導航介面1的布局編寫,android衛士本文地址:http://www.cnblogs.com/wuyudong/p/5943005.html,轉載請註明出處。本文實現導航介面1的布局的實現,效果如所示:首先分析所使用的配置樣式:對應的activity_setup1.xml布局檔案內容如下:<?xml version="1.0" encoding="utf-8"?><LinearLayout
Time of Update: 2016-10-11
Android刷機教程之LG Nexus 5X線刷官方Nexus系列教程,androidnexus鏡像:https://developers.google.com/android/nexus/images 1、開啟手機 設定-關於手機-點擊版本號碼7次,以開啟“開發人員選項”2、返回上一步,開發人員選項-開啟USB 調試3、將手機關機4、同時按住電源鍵&音量減鍵,進入bootloader介面或許 adb reboot
Time of Update: 2016-10-08
抽取的BaseFragment和LoadingPage,basefragment【BaseFragment】:public abstract class BaseFragment extends Fragment { /*★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★*/ private LoadingPage loadingPage; private ViewGroup container; public boolean
Time of Update: 2016-10-08
GridView嵌套在ScrollView裡只有一行的問題,gridviewscrollview遇到這個問題網上找到的解決辦法:方法一:就是上面說的通過計算出來ListView或者GridView中的子列高度和 進行顯示:public void setListViewHeightBasedOnChildren(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if
Time of Update: 2016-10-06
onSaveInstanceState的執行時機,onsaveinstancestate當某個activity變得“容易”被系統銷毀時,該activity的onSaveInstanceState就會被執行,除非該activity是被使用者主動銷毀的,例如當使用者按BACK鍵的時候。 注意上面的雙引號,何為“容易”?言下之意就是該activity還沒有被銷毀,而僅僅是一種可能性。這種可能性有哪些?通過重寫一個activity的所有生命週期的
Time of Update: 2016-09-25
Linux2.6核心協議棧系列--TCP協議2.接收,linux2.6--tcp1.排隊機制接收輸入TCP報文時,有三個隊列:● 待處理隊列● 預排隊隊列● 接收隊列接收隊列包含了處理過的TCP資料區段,也就是說,去除了全部的協議頭,正準備將資料複製到使用者應用程式。接收隊列包含了所有按順序接收的資料區段,在其他兩個隊列中的TCP資料區段則需要進一步處理。TCP報文首先由tcp_v4_rcv()進行處理。該函數要決定是否需要處理報文或者在待處理隊列和預排隊隊列中排隊。/* 傳輸層報文處理入口 *
Time of Update: 2016-09-27
Android
Time of Update: 2016-09-22
android 幀動畫,補間動畫,屬性動畫的簡單總結,android動畫 幀動畫——FrameAnimation 將一系列圖片有序播放,形成動畫的效果。其本質是一個Drawable,是一系列圖片的集合,本身可以當做一個圖片一樣使用 在Drawable檔案夾下,建立animation-list為根節點的資源檔<animation-list android:oneshot="false"> <item android:drawable="
Time of Update: 2016-09-22
Android
Time of Update: 2016-09-22
Android使用MVP時應該注意的問題,android使用mvp注意生命週期:因為Presenter是View建立的,我們需要確保完全地理解View的生命週期,特別是因為它將最有可能去處理狀態更新和非同步資料。舉個例子,每一個Presenter應該在View
Time of Update: 2016-09-21
Android APK的安裝,AndroidAPK安裝開啟packages\apps\PackageInstaller下的資訊清單檔<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.packageinstaller"> <original-
Time of Update: 2016-09-19
Android編程實現表徵圖拖動效果的方法 Android編程實現表徵圖拖動效果的方法 本文執行個體講述了Android編程實現表徵圖拖動效果的方法。分享給大家供大家參考,具體如下: 最近最佳化表徵圖拖動時的速率,稍微有一點點效果,直接把代碼貼出來,有興趣一起討論的朋友可以給我留言。 代碼如下: DragView.java package com.android.dragtest; import