Gradient background that doesn't scale




I need to create a gradient with a height of 230dp (i.e. not the whole screen) and the rest of the screen will be solid. I can't figure out how to do this - everything I try ends up expanding the gradient to fill the entire screen. My current XML looks like this:



```
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:top="230dp">
        <shape android:shape="rectangle" >
            <color android:color="#333333" />
        </shape>
    </item>
    <item>
        <shape android:shape="rectangle" >
            <gradient
 android:angle="270"
 android:endColor="#333333"
 android:startColor="#D9D9D9"
 android:type="linear" />

            <size android:height="230dp" />
        </shape>
    </item>

</layer-list>

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

Then I apply this drawable as the background for the LinearLayout in XML:



```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout\_width="fill\_parent"
 android:layout\_height="fill\_parent"
 android:background="#333333" >
    <LinearLayout
 android:id="@+id/container"
 android:orientation="vertical"
 android:layout\_height="fill\_parent"
 android:layout\_width="fill\_parent"
 android:background="@drawable/grey\_gradient\_bg" >

        <!-- a bunch of content, buttons, etc. -->

    </LinearLayout>
</LinearLayout>

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

But the gradient expands to fill the entire screen.


I have tried using PNG for the background, but I am getting the [stripe problems described here](https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=) and the fixes haven't worked for me yet.
* Use RelativeLayout instead of LinearLayout
* Instead of using your gradient as the background of the main layout container, add a child view, set the height explicitly to the size you want (230dp), and set the background of that view to your gradient.



  




 (adsbygoogle = window.adsbygoogle || []).push({});
hey thibaut,

i believe what you want to try is adding is a rectangle object that fills the rest of the screen but is a 0% opacity background. this may help to keep the object from resizing for the screen. hi there,

you should set every “height” to “auto”.

the “height” in your designer tool isn’t the same as a mobile phone. your elements in the blocks with a set height are probably bigger than the set height you used.

hope this works!

cheers,

max zijlstra okay, from an iphone i see the problem. make sure you don’t have anything on too high of a pixel measurement regarding width as well as make sure none of what you have on position other than auto is sticking out. hope this helps. :wink::+1: You are using position:absolute; Don't, it usually leads to endless problems.



Even if you had a real need to use it, why are you placing things at left 1400px!!!



This is right on the edge of the average monitor - how large is your monitor? I work with my browser open at a width of about 1000-1200px (note I didn't mention the size of my monitor). The main reason people have big monitors is so they can have two windows open next to each other, not so that they can run a browser window open at 2800px wide.



I suggest you start by looking at ordinary websites and studying the css. you'll discover that many sites use a wrapper div with a fixed width, while others use a wrapper div with a percentage width and a max-width, to prevent ending up with a huge long line of text 2500px long for example. Then they center the div using margin:auto. That gets the content in the middle of the page on the vast majority of screens, and browser viewports.



Don't lay out a screen using position:absolute. You are not painting pretty pictures on a screen, you should be using html and css to control the layout and check how the layout looks every time, by resizing the window looking for errors.



Also, a contact form needs the input boxes to be part of a <form>, so you'll have to read up on how they work. And a form needs an action, so you'll have to learn a bit about scripting, probably php. As I mentioned, the sample code will be updated soon. Here's the info I received:

·         To set the “Fit one full page to screen” option

o    This is done on the article metadata, the field is fitToScreen

{

                “entityName”: “helloworld”,

                “entityTitle”: “Hello World”,

                “entityType”: “article”,

                “fitToScreen”: true,

                …

}

·         To set the “Enable horizontal swiping within PDF”

o    This is done when uploading PDF to the ingestion service, set the URL parameter hoirzontalSwipe

[https://ings.publish.adobe.io/publication/{{publication-id}}/article/{{entityName}};version={{versio...](https://ings.publish.adobe.io/publication/{{publication-id}}/article/{{entityName}};version={{version}}/contents/folio?horizontalSwipe=true)

o    By default, the horitzontalSwipe is set to false (i.e. if the URL parameter is not set)

o    If the horitzontalSwipe is set to true but fitToScreen is set to false, then the ingestion service will throw an error




[View solution in original post](/t5/adobe-experience-manager-mobile/upload-pdf-files-to-aemm-with-options/m-p/198598#M915) Then it shouldn’t be a problem to set the InDesign Transparency Blend Space to RGB. Also when you export for screens don’t use a PDF/X preset, they are designed for press output. Use the Export Output tab to convert the ID doc to sRGB.


 


CMYK Blend Space:


 


![Screen Shot 10.png](https://community.adobe.com/t5/image/serverpage/image-id/150842iD57F1CC3C78841C4/image-size/large?v=1.0&px=999 "Screen Shot 10.png")


 


RGB Blend Space:


![Screen Shot 11.png](https://community.adobe.com/t5/image/serverpage/image-id/150843i56A067219BAD62EE/image-size/large?v=1.0&px=999 "Screen Shot 11.png") hola, acabo de solucionar mi problema

problema:

[unhandled promise rejection: error: no native splash screen registered for provided activity. please configure your application’s main activity to call ‘splashscreen.show’ ([https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-config…](https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-configure-android) Unfortunatley after many many years of asking for this, Illustrator still has not added this feature to text frame options.

The closest you can get is to draw a rectangle, click with the vertical type tool (But that will only allow you one character per line.)

![Screen Shot 2016-04-13 at 3.23.20 PM.png](/legacyfs/online/910043_Screen Shot 2016-04-13 at 3.23.20 PM.png)

You could do this with the align palette. You would need to select another element to align against (eg: a rectangle filled with none). You need to add an outline effect to the type, and in the align flyout menu turn ON use preview bounds.

![Screen Shot 2016-04-13 at 3.30.11 PM.png](/legacyfs/online/910045_Screen Shot 2016-04-13 at 3.30.11 PM.png) When designing for a variety of resolutions you want to scale down, not up. Do your design in a @2x resolution (640 x 960 @72ppi) and for the @1x assets you duplicate them to a new document (preferably) and scale them down by 50%. You can set up a Action script for this also to make the process go by faster. To learn a bit about Photoshop action script you can have a look [HERE](https://www.youtube.com/watch?v=BRpPGiGXcHc).


As for your second question, [HERE YOU GO](https://www.dropbox.com/s/sczltvow7jgtfiy/iPhone%204%20GUI%20PSD%20Retina%20Display.psd). The "reload" symbol you were after can be found in that Retina asset sheet, a sheet that is very good to have for anyone who wants to design for iPhone. [@anna duraim38716857](https://community.adobe.com/t5/user/viewprofilepage/user-id/10648885) 
Unfortunatly you script cannot work.
 
Here is a working variant with remove the pathPoint[3] of the created rectangle
// Set color values for the CMYK object
var cmykCol = new CMYKColor();
cmykCol.black = 100.0;
cmykCol.cyan = 0.0;
cmykCol.magenta = 0.0;
cmykCol.yellow = 0;

var myDocument = app.activeDocument;
var artLayer = myDocument.layers.add()

var rect1 = artLayer.pathItems.rectangle( -449.855743408203,815.611206054688, 14.173, 8.504 );
rect1.fillColor = cmykCol;
re...