How to create a button with non-clickable lists on Android?
I would like to create a button that when it was clicked it would open a list of items.
I had thought about using Spinner, but I did not want it to work as a select, because when you click on an item, it is selected. I wish it was just an informational list.
It would be like the prototype below:
Is there any way I can do this by using native android components without having to install other libraries?
See also questions close to this topic
Jenkins Android build fails - can't build libwebviewchromium.so
A bit of advice or idea is needed.
I am trying to build Android 5.1.1 Lollipop with Jenkins. But it fails to build libwebviewchromium.so:
... out/target/product/generic/obj/GYP/shared_intermediates/blink/bindings/core/v8/V8SVGNumber.cpp:55: error: undefined reference to 'blink::SVGNumberTearOff::setValue(float, blink::ExceptionState&)' out/target/product/generic/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_generated_gyp_intermediates/SVGElementFactory.cpp:383: error: undefined reference to 'blink::SVGMetadataElement::create(blink::Document&)' external/chromium_org/third_party/WebKit/Source/core/svg/SVGNumberTearOff.h:45: error: undefined reference to 'blink::SVGNumberTearOff::SVGNumberTearOff(WTF::PassRefPtr<blink::SVGNumber>, blink::SVGElement*, blink::PropertyIsAnimValType, blink::QualifiedName const&)' collect2: error: ld returned 1 exit status make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
At the same time, when I try to build it manually, it succeeds:
. build/envsetup.sh set_stuff_for_environment lunch sh1_qemu_eng make clean make -j24
I wonder how it comes that the same operation can be successful when using a console and fail when using Jenkins. Could you please share your ideas with me?
P.S. The build machine has 24GB of RAM and 15GB swap file, and a 512 GB SSD flash disk (62% available). The OS is Ubuntu 14.04LTS, 64 bit.
$ free -m total used free shared buffers cached Mem: 24021 22079 1942 75 4778 8768 -/+ buffers/cache: 8532 15488 Swap: 16036 345 15691
NestedScrollView Recyclerview scrolls by itself
I have a NestedScrollView which contain RecyclerView ,the RecyclerView auto scrolling , How to stop this?
i try add "android:descendantFocusability="blocksDescendants" parent but not working
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:descendantFocusability="blocksDescendants" android:orientation="vertical"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView_list_cases" android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </androidx.core.widget.NestedScrollView>
2D array tiles/tilemap and circle object collision
I used the 2 dimentional array to create a game tile map. I tried AABB collision with square but I'm not satisfied with the results as the movement is not smooth in my opinion. So I created a circle shape/indicator beneath my character. How can i do collision detection between 2d array tiles and circle object?
What does a greyed out view in the Android Layout Inspector mean?
In Android Studio, Tools -> Layout Inspector, what does a greyed out(subdued, dim) view in the View Tree mean? The layer still has
I don't see any explanation in the docs, https://developer.android.com/studio/debug/layout-inspector and there isn't a tooltip when hovering the view.
For context/reference, I am trying to figure out why the fragment isn't showing up in the
The project is open source if you want to check out the code yourself, https://gitlab.com/gitlab-org/gitter/gitter-android-app
How do I prevent a window being resized after making a view visible, when soft keyboard is shown
I have a parent ConstraintLayout for a fragment where I am displaying a button above the soft keyboard using the button's attribute:
This is fine, until I change the visibility state of any view on the screen from 'invisible' or 'gone' to 'visible', then the button disappears behind the keyboard at the bottom of the screen.
Adding the following attributes to the ConstraintLayout doesn't help e.g.
The first time the keyboard is opened, the screen resizes properly and the button is pushed up. After changing a view's visibility then open/closing the keyboard makes no difference and the button remains at the bottom of the screen and behind the keyboard.
There's nothing unusual about the xml. For example, here's a stripped down version where making errorTextView visible causes the issue.
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:id="@+id/editText" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintBottom_toTopOf="@id/errorTextView" app:layout_constraintTop_toTopOf="parent" /> <TextView android:id="@+id/errorTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" app:layout_constraintTop_toBottomOf="@id/editText" /> <Button android:id="@+id/saveButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Save" app:layout_constraintBottom_toBottomOf="parent" /> </android.support.constraint.ConstraintLayout>
Any help received gladly.
Android Studio Vector Assets - How to merge/combine two vector assets together?
I'm currently designing some ImageButtons to be drawn on top of a map, and one of them is supposed to bring up a list of currently favourited markers that would be permanently displayed on the map.
Apart from holding down the custom InfoWindow, a marker can be added to this list from a separate activity by clicking a button on the that activity's action bar, which for its icon uses the android vector asset named star_border.
Now, as the ImageButton's src, I would like to use a combination of the list vector asset and the star, which would sort of be in the bottom right, like a subscript. Can this be done by editing together XML code, or do I use a third party program?