Skip to main content

All Questions

Tagged with
0 votes
1 answer
71 views

ScrollView's scrollbar isn't showing or when it doesn't go all the way

recently when developing a android app I've had to use a scroll view for the settings of the app. The problem with my scroll view is that its not scrolling when i set the layout params to match parent ...
king cannibal's user avatar
0 votes
1 answer
30 views

How to set the heightof a snackbar?

I produce the following snackbar with the following code: Snackbar: Snackbar Code: View parentLayout = findViewById(android.R.id.content); Snackbar snackbar = Snackbar.make(parentLayout, "...
Tobi Z's user avatar
  • 29
0 votes
0 answers
59 views

Copy of View or Draw same view in customView

I have 2 views. Will hold all my display data. Will just observe the first view and display it. Both view in the same activity. Like the below picture. 1st view has list data So it is changeable. ...
Bhaven Shah's user avatar
0 votes
0 answers
39 views

How can i set the view position in the center of the parent in java code?

I want to set the view position in the center of the parent when the button is clicked. How can i do that? Here is my condition, but when i click the button, the view goes to the upper left corner ...
user avatar
0 votes
1 answer
852 views

Trying to create a custom layout that extends constraintlayout

So I've this custom layout. public class MyCustomView extends ConstraintLayout { private Button myFancyButton; public MyCustomView (@NonNull Context context, AttributeSet attrs) { ...
Janko92's user avatar
  • 381
0 votes
1 answer
206 views

How to add view to cardview inside livedata observer

I am trying to add some radio button into a card view. Here's my code: MainActivity.java cardView = findViewById(R.id.card_view); mGameViewModel.setUpGame().observe(this,this::loadRound); private ...
Rayhan Hanaputra's user avatar
1 vote
1 answer
213 views

How do I programmatically center a view on the layout?

I am makig some game to learn more about Java and AStudio. I need to center one view onto another view. Boths views are ConstraintLayouts. I've already tried MATCH_PARENT or WRAP_CONTENT along with ...
Karol Odwald's user avatar
1 vote
1 answer
190 views

Adaptative radius on CardView

I have a problem , I hope you will bring me some informations. In order to have a circular VideoView , I put it in a CardView <android.support.v7.widget.CardView android:...
Manu13k's user avatar
  • 366
1 vote
1 answer
53 views

Pass the same View to a function that you are using in the setContentView()

I have the following function: createEl(View view, ....) I have to go to the same View function I'm using in the: setContentView(R.layout.activity_main). I tried with: View view = (View) ...
Paul's user avatar
  • 4,512
-1 votes
1 answer
118 views

How to get view position in window while this view is in a layout which is in another layout?

I have tried this one (set to Buttons): @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { lastTouchXonWindow = event.getX() ...
Altoz 123's user avatar
2 votes
3 answers
749 views

Soft keyboard pushing layout

I have been trying many solutions out there for preventing the soft keyboard from pushing my layout when it appears. However, all solutions did not work. Simply, I want everything in my layout (...
Jan's user avatar
  • 747
-2 votes
1 answer
60 views

Android studio search results view [closed]

I have search and results activities. After submitting a search, webserver is contacted and i will get json array as a result. Each object in that array will contain few info pairs about that result. ...
Filipovic Luka's user avatar
0 votes
2 answers
69 views

Cant see another view type in recycler view

I have a recyclerview in that I want to show two layouts. For that I am using view type and different view holders. And loaded accordingly, but I can only see the list of items and not the header ...
Sid's user avatar
  • 2,862
1 vote
1 answer
200 views

How can I draw a View on top of it´s parent-layout?

So I'm writing a custom component which basically is an EditText with a custom drop-down menu attached at the bottom. This will host a list of search suggestions. Right now I accomplish this by ...
gustavaa's user avatar
0 votes
1 answer
182 views

Android - view does not keep height

I'm trying to add a custom view to a linearlayout, but the view does not keep it's height. The height is 48dp so it's fixed but after I do addView() it change to wrap_content : LinearLayout cmsList =...
An-droid's user avatar
  • 6,485

15 30 50 per page
1
2 3 4 5