只有facebook,twitter,sms才能分享Android(share only by facebook, twitter, sms Android)
我正在尝试使用下一个脚本与Android共享:
Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND); sendIntent.setType("text/plain"); sendIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject); sendIntent.putExtra(android.content.Intent.EXTRA_TEXT, subject + text); this.cordova.startActivityForResult(this, sendIntent, 0);
此列表安装在Android上的所有应用。
如何定义应用程序以分享ex:Facebook,Twitter,SMS? 我可以定义订单吗?
最好的祝福,
I´m trying to share with Android using the next script:
Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND); sendIntent.setType("text/plain"); sendIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject); sendIntent.putExtra(android.content.Intent.EXTRA_TEXT, subject + text); this.cordova.startActivityForResult(this, sendIntent, 0);
This list all app installed on Android.
How can I define the app to share ex: Facebook, Twitter, SMS ? Can I define a order ?
Best regards,
原文:https://stackoverflow.com/questions/16065927
最满意答案
这实际上与`per-say的反应毫无关系。
我已经更改了使用组件
state
example
,这意味着只要状态发生更改,ValidatedInput
就会重新呈现。 如果在渲染组件时example.has_a_promotion正确,则实际上可能不需要这样做。 所以请相应更改。
disabled
实际上只是传递给ValidatedInput
组件的属性。 这意味着它的值就像任何其他js一样,当它用{}
包裹时运行...所以一个简单的if语句就可以了。render(){ return( <ValidatedInput className='product-dropdown' onChange={this.onProductChange.bind(this)} defaultValue={example.product_id} componentClass='select' name='product_id' placeholder='select' disabled={this.state.example.has_a_promotion === true ? true : false} /> ); }
This actually has nothing to do with react `per-say.
I have changed
example
to use the componentsstate
this will mean theValidatedInput
will re-render whenever the state is changed. This might not actually be necessary if example.has_a_promotion is correct when the component is rendered. So please change accordingly.
disabled
is actually just a property that is passed down to theValidatedInput
component. Which means its value is just like any other js that is run when its wrapped with{}
... so a simple if statement will do the trick.render(){ return( <ValidatedInput className='product-dropdown' onChange={this.onProductChange.bind(this)} defaultValue={example.product_id} componentClass='select' name='product_id' placeholder='select' disabled={this.state.example.has_a_promotion === true ? true : false} /> ); }
相关问答
更多-
谢谢@karthikr: from django import forms class ContactForm(forms.Form): # Everything as before. ... def clean(self): cleaned_data = super(ContactForm, self).clean() cc_myself = cleaned_data.get("cc_myself") subject = clea ...
-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
要删除残疾的道具,您应该将其值设置为false 。 这需要为false的布尔值,而不是字符串'false' 。 因此,如果已validated的值为1或0,则根据该值有条件地设置disabled支持。 例如: 这是一个例子 。 To remove the disabled prop, you should set its value to false. This needs to be the boolean v ...
-
如何有条件地更换表单中的“用户输入”部分?(How can I conditionally swap out the “User Input” part of my form?)[2022-01-28]
我建议动态地将不同的用户控件加载到表单的该部分。 为了简化设计时间,您可以将面板放在动态控件所在的位置,然后只需将其加载到面板中并打开底座,即可填满整个面板。 然后,您可以为所需的每组数据输入字段创建单独的用户控件。 例如,如果你有一个名为pnlCustom的面板控件,你可以在表单的加载事件中(或者在任何有意义的地方)执行以下操作: UserControl1 customControl = new UserControl1(); pnlCustom.Controls.Add(customControl); ... -
没有必要编写自定义指令。 Angular的文档很好但不完整。 实际上 ,有一个指令ngRequired ,它采用Angular表达式。 'A ...
-
这实际上与`per-say的反应毫无关系。 我已经更改了使用组件state example ,这意味着只要状态发生更改, ValidatedInput就会重新呈现。 如果在渲染组件时example.has_a_promotion正确,则实际上可能不需要这样做。 所以请相应更改。 disabled实际上只是传递给ValidatedInput组件的属性。 这意味着它的值就像任何其他js一样,当它用{}包裹时运行...所以一个简单的if语句就可以了。 render(){ return( < ...
-
像这样 : Like this:
-
使用MVC HtmlHelper时,有条件地删除[2022-01-31]
只需对上面的代码进行少量更改,就可以有条件地删除渲染的