Note: These are randomly generated addresses
Hey Guys, Learning Xamarin and I am trying to scroll my Frame Layout down and reveal a search bar for my list view. Here is what is happening:
I color coded my layouts to see if the sizes where a problem, but I dont think they are since my orange layout is plenty big to hold my two entries. Am I using the wrong layouts for this kind of application? I would appreciate any help!
Here is my translation code:
frameLayout.Animate().TranslationYBy(editSearch.Height).SetDuration(500).Start();
And my layout file:
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/swipeLayout"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:maxHeight="100dp" android:id="@+id/frameLayoutParent" android:background="@android:color/holo_green_dark"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/frameLayout" android:background="@android:color/holo_green_light"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="300dp" android:background="@android:color/holo_orange_light"> <Button android:text="Add New Address" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/addNewAddress" android:maxHeight="20dp" /> </LinearLayout> <ListView android:paddingTop="50dp" android:minWidth="25px" android:minHeight="300dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/myListView" android:maxHeight="300dp"/> </FrameLayout> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/editSearch" android:hint="Search ZipCodes" android:textColor="#000"/> </FrameLayout> </android.support.v4.widget.SwipeRefreshLayout>
https://stackoverflow.com/questions/66148204/listview-gets-cut-off-when-translating-by-y-xamarin-android February 11, 2021 at 11:06AM
没有评论:
发表评论