假设我在rails应用程序中有3个表:
发票
id | customer_id | employee_id | notes
---------------------------------------------------------------
1 | 1 | 5 | An order with 2 items.
2 | 12 | 5 | An order with 1 item.
3 | 17 | 12 | An empty order.
4 | 17 | 12 | A brand new order.
Run Code Online (Sandbox Code Playgroud)
invoice_items
id | invoice_id | price | name
---------------------------------------------------------
1 | 1 | 5.35 | widget
2 | 1 | 7.25 | thingy
3 | 2 | 1.25 | …Run Code Online (Sandbox Code Playgroud) 所以我在我的Android应用程序中传递活动和意图以处理线程(我确信有一个更好的范例,因为我的代码开始变得恼人的意大利面 - 通常是我的标志没做对的事).
但无论如何,我正在尝试做这样的事情:
public class SomeCoolActivity extends Activity {
private class DoSomeTaskThatInvolvesEitherTheNetworkOrASleepStatementWithoutScrewingUpTheUiThread extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
// Do something useful on a non-UI thread...
return null;
}
@Override
protected void onPostExecute(Void result) {
// Now that's done, I need to progress to the next activity. If I do that here,
// I will get errors. So instead, I will call a method on my parent activity class:
loadNextActivity(NextActivity.class);
}
}
protected void …Run Code Online (Sandbox Code Playgroud) 所以我使用Use Base Internationalization在Xcode中本地化了一个故事板.
我进去并翻译了字符串文件中的所有字符串.好极了.这花了很长时间.
现在我在故事板的基本文件中添加了一个新元素.它有一个标签,带有我需要国际化的字符串.我保存它,构建它等等.但是这个新元素在我漂亮的字符串文件中找不到.
请不要告诉我,我现在必须手动添加我的所有元素?