I\'m into finding a way to generate Lorem ipsum
in eclipse when creating views just for dummy texts. for example in Visual studio you can do it simply by typing
I haven't encountered an Eclipse functionality to actually generate dummy text, but I do highly recommend this workaround (truth be told, I don't think you need different dummy text each time).
Create an Eclipe template. It's an xml
file that looks like this:
<templates>
<template autoinsert="true" context="java" deleted="false" description="Dummy text" enabled="true" name="Lorem Ipsum">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</template>
</templates>
Go to Java -> Editor -> Templates and import the above file.
Now, when you write code and type lore
(which represents the name attribute value of the template tag above), and hit CTRL+SPACE, then it will automatically insert the lorem ipsum text.
More Tips:
+
signs to the ispum text, so that it breaks down the long string when inserted
false
. Then you can see the ipsum description in the proposal
aaa_LoremIpsum
. Then, in Eclipse, type aaa
and press CTRL+SPACE. That way you can add many templates beginning with aaa
, and select in Eclipse whichever you like.
I myself have templates for separating methods in a class. (e.g. aaa_1.StaticFields
, aaa_2.InstanceFields
, aaa_3.Constructors
etc.)
They can help.
tools:text="@tools:sample/cities"
tools:text="@tools:sample/backgrounds/scenic"
tools:text= "@tools:sample/avatars"
tools:text="@tools:sample/full_names"
tools:text=”@tools:sample/lorem"
tools:text=”@tools:sample/lorem/random"
for other
In Android Studio, you can preview lorem ipsum TextViews with:
tools:text="@tools:sample/lorem/random"
You can also use this for Names, Cities, Zip codes, Avatars, and more.
see https://developer.android.com/studio/write/tool-attributes.html#toolssample_resources