当前位置:  编程技术>移动开发
本页文章导读:
    ▪ListView例证        ListView例子 例子一:public class ListActivity extends android.app.ListActivity{ /** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Li.........
    ▪ Visibility不足见设置        Visibility不可见设置 ((ProgressBar)findViewById(R.id.progressBar1)).setVisibility(View.VISIBLE) ......
    ▪ jlibrtp 有关资料       jlibrtp 相关资料 The jlibrtp package contains the core classes of jlibrtp. Most of these classes are protected or private, developers looking to use jlibrtp should only concern themselves with RTPSession - the main session object Participant - .........

[1]ListView例证
    来源: 互联网  发布时间: 2014-02-18
ListView例子
例子一:
public class ListActivity extends android.app.ListActivity{
    /** Called when the activity is first created. */
      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        List<Map<String,String>> list = new ArrayList<Map<String,String>>();
        Map<String,String> map1 = new HashMap<String,String>();
        Map<String,String> map2 = new HashMap<String,String>();
        map1.put("name", "zhangsan");
        map1.put("ip", "0.1");
        map2.put("name", "lisi");
        map2.put("ip", "0.2");
        list.add(map1);
        list.add(map2);
        SimpleAdapter sa = new SimpleAdapter(this, list, R.layout.user, new String[]{"name","ip"}, new int[]{R.id.user_id,R.id.user_ip});
        setListAdapter(sa);
      }
}

编写一个user.xml在/res/layout中
<?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="horizontal">
    <TextView android:layout_height="wrap_content" android:id="@+id/user_id" android:layout_width="wrap_content" android:text="TextView" android:layout_weight="1"></TextView>
	<TextView android:layout_height="wrap_content" android:id="@+id/user_ip" android:layout_width="wrap_content" android:text="TextView" android:layout_weight="1"></TextView>
</LinearLayout>


例子二:
public class HelloListView extends ListActivity  {
	static final String[] COUNTRIES = new String[] {
	    "Afghanistan", "Albania", "Algeria", "American Samoa"
	  };
    public void onCreate(Bundle savedInstanceState) {
    	super.onCreate(savedInstanceState);
    	  setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, COUNTRIES));
    	  ListView lv = getListView();
    	  lv.setTextFilterEnabled(true);
    	  lv.setOnItemClickListener(new OnItemClickListener() {
    	    public void onItemClick(AdapterView<?> parent, View view,
    	        int position, long id) {
    	      Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
    	          Toast.LENGTH_SHORT).show();
    	    }
    	  });
     }
}

编写list_item.xml在/res/layout中
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    android:textSize="16sp" >
</TextView>


例子三:
public class ListViewActivity extends ListActivity {
      public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String[] countries = getResources().getStringArray(R.array.countries_array);
        setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, countries));
        ListView lv = getListView();
        lv.setTextFilterEnabled(true);
      }
}

编写list_item.xml在/res/layout中
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    android:textSize="16sp" >
</TextView>

编写strings.xml在/res/values中
<string-array name="countries_array">
        <item>Bahrain</item>
        <item>Bangladesh</item>
        <item>Barbados</item>
        <item>Belarus</item>
        <item>Belgium</item>
        <item>Belize</item>
        <item>Benin</item>
</string-array>

    
[2] Visibility不足见设置
    来源: 互联网  发布时间: 2014-02-18
Visibility不可见设置
((ProgressBar)findViewById(R.id.progressBar1)).setVisibility(View.VISIBLE)

    
[3] jlibrtp 有关资料
    来源: 互联网  发布时间: 2014-02-18
jlibrtp 相关资料

The jlibrtp package contains the core classes of jlibrtp. Most of these classes are protected or private, developers looking to use jlibrtp should only concern themselves with

  • RTPSession - the main session object
  • Participant - participant objects
  • DataFrame - the containers in which data is returned
  • RTPAppIntf - the mininum callback interface
  • RTPCAppIntf - optional interface for receing RTCP packets
  • RTCPAVPFIntf - optional interface for RTP with feedback
  • DebugAppIntf - optional interface for debugging

DebugAppIntf is great for checking network problems and keeping track of packets. If you need extensive debugging you should statically change the debug values in RTPSession.java and pay attention to the standard output.

 

 

项目HOST

http://sourceforge.net/projects/jlibrtp/

 

android port by hsc

http://www.hsc.com/tabid/87/ctl/Display/ID/22/mid/637/Default.aspx

 

介绍

http://www.powershow.com/view/15e732-MGM2Y/jlibrtp_RTP_Java_Library_flash_ppt_presentation


    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3