ITeye博客

AndLi

AndLi · 共 228 篇文章

OptionsMenu源码(弹出式菜单)

// 菜单----------------------------------------------------------- public boolean onCreateOptionsMenu(Menu menu) { menu.add(0, Menu.FIRST + 1, 0, "显示所有图层").setIcon( android.R.drawable.ic_menu_mapmode); menu.add(0, Menu.FIRST + 2, 1, "图层管理").setIcon( android.R.drawable.ic_menu_manage); return super.on…

2011-12-27 10:19 · Menu · 评论(0)

GISDemo

111111111111111111 public class Demo extends Activity { public static final String INTENT_QUERY = "cn.hotgis.QueryUI"; public static final String INTENT_RESULT = "cn.hotgis.RESULTUI"; public static final String INTENT_STEP3 = "com.novoda.STEP3"; private static final int QUERY = 1; private static fi…

2011-12-27 09:24 · GIS · 评论(0)

MyApplication的配置:否则缓存为空

<application android:icon="@drawable/ic_launcher" android:name=".MyApplication" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".MainView" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.categ…

2011-12-26 23:58 · UI设计 · 评论(0)

拖动界面设计参考

111111111111111111111111

2011-12-26 16:44 · UI设计 · 评论(0)

自定义透明对话框

效果展示: 遇到的问题: 程序刚开始运行的时候背景是透明的,但是运行一段时间以后,背景就默认变成drawable中的第一个图片了。 解决方法: 如何进行半透明设置: 首先设置对话框布局文件的背景为半透明: android:background="#e0000000" 然后设置透明度: // 设置背景透明度 customdialog2view.getBackground().setAlpha(20); 布局文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.…

2011-12-26 09:28 · Dialog · 评论(0)

设置界面设计

如何获得用户名的值呢: // 获得配置参数:用户名 final String userName = PreferenceManager.getDefaultSharedPreferences( this).getString("user_name", null); AndoridManifest.xml <activity android:name=".view.setting.SetView" > <intent-filter > <action android:name="android.intent.action.VIEW" /> <category android:name="and…

2011-12-25 21:45 · UI设计 · 评论(0)

天天动听UI——主界面

11111111111111111111111111111

2011-12-24 20:13 · UI设计 · 评论(0)

按键事件

// 按钮事件------------------------------------------------------ public boolean onKeyDown(int keyCode, KeyEvent event) { // 按下搜索键 if (keyCode == KeyEvent.KEYCODE_SEARCH) { mainListView.setSelection(1); PurpleEntry entry = (PurpleEntry) mainListView.getAdapter() .getItem(1); entry.getListener().perform…

2011-12-24 13:54 · 评论(0)

秒表StopWatch

11111111111111111111

2011-12-23 18:18 · Time · 评论(0)

GIS地图制作

111111111111111111111111111111

2011-12-23 12:33 · GIS · 评论(0)

Chronometer定时器

public class ChronometerView extends Activity implements OnClickListener { private int startTime = 0; Chronometer chronometer; EditText edtSetTime; Button btnStart; Button btnStop; Button btnRest; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R…

2011-12-22 21:28 · Time · 评论(1)

TabHost的样式

111111111111111111111111111111111111111

2011-12-22 21:13 · TabHost · 评论(0)

ListView_Syncpic 以异步形式加载图片

ListView形式预览图片:以异步形式加载图片

2011-12-22 20:55 · ListView · 评论(0)

ListView_HS 实现水平+垂直双向滚动

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" …

2011-12-22 20:47 · ListView · 评论(0)

GIS常用方法总结

// 记录下当前地图的屏幕中心点 eMyPoint2D centerPoint = new eMyPoint2D(mapWnd.getWidth() / 2, mapWnd.getHeight() / 2); // 获得GridNo图层 eMyLayer gridNoLayer2 = mapWnd.GetMap().GetLayerByName("GridNo"); // 物理坐标 eMyPoint2D myPoint2D = new eMyPoint2D(px, py); 查询一个点所在GridNo图层某个区域的GRIDNO的值 // 查询myPoint2D这个点附近100个单位的对象 e…

2011-12-22 10:52 · GIS · 评论(0)