Keep view the same on all devices
How can I change my activities xml file so that the view stays the same regardless of the size of the screen. What I mean is the location in which the buttons or text is. I want it to stay relatively the same distance and everything. How would I do that? Would relative layout work for that or do is there something else that I would have to do in order for the view to be the same on all devices?
XML file:
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.navjeevenmann.mytycoon.MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="0dp"
android:layout_height="59dp"
android:background="#2C3AAD"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.21"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.02" />
<ImageButton
android:id="@+id/button"
android:layout_width="247dp"
android:layout_height="243dp"
android:background="#0000"
android:src="@drawable/opengraph"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/autoclick"
android:layout_width="49dp"
android:layout_height="47dp"
android:src="@drawable/cursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.9"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.991" />
<ImageButton
android:id="@+id/imageview"
android:layout_width="62dp"
android:layout_height="58dp"
android:adjustViewBounds="true"
android:background="#2c3aad"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:src="@drawable/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<ImageButton
android:id="@+id/singleclick"
android:layout_width="47dp"
android:layout_height="47dp"
android:background="#2C3AAD"
android:src="@drawable/singlecursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.99" />
<ImageButton
android:id="@+id/imageButton2"
android:src="@drawable/notes"
android:layout_width="47dp"
android:layout_height="49dp"
android:adjustViewBounds="true"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintHorizontal_bias="0.047" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.100000024" />
android xml android-layout view
add a comment |
How can I change my activities xml file so that the view stays the same regardless of the size of the screen. What I mean is the location in which the buttons or text is. I want it to stay relatively the same distance and everything. How would I do that? Would relative layout work for that or do is there something else that I would have to do in order for the view to be the same on all devices?
XML file:
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.navjeevenmann.mytycoon.MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="0dp"
android:layout_height="59dp"
android:background="#2C3AAD"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.21"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.02" />
<ImageButton
android:id="@+id/button"
android:layout_width="247dp"
android:layout_height="243dp"
android:background="#0000"
android:src="@drawable/opengraph"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/autoclick"
android:layout_width="49dp"
android:layout_height="47dp"
android:src="@drawable/cursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.9"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.991" />
<ImageButton
android:id="@+id/imageview"
android:layout_width="62dp"
android:layout_height="58dp"
android:adjustViewBounds="true"
android:background="#2c3aad"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:src="@drawable/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<ImageButton
android:id="@+id/singleclick"
android:layout_width="47dp"
android:layout_height="47dp"
android:background="#2C3AAD"
android:src="@drawable/singlecursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.99" />
<ImageButton
android:id="@+id/imageButton2"
android:src="@drawable/notes"
android:layout_width="47dp"
android:layout_height="49dp"
android:adjustViewBounds="true"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintHorizontal_bias="0.047" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.100000024" />
android xml android-layout view
1
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32
add a comment |
How can I change my activities xml file so that the view stays the same regardless of the size of the screen. What I mean is the location in which the buttons or text is. I want it to stay relatively the same distance and everything. How would I do that? Would relative layout work for that or do is there something else that I would have to do in order for the view to be the same on all devices?
XML file:
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.navjeevenmann.mytycoon.MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="0dp"
android:layout_height="59dp"
android:background="#2C3AAD"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.21"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.02" />
<ImageButton
android:id="@+id/button"
android:layout_width="247dp"
android:layout_height="243dp"
android:background="#0000"
android:src="@drawable/opengraph"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/autoclick"
android:layout_width="49dp"
android:layout_height="47dp"
android:src="@drawable/cursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.9"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.991" />
<ImageButton
android:id="@+id/imageview"
android:layout_width="62dp"
android:layout_height="58dp"
android:adjustViewBounds="true"
android:background="#2c3aad"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:src="@drawable/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<ImageButton
android:id="@+id/singleclick"
android:layout_width="47dp"
android:layout_height="47dp"
android:background="#2C3AAD"
android:src="@drawable/singlecursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.99" />
<ImageButton
android:id="@+id/imageButton2"
android:src="@drawable/notes"
android:layout_width="47dp"
android:layout_height="49dp"
android:adjustViewBounds="true"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintHorizontal_bias="0.047" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.100000024" />
android xml android-layout view
How can I change my activities xml file so that the view stays the same regardless of the size of the screen. What I mean is the location in which the buttons or text is. I want it to stay relatively the same distance and everything. How would I do that? Would relative layout work for that or do is there something else that I would have to do in order for the view to be the same on all devices?
XML file:
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.navjeevenmann.mytycoon.MainActivity">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar2"
android:layout_width="0dp"
android:layout_height="59dp"
android:background="#2C3AAD"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.21"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.01999998" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textColor="#000"
android:textSize="25sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.02" />
<ImageButton
android:id="@+id/button"
android:layout_width="247dp"
android:layout_height="243dp"
android:background="#0000"
android:src="@drawable/opengraph"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.503"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/autoclick"
android:layout_width="49dp"
android:layout_height="47dp"
android:src="@drawable/cursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.9"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.991" />
<ImageButton
android:id="@+id/imageview"
android:layout_width="62dp"
android:layout_height="58dp"
android:adjustViewBounds="true"
android:background="#2c3aad"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:src="@drawable/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />
<ImageButton
android:id="@+id/singleclick"
android:layout_width="47dp"
android:layout_height="47dp"
android:background="#2C3AAD"
android:src="@drawable/singlecursor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.99" />
<ImageButton
android:id="@+id/imageButton2"
android:src="@drawable/notes"
android:layout_width="47dp"
android:layout_height="49dp"
android:adjustViewBounds="true"
android:maxHeight="62dp"
android:maxWidth="5dp"
android:scaleType="fitXY"
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintHorizontal_bias="0.047" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.100000024" />
android xml android-layout view
android xml android-layout view
asked Aug 20 '17 at 1:14
John SollyJohn Solly
134
134
1
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32
add a comment |
1
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32
1
1
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32
add a comment |
1 Answer
1
active
oldest
votes
You could use layout percentage if you want it to be same in other devices. Here are links that you could use for reference Percentage layout and Percent Relative Layout
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45777623%2fkeep-view-the-same-on-all-devices%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could use layout percentage if you want it to be same in other devices. Here are links that you could use for reference Percentage layout and Percent Relative Layout
add a comment |
You could use layout percentage if you want it to be same in other devices. Here are links that you could use for reference Percentage layout and Percent Relative Layout
add a comment |
You could use layout percentage if you want it to be same in other devices. Here are links that you could use for reference Percentage layout and Percent Relative Layout
You could use layout percentage if you want it to be same in other devices. Here are links that you could use for reference Percentage layout and Percent Relative Layout
edited Nov 16 '18 at 9:09
answered Aug 20 '17 at 1:24
seulgibearseulgibear
149313
149313
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45777623%2fkeep-view-the-same-on-all-devices%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
ConstraintLayout is absolutely the way to go. Check out constraintlayout.github.io. Everything you can do with percent and relative layouts can be done with constraints (and has the added bonus of better performance than nesting layouts).
– Eric Bachhuber
Aug 20 '17 at 1:32
please give your design.ConstraintLayout is best.
– Shweta Chauhan
Aug 20 '17 at 4:32