Search Results

Search found 19245 results on 770 pages for 'paper size'.

Page 9/770 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Set List View Size Android

    - by Sandeep
    Hello , I am using List View in my project where i have used a xml file which is used to create the list item.Then i have used it programmatically in my class which is extended by ListActivity. But the problem is i have to add a button in the bottom of screen which is not related to list view but List view covers all the screen. So,is there any way to add button in bottom with list view in android. My Code is :- import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; public class Options extends ListActivity { String[] items; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_RIGHT_ICON); items = getResources().getStringArray(R.array.chantOption_array); setListAdapter(new IconicAdapter()); ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setBackgroundResource(R.drawable.ichant_logo); setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON, R.drawable.icon_t); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text Toast.makeText(getApplicationContext(), items[position], Toast.LENGTH_SHORT).show(); if ("Gayatri Mantra".equals(items[position].toString())) { int[] timeintervals = { 23900, 24000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.gayatri, R.raw.gayatri, R.drawable.icon_gayatri, "Gayatri Mantra", timeintervals); } if ("Om Mani Padme Hum".equals(items[position].toString())) { int[] timeintervals = { 5500, 8200, 11100, 13900, 34100, 36700, 39500, 42300, 59300, 62000, 64800, 67600, 124600 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.ommanipadmehum, R.raw.om_mani, R.drawable.icon_padme, "Om Mani Padme Hum", timeintervals); } if ("Sai Ram".equals(items[position].toString())) { // Audio time interval for bead+total time duration of audio int[] timeintervals = { 4800, 7500, 10400, 12600, 15800, 18600, 21600, 24400, 25000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.sairam, R.raw.sairam, R.drawable.icon_sairam, "Sai Ram", timeintervals); } if ("Aum".equals(items[position].toString())) { // Audio time interval for bead+total time duration of audio int[] timeintervals = { 12850, 13000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.aum, R.raw.aum, R.drawable.ico_aum, "Aum", timeintervals); } } }); } class IconicAdapter extends ArrayAdapter { IconicAdapter() { super(Options.this, R.layout.list_item, items); } public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = getLayoutInflater(); View row = inflater.inflate(R.layout.list_item, parent, false); TextView label = (TextView) row.findViewById(R.id.label); label.setText(" "+items[position]); ImageView icon = (ImageView) row.findViewById(R.id.icon); if (items[position].equals("Gayatri Mantra")) { icon.setImageResource(R.drawable.icon_gayatri); } if (items[position].equals("Om Mani Padme Hum")) { icon.setImageResource(R.drawable.icon_padme); } if (items[position].equals("Sai Ram")) { icon.setImageResource(R.drawable.icon_sairam); } if (items[position].equals("Aum")) { icon.setImageResource(R.drawable.ico_aum); } return (row); } } protected void startChantActivity(int mala_loop, int beads_loop, int background, int media, int titleIcon, String title, int[] timeintervals) { Bundle bundle = new Bundle(); bundle.putInt("mala_loop", mala_loop); bundle.putInt("beads_loop", beads_loop); bundle.putInt("background", background); bundle.putInt("media", media); bundle.putInt("titleIcon", titleIcon); bundle.putString("title", title); bundle.putIntArray("intervals", timeintervals); Intent intent = new Intent(this, ChantBliss.class); intent.putExtras(bundle); startActivityForResult(intent, this.getSelectedItemPosition()); } } And Corresponding xml file is: <?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="wrap_content" android:orientation="horizontal" > <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:paddingLeft="2px" android:paddingRight="2px" android:paddingTop="2px" android:layout_height="wrap_content" /> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="22sp" android:textColor="#ff000000" /> </LinearLayout> Thanks in Advance: Sandeep

    Read the article

  • Flex4: Detect source Video size VideoPlayer?

    - by Ben
    Hi, Is it possible in Flex 4's VideoPlayer control (spark.components.VideoPlayer) to detect some attributes of the source video? In my case, it's a local file. I would need to detect the original width and height of the input source video (an h264 f4v). Thanks

    Read the article

  • jQuery - bad div size in IE

    - by Tomek
    hello, I have a problem with sizes of divs - in Firefox everything is fine, but IE messes things up, I use only jquery show hide function which open div with other divs nested in it, you can see what I mean on www.custos.pl/v1 - by choosing any option on the bottom, a div opens up, where you have a submenu opening up jScrollPanes, the whole div should stay within the photo background, but in IE it goes vertically way beyond it, Id appreciate your help

    Read the article

  • How can I set size of a button?

    - by Roman
    I put my buttons in a JPane with GridLayout. Then I put JPanel into another JPanel with BoxLayout.Y_AXIS. I want buttons in the GridLayout to be square. I use tmp.setSize(30,30) and it does not work. I also try to use new GridLayout(X, Y, 4, 4) but I cannot figure out what X and Y are. So, what is the correct way to do this stuff?

    Read the article

  • MySQL primary/foreign key size?

    - by David
    I seem to see a lot of people arbitrarily assigning large sizes to primary/foreign key fields in their MySQL schemas, such as INT(11) and even BIGINT(20) as WordPress uses. Now correct me if I'm wrong, but even an INT(4) would support (unsigned) values up to over 4 billion. Change it to INT(5) and you allow for values up to a quadrillion, which is more than you would ever need, unless possibly you're storing geodata at NASA/Google, which I'm sure most of us aren't. Is there a reason people use such large sizes for their primary keys? Seems like a waste to me...

    Read the article

  • ActionScript 3.0 Getting Size/Coordinates From Loader Content

    - by TheDarkIn1978
    i'm attempting to position a textfield to the bottom left of an image that is added to the display list from the Loader() class. i don't know how to access the width/height information of the image. var dragSprite:Sprite = new Sprite(); this.addChild(dragSprite); var imageLoader:Loader = new Loader(); imageLoader.load(new URLRequest("picture.jpg")); imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, displayPic, false, 0, true); function displayPic(evt:Event):void { dragSprite.addChild(evt.target.content); evt.target.removeEventListener(Event.COMPLETE, displayPic); } var tf:TextField = new TextField(); tf.text = "Picture Title"; tf.width = 200; tf.height = 14; tf.x //same x coordinate of dragSprite tf.y //same y coordinate of dragSprite, plus picture height, plus gap between picture and text addChild(tf); within the displayPic function, i could assign the evt.target.content.height and evt.target.content.width to variables that i could use to position the text field, but i assume there is a better way?

    Read the article

  • How to make Edittext size stay put? Android

    - by Sephy
    Hi everybody, I know the attribute which makes the text "disapear" on the left part of the Edittext to maintain a single line, (singleLine="true"). Btu my issue is when I fill the edittext before the view is displayed... in this case, my edittexts are all going out of the screen... any ideas? thx

    Read the article

  • How to correctly size containing views

    - by Gerry
    I have an Activity that will display a custom view made up of 2 parts. I want one part to be 1/3 of visible screen height, the other part to be 2/3. I can override onMeasure and use display metrics to find the height of the display, but this does not account for the battery bar or view title sizes. DisplayMetrics dm = new DisplayMetrics(); ((WindowManager)contxt.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getMetrics(dm); int height = dm.heightPixels; How can I tell the height of the displayable area? I'm prepared to override the layout or whatever. What is the Android best practices? I've seen other questions along this line, but they are inconclusive.

    Read the article

  • Cannot change font size /type in plots

    - by Sameet Nabar
    I recently had to re-install my operating system (Ubuntu). The only thing I did differently is that I installed Matlab on a separate partition, not the main Ubuntu partition. After re-installing, the fonts in my plots are no longer configurable. For example, if I ask the title font to be bold, it doesn't happen. I ran the sample code below on my computer and then on my colleague's computer and the 2 results are attached. This cannot be a problem with the code; rather in the settings of Matlab. Could somebody please tell me what settings I need to change? Thanks in advance for your help. Regards, Sameet. x1=-pi:.1:pi; x2=-pi:pi/10:pi; y1=sin(x1); y2=tan(sin(x2)) - sin(tan(x2)); [AX,H1,H2]=plotyy(x1,y1,x2,y2); xlabel ('Time (hh:mm)'); ylabel (AX(1), 'Plot1'); ylabel (AX(2), 'Plot2'); axes(AX(2)) set(H1,'linestyle','none','marker','.'); set(H2,'linestyle','none','marker','.'); title('Plot Title','FontWeight','bold'); set(gcf, 'Visible', 'off'); [legh, objh] = legend([H1 H2],'Plot1', 'Plot2','location','Best'); set(legend,'FontSize',8); print -dpng Trial.png; Bad image: http://imageshack.us/photo/my-images/708/trial1u.png/ Good image: http://imageshack.us/photo/my-images/87/trial2.png/

    Read the article

  • How to set size for divs with different parents

    - by user340524
    I want to create a div layout which is similiar to the following table result: <html> <head> <title>Basic</title> <style> table { border: 1px solid;} </style> </head> <body> <table style="border: 1px solid;"> <tr> <td> Asia</td> <td> <table> <tr> <td>South Asia</td> </td> <td><table> <tr> <td>Republic</td> <td><table> <tr><td>Singapore</td></tr> <tr><td>India</td></tr> </table></td> </tr> <tr> <td>Monarchy</td> <td><table> <tr><td>Bhutan</td></tr> <tr><td>Nepal</td></tr> </table></td> </tr> </table></td> </tr> <tr> <td>East Asia</td> <td><table> <tr> <td>Republic</td> <td><table> <tr><td>China</td></tr> <tr><td>South Corea</td></tr> </table></td> </tr> <tr> <td>Constitutional Monarchy</td> <td><table> <tr><td>something</td></tr> <tr><td>Japan</td></tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table> </body> </html> I managed to replicate this with some effort. The problem is that I want the names of the countries to be in a column or if you will - the containers for the government types to be the same width so other containers will align. If I don't do it in nested containers (in the example - nested tables) the rows will get displaced. Currently rows are shown exactly how I want them - the text is in the vertical middle of the what they refer to. Only thing that comes up to my mind is to set the text in the same columns as class=column1, class=column2, etc. and then somehow define the width for the column classes. Problem is the data is defined dynamically and I can't say how much pixels or % of the page I can give to a column, I just need it to stretch with the text. This is my first time I ask about help here so if I am doing it wrong, tell me how do improve my inquiry.

    Read the article

  • java - reduce external jar file size

    - by joe_shmoe
    Hi all, still learning, so be patient :) I've developed a module for a Java project. The module depends on external library (fastutil). the problem is, the fastutil.jar file is a couple of times heavier than the whole project itself (14 MB). I only use a tiny subset of the classes from the library. the module is now finished, and no-one is likely to extend it in future. is there a way I could extract only the relevant class to some fastutil_small.jar so that others don't have to download all this extra weight? there's probably a simple answer to this, but as I said, I still consider myself a noob. Thanks a lot

    Read the article

  • PMDB Block Size Choice

    - by Brian Diehl
    Choosing a block size for the P6 PMDB database is not a difficult task. In fact, taking the default of 8k is going to be just fine. Block size is one of those things that is always hotly debated. Everyone has their personal preference and can sight plenty of good reasons for their choice. To add to the confusion, Oracle supports multiple block sizes withing the same instance. So how to decide and what is the justification? Like most OLTP systems, Oracle Primavera P6 has a wide variety of data. A typical table's average row size may be less than 50 bytes or upwards of 500 bytes. There are also several tables with BLOB types but the LOB data tends not to be very large. It is likely that no single block size would be perfect for every table. So how to choose? My preference is for the 8k (8192 bytes) block size. It is a good compromise that is not too small for the wider rows, yet not to big for the thin rows. It is also important to remember that database blocks are the smallest unit of change and caching. I prefer to have more, individual "working units" in my database. For an instance with 4gb of buffer cache, an 8k block will provide 524,288 blocks of cache. The following SQL*Plus script returns the average, median, min, and max rows per block. column "AVG(CNT)" format 999.99 set verify off select avg(cnt), median(cnt), min(cnt), max(cnt), count(*) from ( select dbms_rowid.ROWID_RELATIVE_FNO(rowid) , dbms_rowid.ROWID_BLOCK_NUMBER(rowid) , count(*) cnt from &tab group by dbms_rowid.ROWID_RELATIVE_FNO(rowid) , dbms_rowid.ROWID_BLOCK_NUMBER(rowid) ) Running this for the TASK table, I get this result on a database with an 8k block size. Each activity, on average, has about 19 rows per block. Enter value for tab: task AVG(CNT) MEDIAN(CNT) MIN(CNT) MAX(CNT) COUNT(*) -------- ----------- ---------- ---------- ---------- 18.72 19 3 28 415917 I recommend an 8k block size for the P6 transactional database. All of our internal performance and scalability test are done with this block size. This does not mean that other block sizes will not work. Instead, like many other parameters, this is the safest choice.

    Read the article

  • How can I tell the size of my app during development?

    - by Newbyman
    My programming decissions are directly related to how much room I have left, or worse perhaps how much I need to shave off in order to get up the 10mb limit. I have read that Apple has quietly increased the 3G & Edge download limit from 10mb up to 20mb in preparation for the iPad in April. Either way, my real question is how can I gauge a rough estimate of how large my app will end while I'm still in the development phase? Is the file size of my development folder roughly 1 to 1 ratio? Is the compressed file size of my development a better approximation? My .xcodeproj file is only a couple hundred kB, but the size of my folder is 11.8 MB. I have a .sqlite database, less than 20 small png images and a Settings.Bundle. The rest are unknown Xcode files related to build, build for iphoneOS, simulator etc.... My source code is rather large with around 1000 lines in most of the major controllers, all in all around 48 .h&.m files. But my classes folder inside my development folder is less than 800kb. Digging around inside my Build file, there is lots of iphone simulator files and debugging files which I don't think will contribute to the final product. The Application file states that it is around 2.3 MB. However, this is such a large difference from the 11.8 MB, I have to wonder if this is just another piece of the equation. I have the app on the my device, I'm in the testing phase. Therefore, I though that I would try to see how large the working version was on the device by checking in iTunes, however my development app is visible on the right-hand the application's iphone screen, but no information about the app most importantly its size. I also checked in Organizer, I used the lower portion of the screen-(Applications), found my application and selected the drop down arrow which gave my "Application Data" and a download arrow button to the right to save a file on my desktop, named with the unique AppleID. Inside the folder it had three folders-(documents, library, tmp) the documents had a copy of my .sqlite database, the library a few more files but not anything obvious or of size, and the tmp was empty. All in all the entire folder was only 164kb-which tells me that this is not the right place to find the size either. I understand that the size is considered to be the size of my binary plus all the additional files and images that I have add. Does anyone have a effective way of guaging how large the binary is or the relating the development folder size to what the final App Store application size will end up. I know that questions have been posted with similar aspects, but I could not find any answered post that really described...what files, or how to determine size specifically. I know that this question looks like a book, but I just wanted to be specific in conveying exactly what I'm looking for and the attempts thus far. *Note all files are unzipped and still in regular working Xcode order of a single app with no brought-in builds or referenced projects. I'm sure that this is straight forward, I just don't know where to look?

    Read the article

  • WPF Applications Size Vs Winforms App Size

    - by jmayor
    Does WPF compiled code is bigger or smaller than Winform compiled code? Does WPF generates more code behind that Winform does? I have a Winform App and I want to make a new version on WPF. Customers get the updates of this app by dowloading it. So my question is, If I make the application now on WPF just using the same screens how bigger can it be the compiled solution compared to the WinForm version.

    Read the article

  • Set size of JTable in JScrollPane and in JPanel with the size of the JFrame

    - by user1761818
    I want the table with the same width as the frame and also when I resize the frame the table need to be resized too. I think setSize() of JTable doesn't work correctly. Can you help me? import java.awt.Color; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.SwingUtilities; public class Main extends JFrame { public Main() { setSize(400, 600); String[] columnNames = {"A", "B", "C"}; Object[][] data = { {"Moni", "adsad", 2}, {"Jhon", "ewrewr", 4}, {"Max", "zxczxc", 6} }; JTable table = new JTable(data, columnNames); JScrollPane tableSP = new JScrollPane(table); int A = this.getWidth(); int B = this.getHeight(); table.setSize(A, B); JPanel tablePanel = new JPanel(); tablePanel.add(tableSP); tablePanel.setBackground(Color.red); add(tablePanel); setTitle("Marks"); setLocationRelativeTo(null); setDefaultCloseOperation(EXIT_ON_CLOSE); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { Main ex = new Main(); ex.setVisible(true); } }); } }

    Read the article

  • Why doesn't Windows XP show "Total Size" and "Free Space" for USB flash disks?

    - by Mehper C. Palavuzlar
    When I double click on My Computer, I can immediately see the Total size and Free space for internal and external HDDs, and inserted CD/DVD media, but in the same columns I cannot see these values for any USB flash drives. They are just empty. To see, I have to right click on USB drive letter, and select Properties. Is there a trick to make Windows XP display USB drive's Total size and Free space in My Computer window?

    Read the article

  • I want to increase the size of my boot partition (Ubuntu 14.04 version) [duplicate]

    - by Mike
    This question already has an answer here: How do I free up more space in /boot? 11 answers How to resize partitions? 5 answers I read in another post that kernels are distributed as new releases rather than upgrades. I didn't know this when I was allocating space to my partitions during my initial install of Ubuntu. As a result I ran out of space on my boot partition. Can I increase the size of it using GParted and how do I do this without doing damage to my system? 1 1049kB 512MB 511MB fat32 boot 2 512MB 768MB 256MB ext2 3 768MB 1000GB 999GB lvm Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-swap_1: 3712MB Sector size (logical/physical): 512B/4096B Partition Table: loop Number Start End Size File system Flags 1 0.00B 3712MB 3712MB linux-swap(v1) Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/ubuntu--vg-root: 996GB Sector size (logical/physical): 512B/4096B Partition Table: loop Number Start End Size File system Flags 1 0.00B 996GB 996GB ext4 Sorry, don't know how to capture and post the terminal output screen.

    Read the article

  • Sharp mx2600 driver cannot see all the paper trays

    - by Frank R
    I am wondering if someone might have experienced this problem and have a solution. I have just taken over a network about a month ago so it is hard to know what truly worked and didn't work. However the end users reported that they used to be able to choose the tray they wanted to print from in the printer preferences in the driver for the Sharp MX2600n device then send the print job. Now they only have two trays to choose from instead of the four trays that exist. The only thing I have changed that might relate to this network device is the Admin password on the domain controller. I haven't made any changes to the Sharp device or the driver, until recently when I tired to update the driver for this device but that didn't fix anything. The domain controller is a Server 2008 VM running in Hyper-visor and it is pushing the shared printer out to the domain. I have looked at the web interface to manage the device and I can see all four paper trays in there, however if I try to see the number of trays from the driver interface, I can only see the top two paper trays and there should be four of them. This is the same with the admin account on the server or a workstation inside the domain, also a standard user account see's the same result. I have even tried updating the tray status within the driver to show more trays, but that doesn't help. I am hoping there is someone out there that has experienced this problem and knows a solution.

    Read the article

  • Mouse pointer size inconsistent

    - by charon00
    Since installing Ubuntu 12.04, I've been having a problem with the mouse pointer size. On the desktop, it is quite a bit larger than it should be (24), though the different cursors (editing text, hyperlink hand, etc) are correct. The size changes to the correct size when the pointer is over some application windows (GVim, Netbeans, Firefox), but then changes back once it is moved out of the window. There was a similar question here, but the Xdefaults solution did not work for me, and I didn't want to try the one requiring editing the icon image. In addition, I've tried changing the cursor theme using sudo update-alternatives --config x-cursor-theme as well as using the dconf-editor, but though I can change the theme, the size issue remains. In case it's relevant, I'm running on a dual-screen setup with monitor sizes of 2560x1600 and 1920x1080, using the NVidia video driver. Is there another way to control pointer size, or a setting that might be messing it up? EDIT: These are the values/options I have for update-alternatives and in dconf-editor. I'm now wondering if Netbeans and Firefox are making the mouse pointer smaller than it should be, but I'm not sure how big 24 should be... update-alternatives: Selection Path Priority Status ------------------------------------------------------------ 0 /usr/share/icons/DMZ-White/cursor.theme 90 auto mode 1 /etc/X11/cursors/core.theme 30 manual mode 2 /etc/X11/cursors/handhelds.theme 20 manual mode 3 /etc/X11/cursors/redglass.theme 20 manual mode 4 /etc/X11/cursors/whiteglass.theme 20 manual mode * 5 /usr/share/icons/DMZ-Black/cursor.theme 30 manual mode 6 /usr/share/icons/DMZ-White/cursor.theme 90 manual mode dconf-editor: I can't post the image since I'm a new user but the cursor-size is set to 24 and the cursor-theme is DMZ-Black.

    Read the article

  • Problem to match font size to the screen resolution in libgdx

    - by Iñaki Bedoya
    I'm having problems to show text on my game at same size on different screens, and I did a simple test. This test consists to show a text fitting at the screen, I want the text has the same size independently from the screen and from DPI. I've found this and this answer that I think should solve my problem but don't. In desktop the size is ok, but in my phone is too big. This is the result on my Nexus 4: (768x1280, 2.0 density) And this is the result on my MacBook: (480x800, 0.6875 density) I'm using the Open Sans Condensed (link to google fonts) As you can see on desktop looks good, but on the phone is so big. Here the code of my test: public class TextTest extends ApplicationAdapter { private static final String TAG = TextTest.class.getName(); private static final String TEXT = "Tap the screen to start"; private OrthographicCamera camera; private Viewport viewport; private SpriteBatch batch; private BitmapFont font; @Override public void create () { Gdx.app.log(TAG, "Screen size: "+Gdx.graphics.getWidth()+"x"+Gdx.graphics.getHeight()); Gdx.app.log(TAG, "Density: "+Gdx.graphics.getDensity()); camera = new OrthographicCamera(); viewport = new ExtendViewport(Gdx.graphics.getWidth(), Gdx.graphics.getWidth(), camera); batch = new SpriteBatch(); FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/OpenSans-CondLight.ttf")); font = createFont(generator, 64); generator.dispose(); } private BitmapFont createFont(FreeTypeFontGenerator generator, float dp) { FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter(); int fontSize = (int)(dp * Gdx.graphics.getDensity()); parameter.size = fontSize; Gdx.app.log(TAG, "Font size: "+fontSize+"px"); return generator.generateFont(parameter); } @Override public void render () { Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); int w = -(int)(font.getBounds(TEXT).width / 2); batch.setProjectionMatrix(camera.combined); batch.begin(); font.setColor(Color.BLACK); font.draw(batch, TEXT, w, 0); batch.end(); } @Override public void resize(int width, int height) { viewport.update(width, height); } @Override public void dispose() { font.dispose(); batch.dispose(); } } I'm trying to find a neat way to fix this. What I'm doing wrong? is the camera? the viewport? UPDATE: What I want is to keep the same margins in proportion, independently of the screen size or resolution. This image illustrates what I mean.

    Read the article

  • Wireshark TCP Window Size Value

    - by T Vernon
    I am debugging an application with Wireshark and watching the TCP Window Size value shrink on one side of the communication. If the packet's TCP section shows a "Window size value: 1", does that mean the source's window size is 1 or the destination's window size is 1? I know one side is communicating faster than the other can handle, I just want be sure I know which one it is. 1 192.168.0.1 - 192.168.0.100, Modbus/TCP, Length: 66, Window Size Value: 1 2 192.168.0.100 - 192.168.0.1, TCP, Length: 60, Window Size Value: 92 3 192.168.0.100 - 192.168.0.1 TCP, Length: 310, Window Size Value: 92 4 192.168.0.1 - 192.168.0.100 TCP, Length: 54, Window Size Value: 0 So is 192.168.0.1's window size 0 or is it reporting that 192.168.0.100's window is 0? Thanks.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >