Questions tagged [xml-layout]

Android uses xml files to layout its components on a window.

Android uses xml files to layout its components on a window.

187 questions
0
votes
1 answer

Android View, creating custom component

First of all, I know there is a lot of similar questions, but i could find a complete answer to do what I want. It's about the creation of a custom component. Thing is, I would like to create a custom animated component for my UI. Moreover, the…
Aleks
  • 410
  • 4
  • 22
0
votes
1 answer

how to load specific xml layout file based on device screen size?

i have tried with these instructions available on this devoloper link I need to load res/layout-w1024dp-h768dp/activity_main.xml on a device of resolution 1024x768 or else a default xml file, so i configured my AVD and my project explorer looks as…
Charan Pai
  • 2,288
  • 5
  • 32
  • 44
0
votes
1 answer

accessing objects of xml layout android

I have an activity (MainActivity.java) in which content view is like this this.setContentView(R.layout.standalone_example); my standalone_example.xml is like this
Muaz Usmani
  • 1,298
  • 6
  • 26
  • 48
0
votes
3 answers

Relationship between getWidth() method in Display class and XML layout in Android

According to the Android documentation for screen support, they have described as follow, xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp…
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
0
votes
1 answer

Android Drag&Drop with XML Layout

The idea was to create an interface with two "buttons" that are draggable. I didn't want to use Canvas (problems with the bitmap in the memory and redrawing everything, etc.), so I decided to use the XML Layout with ImageView as buttons. One button…
szymonm
  • 1,053
  • 8
  • 12
0
votes
1 answer

Android: Would it be possible to save some of the content from your .xml layout (i.e. Edit Text)

So by selecting a button possibly save the values to the SD card (preferably) or another xml layout? I've read some stuff on using Shared Preferences where you can save any primitive data: booleans, floats, ints, longs, and strings. I'm not 100%…
silver_c
  • 61
  • 1
  • 1
  • 6
0
votes
1 answer

Layout problems

I am trying to make a league table which has a fixed header... I posted previously and got advice, but i am still having some issues! I'm sure it is only a minor issue that is causing me my problems!!! Below is the code for the main page: public…
julian9876
  • 61
  • 1
  • 8
0
votes
2 answers

Reuse an XML layout file to show different information (Android Application)

I’m new to Android and have a simple question. Currently I’m working on a products application that allows users to add, remove and browse variety of products. The application uses a predefined XML-based layout file as a template that fills the…
0
votes
1 answer

Layout for a League table

I'm having some issue creating a layout for a league table. In my current layout, i have created a table with consists of two rows. The first row has the headings i want, and the second row has black fields that consist of the data that is obtained.…
julian9876
  • 61
  • 1
  • 8
-1
votes
1 answer

How to make classes in android-studio to use the same root layout but with different text shown on TextViews

I am a beginner and this is my first app. I am making an app that will show the user Text View in the mainActivity.xml, ex.Music, then the user can click on the 'music' text View(via intent) , and it goes to another activity where are displayed…
-1
votes
1 answer

Android BlackScreen Layout after showing Activity

After starting the application on mobile , the Layout background go to black after changing from one activity to another NOTE : the origin color of the layout is White this is the screen-shot : first activity : second activity : Here is the XML…
UsefGeoso
  • 1
  • 4
-1
votes
1 answer

How to fit the tab above of the screen when scrolling the page?

I want to design the screen. layout, tab and grid view I want to scroll option. In scroll time, fix the tab on the header (Below of status bar) and grid view scroll to end of grid view content. In the bottom, I fixed bottom navigation bar. This is…
spodee
  • 1
  • 3
-1
votes
1 answer

Android Layout xml "buttons stacking" (newbie )

I just started with android development. I just need a screen with some buttons on it that can contact a webserver, to trigger an action there, but i have not even gotten that far. When i add buttons to the layout, even if they are nicely sided by…
LHK
  • 29
  • 3
-1
votes
1 answer

how can make full screen app without AppBarLayout in android studio

how can delete this blue and green section!? do some different ways but not work! mainActivity: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
-1
votes
2 answers

EditText is not showing hint, cursor and typed text

Hi I have multiple EditText each of them having hint text.I am loading EditText views in a fragment. Whenever the fragment is loaded,cursor blinks for a fraction in the extreme left side of the edit text,but disappears after that. Even the hint is…
user2879697
  • 69
  • 1
  • 10
1 2 3
12
13