当前位置:  编程技术>移动开发
本页文章导读:
    ▪让EditText下部出现可以快速选择的ListView布局        让EditText下面出现可以快速选择的ListView布局 效果图     <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" > <include android:id="@+id/pt.........
    ▪ 使用类别扩展方法编译静态库.a后不可用的有关问题        使用类别扩展方法编译静态库.a后不可用的问题 http://developer.apple.com/library/mac/#qa/qa1490/_index.html   A: Why do I get a runtime exception of "selector not recognized" when linking against an Objective-C static library that.........
    ▪ http 链接超时跟读取超时       http 链接超时和读取超时 链接超时: 多长时间内,无法建立Socket,中断链接。 读取超时: http链接发送请求,读取对方的反馈,有时候会长时间读到不到对方的反馈。这个时间是设置多长.........

[1]让EditText下部出现可以快速选择的ListView布局
    来源: 互联网  发布时间: 2014-02-18
让EditText下面出现可以快速选择的ListView布局

效果图

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     >

    <include
        android:id="@+id/ptas_top_bar"
        layout="@layout/ptas_top_bar" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1.0"
        android:orientation="vertical" >

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1.0"
            android:orientation="vertical" >

            <include
                android:id="@+id/ptas_common_map"
                layout="@layout/common_map" />

            <LinearLayout
                android:id="@+id/navigation_bar"
                android:layout_width="fill_parent"
                android:layout_height="55dip"
                android:layout_alignParentTop="true"
                android:background="@drawable/txt_msg_bg"
                android:orientation="horizontal"
                android:paddingRight="7.0dip" >

                <RelativeLayout
                    android:id="@+id/main_app_nagv"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_toLeftOf="@+id/main_app_nagv_btn"
                    android:layout_weight="1.0"
                    android:orientation="horizontal" >

                    <AutoCompleteTextView
                        android:id="@+id/main_app_nagv_text"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginBottom="5.0dip"
                        android:layout_marginLeft="3.0dip"
                        android:layout_marginRight="5.0dip"
                        android:layout_marginTop="5.0dip"
                        android:autoText="true"
                        android:background="@drawable/sms_embeded_text_editor_bg"
                        android:capitalize="sentences"
                        android:focusable="true"
                        android:hint="@string/navigation_textview_hint"
                        android:imeOptions="actionSend|flagNoEnterAction"
                        android:inputType="phone"
                        android:maxLength="50"
                        android:maxLines="1"
                        android:minHeight="34.0dip"
                        android:nextFocusRight="@+id/main_app_nagv_btn"
                        android:textColorHint="@color/search_hint" />

                    <ImageView
                        android:id="@+id/main_app_contact_sel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignBottom="@+id/main_app_nagv_text"
                        android:layout_alignRight="@+id/main_app_nagv_text"
                        android:layout_alignTop="@+id/main_app_nagv_text"
                        android:layout_marginRight="1.0dip"
                        android:background="@drawable/ptas_contact_select" />
                </RelativeLayout>

                <Button
                    android:id="@+id/main_app_nagv_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:background="@drawable/smsdetail_send_button_bg"
                    android:gravity="center"
                    android:paddingLeft="11.0dip"
                    android:paddingRight="11.0dip" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/contact_content_list"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/navigation_bar"
                android:orientation="horizontal"
                android:paddingRight="7.0dip"
                android:visibility="gone" >

                <RelativeLayout
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="30dip"
                    android:layout_toLeftOf="@+id/main_app_nagv_btn_1"
                    android:layout_weight="1.0"
                    android:orientation="vertical" >

                    <TextView
                        android:id="@+id/receiver_empty"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:textSize="25sp"
                        android:visibility="gone" />

                    <ListView
                        android:id="@+id/common_list_view"
                        
                        android:layout_width="wrap_content"
                        android:layout_height="fill_parent"
                        android:layout_weight="1.0"
                        android:cacheColorHint="#00000000"
                        android:transcriptMode="normal" />

                    <com.wxlh.ptas.ui.rapid.RapidView
                        android:id="@+id/letterList"
                        android:layout_width="25dip"
                        android:layout_height="fill_parent"
                        android:layout_alignParentRight="true"
                        android:background="@drawable/scroller_bg" />
                </RelativeLayout>

                <Button
                    android:id="@+id/main_app_nagv_btn_1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:background="@drawable/smsdetail_send_button_bg"
                    android:gravity="center"
                    android:paddingLeft="11.0dip"
                    android:paddingRight="11.0dip"
                    android:visibility="invisible" />
            </LinearLayout>
        </RelativeLayout>
    </LinearLayout>

</LinearLayout>

 思路:让左边和右边都有一个Button,在ListView所在的Button上采用Invisible的形式,让布局不要变形

 


    
[2] 使用类别扩展方法编译静态库.a后不可用的有关问题
    来源: 互联网  发布时间: 2014-02-18
使用类别扩展方法编译静态库.a后不可用的问题

http://developer.apple.com/library/mac/#qa/qa1490/_index.html

 

A: Why do I get a runtime exception of "selector not recognized" when linking against an Objective-C static library that contains categories?

The "selector not recognized" runtime exception occurs due to an issue between the implementation of standard UNIX static libraries, the linker and the dynamic nature of Objective-C. Objective-C does not define linker symbols for each function (or method, in Objective-C) - instead, linker symbols are only generated for each class. If you extend a pre-existing class with categories, the linker does not know to associate the object code of the core class implementation and the category implementation. This prevents objects created in the resulting application from responding to a selector that is defined in the category.

To resolve this issue, the target linking against the static library must pass the -ObjC option to the linker. This flag causes the linker to load every object file in the library that defines an Objective-C class or category. While this option will typically result in a larger executable (due to additional object code loaded into the application), it will allow the successful creation of effective Objective-C static libraries that contain categories on existing classes. Follow these steps to pass -ObjC to the linker:

  • In Xcode, double-click the target's name under "Targets" in the Project window.

  • Choose the Build pane from the ensuing Info window.

  • Scroll down to the Other Linker Flags build setting under the Linking collection and set its value to -ObjC.

  • Figure 1  Target Build pane: Other Linker Flags

    Important For 64-bit and iPhone OS applications, there is a linker bug that prevents -ObjC from loading objects files from static libraries that contain only categories and no classes. The workaround is to use the-all_load or -force_load flags.

     

    -all_load forces the linker to load all object files from every archive it sees, even those without Objective-C code. -force_load is available in Xcode 3.2 and later. It allows finer grain control of archive loading. Each -force_load option must be followed by a path to an archive, and every object file in that archive will be loaded.


    Document Revision History
    Date Notes 2010-04-30

    Describes how to pass the "-ObjC" option to the linker. Updated for Mac OS X v10.6 and later.

    2006-10-03

    Changed "and" to "an" in order to make the content correct.

    2006-09-25

    New document that describes how to properly build Objective-C static libraries that contain categories on existing classes.



        
    [3] http 链接超时跟读取超时
        来源: 互联网  发布时间: 2014-02-18
    http 链接超时和读取超时

    链接超时:

    多长时间内,无法建立Socket,中断链接。

    读取超时:

    http链接发送请求,读取对方的反馈,有时候会长时间读到不到对方的反馈。这个时间是设置多长时间读取不到对方的反馈,中断链接。


        
    最新技术文章:
    ▪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添加多个可点击的文本
    php开源软件 iis7站长之家
    ▪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