从自定义DatePicker DialogPreference调用自定义Time DialogPreference(call custom Time DialogPreference from custom DatePicker DialogPreference)
我需要在我的项目中实现自定义TimePicker和DatePicker DialogPreferences。 应调用第一个DatePicker对话框,然后调用TimePicker。 在本教程和本教程的帮助下,我将它们都实现到了我的项目中。
我认为我应该在
onDialogClosed
方法中调用TimePreference。 我这样做:@Override protected void onDialogClosed(boolean shouldSave) { if (shouldSave && this.changedValueCanBeNull != null) { setTheDate(this.changedValueCanBeNull); this.changedValueCanBeNull = null; Log.i("curr context", ctx.getClass().toString()); try{ new TimePreference(ctx,attrs).getDialog().show(); } catch(Exception e) { e.printStackTrace(); } } }
但是我得到一个NullPointerException。 问题是如何在DatePreference工作之后以编程方式调用我的自定义TimePreference对话框,并将这两个值都设置为DatePreference。 或者我应该创建不同的自定义ListPreference,它应该实现这两个项目?
I need to implement both custom TimePicker and DatePicker DialogPreferences in my project. First DatePicker Dialog should be called and then TimePicker. I implemented them both to my project with the help of this and this tutorials.
I think that I should call TimePreference in the
onDialogClosed
method of the DatePreference. I do it like that:@Override protected void onDialogClosed(boolean shouldSave) { if (shouldSave && this.changedValueCanBeNull != null) { setTheDate(this.changedValueCanBeNull); this.changedValueCanBeNull = null; Log.i("curr context", ctx.getClass().toString()); try{ new TimePreference(ctx,attrs).getDialog().show(); } catch(Exception e) { e.printStackTrace(); } } }
But I get an NullPointerException. Question is how can I call my custom TimePreference dialog programatically right after the DatePreference work and set both values to the DatePreference. Or I should create different custom ListPreference which should implement both of that items?
原文:https://stackoverflow.com/questions/14984584
最满意答案
GitHub是一个源存储库托管服务,您确实需要提交,并首先将您的源推送到GitHub存储库,然后应用标记。
然后,您可以将版本与该标记关联:请参阅“ 创建版本 ”
这将是允许您发布“应用程序”(意味着可执行交付)的部分。
目标是在以下两者之间建立强有力的联系:
- 特定版本的源代码(通过标签)
- 交货(从所述来源建立)
GitHub being a source repository hosting service, you need indeed to commit, and push your sources to a GitHub repo first, and apply a tag.
Then, you would be able to associate a release to that tag: see "Creating a release"
That would be the part which allows you to publish an "application" (meaning an executable delivery).
The goal is to keep a strong link between:
- a specific version of the source code (through the tag)
- a delivery (built from said sources)
相关问答
更多-
“AI引擎”可能意味着很多不同的事情。 你在找什么样的“AI”? 以下是一些机器学习软件的列表 。 其中许多是开源的(链接页面显示许可证)。 "AI engine" can mean an awful lot of different things. What kind of "AI" are you looking for? Here is a list of some machine learning software. Many of them are open source (the linked ...
-
不知道你正在使用什么语言,但是例如在C / C ++中,你可以添加一个包含API密钥的包含文件,然后将其从源代码控制中删除,而不用添加一个虚假的API密钥伪造的文件。 大多数语言有一种或另一种方式来包含文件。 Don't know what language you are using, but for example in C/C++ you'd add a include file with the API keys, and then leave it out of source control, i ...
-
GitHub是一个源存储库托管服务,您确实需要提交,并首先将您的源推送到GitHub存储库,然后应用标记。 然后,您可以将版本与该标记关联:请参阅“ 创建版本 ” 这将是允许您发布“应用程序”(意味着可执行交付)的部分。 目标是在以下两者之间建立强有力的联系: 特定版本的源代码(通过标签) 交货(从所述来源建立) GitHub being a source repository hosting service, you need indeed to commit, and push your sources ...
-
如果要使用基于Web的开源GIS,请尝试使用OpenGeo Suite 还有几个用于GIS的库,如GeoTools和DotSpatial 。 最后,您可以看到这是开源/免费GIS相关软件项目的完整索引。 If you want to use web based open source GIS, try OpenGeo Suite Also there are several libraries for GIS, like GeoTools and DotSpatial. Finally, you can s ...
-
如果您不打算分发它,您可以用它做你想做的事。 请参阅GPL常见问题解答中的此条目 。 If you're not going to distribute it, you can do what you want with it. See this entry in the GPL FAQ.
-
Dojo开源吗?(Is Dojo Open Source? [closed])[2023-03-20]
你可以: * Freely use Dojo to build applications and services * Distribute Dojo as a part of commercial products * Modify Dojo, make extensions to the toolkit, and produce your own 附加组件,不要求您提供代码或将其贡献给项目 只需重新进行迭代,您就可以使用Dojo构建商业软件,而无需获得单独的许可或承担任何其他义务。 根据修改后的BSD ... -
iText 5.4.2是开源的吗?(Is iText 5.4.2 open source?)[2022-07-24]
AGPL代表Affero GPL 。 它基本上说,当你想销售包含iText的软件产品或在任何商业Web服务中使用iText时,你需要购买许可证。 如果你使用开放源代码(具有合适的许可证)或私人项目,那么你就没有问题,也不需要购买许可证。 AGPL stands for Affero GPL. It basically says, when you want to sell a software product that includes iText or use iText in any commercia ... -
这篇文章可以让你对android的开源软件项目有一个很好的了解 New Total OSS Projects Mobile Growth OSS Projects Associated with a Platform 2009 Projects '08-'09 ------------ ...
-
我应该开源我的MonoTouch .NET iPhone应用程序吗?(Should I Open Source my MonoTouch .NET iPhone application? [closed])[2022-10-01]
我根据BSD许可证开源了我的第一个iPhone应用程序 ,并没有后悔这个决定。 我写这篇文章是为了教自己开发iPhone的细节,并想到我会发布代码来帮助其他人做同样的事情。 我甚至写过几篇关于我在开发这个应用程序时学到的东西的帖子 。 我也使这个应用程序免费和开源,因为它依赖纳税人资助的科学资源,我觉得错误地收取与这种设施相关的任何东西。 您将从中看到的一个好处是您网站的流量。 首先,拥有一个免费的应用程序将为您带来大量的下载和来自好奇用户的大量访问。 自App Store推出以来,我的应用程序已被下载超过 ... -
开源萨斯[关闭](Open source Saas [closed])[2023-05-02]
没有开源许可证可以阻止您对软件或服务收费。 GPL简单地说,如果您分发某些GPL软件的修改版本,那么您的修改也必须在GPL下发布。 它并没有说你必须根据你的意愿分发你的修改版本,只有当你这样做时,你必须根据GPL这样做。 “Affero GPL”比这更进一步说明如果您使用AGPL软件来驱动网络服务,那么您必须根据AGPL发布对软件所做的任何修改。 换句话说,提供对服务的公共访问与分发软件的方式相同。 当然,如果您是相关软件(的所有部分)的版权所有者,那么您可以根据您选择的任何许可证自由发布和/或使用它。 您 ...