- 浏览: 11887 次
最新评论
文章列表
FragmentTabhost记录
- 博客分类:
- Android
<android.support.v4.app.FragmentTabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabWidget
an ...
//public static final String PREFERENCESNAME = "vibrator";
public class Constant {
public static final String CALLBACK = "callme";
public static final String RING = "ring";
public static final String VIBRATOR = "vibrator";
public static final String ...
android.permission.ACCESS_CHECKIN_PROPERTIES
//允许读写访问”properties”表在checkin数据库中,改值可以修改上传
android.permission.ACCESS_COARSE_LOCATION
//允许一个程序访问CellID或WiFi热点来获取粗略的位置
android.permission.ACCESS_FINE_LOCATION
//允许一个程序访问精良位置(如GPS)
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
//允许应用程序 ...
/// 获取电话管理器
tmg = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
sharedPreferences = getSharedPreferences(Constant.PREFERENCESNAME,
MODE_PRIVATE);
/**
* 发送短信
*
* @param incomingNumber
*/
protected void senMsg(String incomingNumber) {
String num = sharedP ...
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;
public class Cont ...
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
import android.widget.ImageView;
public class ImageLoader {
static LruCache<String, Bitmap> cache;
static {
int maxSize = (int) (Runtime.getRuntime().maxMemory() / 8);
cache = new LruCache<String, B ...
package com.example.testpop;
import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View;
import android.webkit.WebView;
import and ...
layout_gravity和gravity
gravity该属性用于控制布局中视图的位置
layout_gravity 是相对与它的父元素说的,说明元素显示在父元素的什么位置。
引用
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andr ...
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTabHost;
import android.view.View;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TabHost.TabSpec;
public class M ...
引用 ListView添加ViewPager listView.addHeaderView(viewPager);
引用viewpager_layout1.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
...