因此,当我设置其他小部件的线性布局的可见性时,我试图设置动画,从GONE到VISIBLE,相反.我使用togglebuttons显示和隐藏.这是一张图片来展示我想要做的事情:

我可以显示和隐藏,但我不跟随我怎么能正确滑动动画.... :(
继承人我的xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical">
<ScrollView
android:id="@+id/ScrollView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical">
<!-- TITULO1 -->
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:background="#848284"
android:padding="4px">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/TextView01"
android:text="Informação Geral"
android:textColor="#FFFFFF"
android:gravity="left"
android:textStyle="bold"
android:singleLine="true"
android:ellipsize="end"
android:layout_gravity="center_vertical"
android:textSize="18px"
android:paddingLeft="4px">
</TextView>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="right|center_vertical" android:gravity="right|center_vertical" android:paddingTop="2px">
<ToggleButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textOff="Expandir"
android:textOn="Minimizar"
android:id="@+id/mostrar"
android:width="80px">
</ToggleButton>
</LinearLayout>
</LinearLayout>
<!--LINHA SEPARADORA-->
<View
android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="2px">
</View>
<!-- CONTENT INITIALLY HIDDEN (GONE) -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/informgeral" …Run Code Online (Sandbox Code Playgroud) 所以我有一个字段存储格式的值:number/year,如23/2014,24/2014,12/2015等等......
因此,如果此字段被映射为not_analyzed一个,我可以使用术语过滤器进行精确值搜索,如果我搜索该精确结构中的值(类似于1/2014,15/2014,...)它可以工作,就像sql equals(=).
{
"query": {
"filtered": {
"filter": {
"term": {
"processNumber": "11/2014"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
因此,使用11 /或/ 2014之类的不同内容进行搜索将不会返回匹配.这可以.
但是,如果我将字段定义为not_analyzed,我不能sql LIKE使用match_phrase查询进行类型搜索.
{
"query": {
"match_phrase": {
"processNumber": "11/201"
}
}
}
Run Code Online (Sandbox Code Playgroud)
在这种情况下,搜索11,11 /,/ 2014或2014应返回命中,但它们不会.问题是,如果字段未映射为一个字段,则此查询有效not_analyzed.所以我似乎要么使用其中一个,问题是该字段应该支持不同查询的两个选项,我在这里遗漏了什么?
所以我一直在努力了解如何解决这个问题,但我无法解决它.现在我有一个带一个按钮的片段.当您按此按钮时,它将启动DialogFragment带有确定/取消按钮的自定义.
如果我按下确定按钮,它将启动另一个自定义DialogFragment,这次它是一个ProgressDialog片段.问题是,当ok/cancel对话框出现时,如果我旋转然后按ok按钮然后调用ProgressDialog片段我得到这个错误.如果我只在progressdialog片段显示时旋转,则根本没有问题.我正在使用支持包v4.这是课程:
主要活动:
public class MainActivity extends FragmentActivity implements OnFragmentAttachedListener, Callbacks{
boolean mResumed = false;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.main_id, new EmptyFragmentWithCallbackOnResume());
fragmentTransaction.commitAllowingStateLoss();
}
@Override
public void onTaskFinished()
{
// Hooray. A toast to our success.
Toast.makeText(this, "Task finished!", Toast.LENGTH_LONG).show();
// NB: I'm going to blow your mind again: the "int duration" parameter of makeText *isn't*
// the duration in …Run Code Online (Sandbox Code Playgroud) android illegalstateexception android-fragments android-dialogfragment
所以我试图调用这个方法:
refreshMoradaLabel = function(idPlaceHolder) {...};
使用窗口对象:
window [ refreshMoradaLabel('id') ] ();
但这似乎不起作用。只有当方法没有参数时。有没有办法使用window [ variable ] ()语法来工作?
编辑;
好的,这是代码:
moarada.jsp 有这些方法的代码:
<c:set var="methodOnClose" value="refreshDynamicValues" />
<c:if test="${empty fieldInstance || (not empty fieldInstance && isTramitacao)}">
<c:set var="methodOnClose" value="refreshMoradaLabel(${dfieldId})" />
</c:if>
<a class="texto" href="#" onclick="editMoradaPopup('${dfieldId}','${methodOnClose}');" id="moradas_${dfieldId}"><img alt="${moradaDes}" src="${pageContext.request.contextPath}/images/icon/icon-pesquisa.png"></a>
Run Code Online (Sandbox Code Playgroud)
window.refreshMoradaLabel = 函数(idPlaceHolder){
alert("label:" +idPlaceHolder);
if($F(idPlaceHolder) != '') {
//Update label
new Ajax.Updater(idPlaceHolder+'_label', 'moradaPopupLocaleAware.do2?method=getLabel',
{method: 'get', parameters: 'id='+$F(idPlaceHolder)});
}
};
Run Code Online (Sandbox Code Playgroud)
window.editMoradaPopup= function(idPlaceHolder,method){ alert(idPlaceHolder); Ext.onReady(function(){ action = "${pageContext.request.contextPath}/moradaPopupLocaleAware.do2"; action += "?method=edit&id="+$(idPlaceHolder).value;
action += "&idPlaceHolder="+idPlaceHolder; …Run Code Online (Sandbox Code Playgroud) 我想模拟一个幻灯片动画.想法是在按下按钮时使用id searchForm滑动并滑动tablelayout,这样我就可以使用额外的空间作为列表.我设法滑动searchForm和按钮,列表似乎是可见的但在此之后我无法点击按钮,这里是负责幻灯片动画的代码:
TranslateAnimation slide = new TranslateAnimation(0, 0, 0,
-findViewById(R.id.searchForm).getHeight());
slide.setDuration(500);
slide.setFillAfter(true);
findViewById(R.id.searchForm).startAnimation(slide);
findViewById(R.id.listBut).startAnimation(slide);
adapterSearch.add(new NotificationEntry("","444/2010","TEste","Etapa de teste2","2010"));
Run Code Online (Sandbox Code Playgroud)
这是包含视图元素的xml:
<TableLayout android:id="@+id/search"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:stretchColumns="1">
<TableLayout android:id="@+id/searchForm"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:stretchColumns="1">
<TableRow android:paddingTop="5px">
<TextView android:text="Nº Processo:" />
<EditText android:id="@+id/processNr" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px">
</View>
<TableRow android:paddingTop="5px">
<TextView android:text="Etapa:" />
<EditText android:id="@+id/tasksearch" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px"
android:paddingBottom="2px">
</View>
<TableRow android:paddingTop="5px">
<TextView android:text="Data inicio:"
android:id="@+id/datepick" />
<EditText android:id="@+id/datebegvalue" />
</TableRow>
<View android:id="@+id/View01"
android:layout_width="wrap_content"
android:background="#B5B5B5"
android:layout_height="1px" …Run Code Online (Sandbox Code Playgroud) @DatabaseField(dataType=DataType.ENUM_STRING,columnName=TIPO_FIELD_NAME)
private TipoPedido tipo;
public enum TipoPedido {
REGISTARNOTIFICACAORESPOSTA("Registar Notificação Resposta",SIGLA_TIPO_REGISTARNOTIFICATIORESPOSTA);
private String tipoName;
private String tipoValue;
TipoPedido(String tipoName,String tipoValue){
this.tipoName=tipoName;
this.tipoValue=tipoValue;
}
public String getTipoName(){
return tipoName;
}
public String getTipoValue(){
return tipoValue;
}
}
Run Code Online (Sandbox Code Playgroud)
是否可以使用tipoValue枚举属性作为列的值而不是序数?
编辑:这是我做的:
创建了MyEnumPersister类:
public class MyEnumPersister extends EnumStringType{
private static final MyEnumPersister singleTon = new MyEnumPersister();
/**
* @param sqlType
* @param classes
*/
protected MyEnumPersister() {
super(SqlType.STRING, new Class<?>[] { Enum.class });
}
public static MyEnumPersister getSingleton() {
return singleTon;
}
@Override
public …Run Code Online (Sandbox Code Playgroud)