我有一个UIViewController
包含a 的顶级UITableView
.顶级UIViewController
实例化a NavigationController
,并将另一个推UIViewController
送到NavigationController
.IE我们推进了新的第二种观点.第二个视图在左上角有通常的"后退"按钮,允许您导航回顶层视图.
当从第二个视图导航回顶层视图时,是否有可能UITableView
使用在第二个视图中生成的数据重新绘制顶层视图,通过调用cellForRowAtIndexPath
顶层,如果是,那么如何执行此操作?
给定配置文件,是否有人知道如何确定该配置文件中的UDID?
Android是否可以为ListView设置搜索栏,以便在触摸搜索栏时弹出键盘,当在搜索栏中输入文本时,会显示ListView中匹配的项目?
我真正需要的是带有键盘的搜索栏.
更新:
我添加了EditText字段,它会调出一个键盘,我可以输入EditText字段.我想要的是让ListView中显示的列表中项目的前几个字符与EditText窗口中输入的字符相匹配.
我试过按照ListView Filter中列出的方法尝试,但是我对ListView中已经完成了多少过滤有点困惑?
1)我是否需要创建一个单独的数组来存储与EditText中键入的文本相匹配的值?从这篇文章调用adapter.notifyDataSetChanged,看来ListView已经有一个shadow数组来执行此操作,并在adapter.notifyDataSetChanged(); 叫做.
2)我是否需要调用adapter.notifyDataSetChanged(); 在EditText窗口中键入一些文本后更新ListView?
3)我是否需要扩展ListActivity,如此帖所示?如果是这样,如果活动类已经从主活动扩展,我该如何扩展我的活动类?
4)我目前拥有以下内容:
ArrayAdapter<String> adapter = null;
private EditText filterText = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.symptom);
ListView symptomList = (ListView) findViewById(R.id.ListView_Symptom);
symptomList.setTextFilterEnabled(true);
symptomList.setFastScrollEnabled(true);
filterText = (EditText) findViewById(R.id.search_box);
filterText.addTextChangedListener(filterTextWatcher);
adapter = new ArrayAdapter<String>(this, R.layout.menu_item, symptomsArray);
symptomList.setAdapter(adapter);
private TextWatcher filterTextWatcher = new TextWatcher() {
public void afterTextChanged(Editable s) {
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
}
public …
Run Code Online (Sandbox Code Playgroud) 我使用startActivity调用另一个Activity,我得到"Activity Not Found Exception".这是我的代码:
TextView textView = (TextView) itemClicked;
String strText = textView.getText().toString();
String key = "symptom";
Intent mIntent = new Intent(symptomActivity.this, symptomRemedyActivity.class);
Bundle mBundle = new Bundle();
mBundle.putString(key, strText);
mIntent.putExtras(mBundle);
startActivity(mIntent);
Run Code Online (Sandbox Code Playgroud)
这是Logcat输出:
INFO/ActivityManager(59): Displayed activity com.android.homeopathy/.HomeopathyActivity: 5542 ms (total 39089 ms)
INFO/ARMAssembler(59): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x3283e0:0x3284ec] in 627000 ns
INFO/ActivityManager(59): Starting activity: Intent { cmp=com.android.homeopathy/.symptomActivity }
INFO/ActivityManager(59): Displayed activity com.android.homeopathy/.symptomActivity: 2706 ms (total 2706 ms)
INFO/ActivityManager(59): Starting activity: Intent { cmp=com.android.homeopathy/.symptomRemedyActivity (has extras) } …
Run Code Online (Sandbox Code Playgroud) 当我尝试使用UIAutomation在设备上捕获UI输入时,它会挂起"开始捕获".
1) I click on Profile in Xcode which
2) Starts up Instruments where I select Automation and click Profile
3) Which starts Instruments running. In Scripts I select Add->Create which shows the record button at the bottom
4) I click the record button and it hangs saying "Starting Capture" and doesn't record my UI input.
Run Code Online (Sandbox Code Playgroud)
我的Profile方案的Build Configuration是Debug.
知道我错过了什么导致UIAutomation挂起?
我正在设置ArrayAdapter,我收到以下错误:
Thread [<1> main] (Suspended (exception NullPointerException))
ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 355
ArrayAdapter.getView(int, View, ViewGroup) line: 323
ListView(AbsListView).obtainView(int, boolean[]) line: 1294
ListView.measureHeightOfChildren(int, int, int, int, int) line: 1198
Run Code Online (Sandbox Code Playgroud)
my symptomremedyActivity.java看起来像:
setContentView(R.layout.symptomremedy);
ListView remedyList = (ListView) findViewById(R.id.ListView_SymptomRemedy);
remedyList.setTextFilterEnabled(true);
ArrayAdapter<String> adapt = new ArrayAdapter<String>(this, R.layout.menu_item, remedyArray);
remedyList.setAdapter(adapt);
Run Code Online (Sandbox Code Playgroud)
我的symptomremedy.xml布局如下所示:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="@+id/Button_BACK"
android:layout_width="wrap_content"
android:layout_height="@dimen/menu_button_height"
android:layout_alignTop="@+id/Button_BACK"
android:layout_below="@+id/ImageView_MenuHeader"
android:textSize="@dimen/menu_button_text_size"
android:text="@string/back"></Button>
<ListView
android:layout_height="wrap_content"
android:id="@+id/ListView_SymptomRemedy"
android:layout_width="fill_parent"
android:background="@color/menu_white"
android:divider="@drawable/straight_divider"
android:listSelector="@drawable/textured"
android:layout_alignParentTop="true"></ListView>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
和menu_item.xml布局如下所示:
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:textSize="@dimen/menu_item_size"
android:text="test string"
android:textColor="@color/menu_black"
android:layout_height="fill_parent"
/> …
Run Code Online (Sandbox Code Playgroud) 我在使用AppleScript将文件夹复制到XCode项目时遇到了一些麻烦.没有Applescript我将文件夹拖入Xcode.
我使用了类似的Applescript处理程序,如下所示,使用"wrapper.library"将库复制到XCode中作为文件类型.下面我使用"wrapper.folder"尝试将文件夹复制到XCode中,但它无法正常工作.
on addFolder(fname, fpath)
tell application "Xcode"
tell project "Unity-iPhone"
set my_targets to targets
set s_target to item 1 of my_targets
set compile_phase to compile sources phase of s_target
set link_phase to get link binary with libraries phase of s_target
tell root group
set a to make new file reference with properties {full path:fpath & fname, name:fname, file type:"wrapper.folder"}
add a to link_phase
end tell
end tell
end tell
end addFolder
Run Code Online (Sandbox Code Playgroud)
有没有人对我遗失的内容或如何编写Applescript以将文件夹复制到XCode有任何想法?
有没有人有任何代码用于按字母顺序排列Unicode中的阿拉伯语和日语文本?如果代码在ruby中会很棒.
是否有可能在ListView的右侧有一个索引?这可以在iPhone上向右下方显示字母表.触摸字母表上的字母会将一个字母带到ListView中以该字母开头的项目的开头.
Android中是否有内置代码用于此功能?或者这是一个必须定制的东西?
我正在尝试将我的Android应用上传到Google Play市场并收到错误消息:
the apk must be signed with the same certificates as the previous version
Run Code Online (Sandbox Code Playgroud)
有趣的是我使用原始密钥和原始密码,所以我对可能导致此问题的原因感到困惑.
1)我确实将我的Mac OS X升级到了Lion,而我认为早期的32位操作系统是64位操作系统.这可能是问题吗?
2)在制作这个新的应用程序版本之前,我确实更新了Android工具:Eclipse,SDK和Java.这可能是问题吗?
3)我也试过跑步
jarsigner -verify -verbose -certs
Run Code Online (Sandbox Code Playgroud)
在Google Play上的旧版应用程序和新应用程序以及证书有效时间相同.
4)我手动创建了新的APK,并在Eclipse中使用Export Android Application.
5)手动我在Eclipse中使用`创建了APK
Android Tools -> Export Unsigned Application and then using
jarsigner -verbose -keystore mykeystore.keystore app.apk companyName
/Developer/android-sdk-mac_86/tools/zipalign -v 4 app.apk app_aligned.apk
Run Code Online (Sandbox Code Playgroud)
所以我认为问题不在于我使用的是错误的密钥库.我读过这个问题也可能是由于
A)尝试上传调试apk而不是发布apk.
B)清单中包含错误的包名称.
C)不增加versionCode和versionName.
除了使用错误的梯形校正之外还有其他可能导致此问题的事情吗?
android ×5
iphone ×3
xcode ×2
applescript ×1
code-signing ×1
eclipse ×1
google-play ×1
instruments ×1
ios ×1
jarsigner ×1
keytool ×1
navigation ×1
objective-c ×1
ruby ×1
sorting ×1
udid ×1
unicode ×1