Search Results

Search found 742 results on 30 pages for 'layouts'.

Page 3/30 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Android fragments problems different layouts

    - by juan
    I have two layouts: one for portait with one container and another for landscape with two containers. In the first layout I show a fragment and when the user select one element, I replace the fragment with another (with FragmentTransation.Replace). <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/container1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" /> </RelativeLayout> In the second layout I want to show the two fragments at one time, one in the first container and the second in the second container. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <LinearLayout android:id="@+id/container1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" android:orientation="vertical" /> <LinearLayout android:id="@+id/container2" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="7" android:orientation="vertical" /> </LinearLayout> But I can't make this works with configuration changes. I try use different names for containers, try add fragments when only bundle is null,... Someone have a working code of this case?

    Read the article

  • Multiple layouts in rails [Newbie Q]

    - by BriteLite
    Hi. As a newb, I decided to build a "home inventory" application. I am now stuck on how to programmatically select a layout based on what type of item it is when viewing it in a browser. According to my planning, so far I should have created a few models to represent types of items I can find in my home: Furniture, Electronics and Books. class Book < ActiveRecord::Base end class Furniture < ActiveRecord::Base end class Electronic < ActiveRecord::Base end Now the Books model has things like isbn, pages, address, and category. Furniture model has things like color, price, address, and category. Electronics has things like name, voltage, address, and category. Here is where I got confused. I know the property address is going to be the same for all of them. I also know that, I will need to create multiple "layouts" for 3 different types of items to show the different properties of said items with appropriate graphics and stylesheets. But how will I go about deciding which category the item is so I can determine which layout to render. According to me, this is how I will do it: class DisplayController < ApplicationController def display @item = Params[:item] if @item.category = "electronics" render :layout => 'electronics' end end In my routes.rb map.display ':item', :controller => 'display', :action => 'display' I only seem to have one concern with this, I probably will add a lot of categories later on and think there should be a more DRY-esque way of dealing, rather than hardcoding them. I understand that I need to add into my layout html tags to display relevant information for that particular category. ----Questions---- Is this the right way to approach this type of problem. Will this approach be compatible when I decide to add a gem like *thinking_sphinx* to run search. What issues do you see with my approach and how can I make it better. I was reading something about "Polymorphic Assoc", does that apply in this case, since category exist for all items? Also, I was trying to get a routes to render a URL like "http://localhost/living-room-tv"

    Read the article

  • $this->headLink() includes duplicated script

    - by terrani
    Hi, Just like I did before, I used the following code for my new project. <?=$this->headLink()->appendStylesheet('/Layouts/admin/css/button.css');?> <?=$this->headLink()->appendStylesheet('/Layouts/admin/css/inputText.css');?> <?=$this->headLink()->appendStylesheet('/Layouts/admin/css/fancyTable.class.css');?> when I open the website and view source, there are duplicated css link tags. <link href="/Layouts/admin/css/button.css" media="screen" rel="stylesheet" type="text/css" ><link href="/Layouts/admin/css/button.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/inputText.css" media="screen" rel="stylesheet" type="text/css" ><link href="/Layouts/admin/css/button.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/inputText.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/fancyTable.class.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/button.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/inputText.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/fancyTable.class.css" media="screen" rel="stylesheet" type="text/css" > <link href="/Layouts/admin/css/divine.css" media="screen" rel="stylesheet" type="text/css" > What is going on with my code??

    Read the article

  • Ruby GUI (non-complex layouts)

    - by Ruby Novice
    I've done quite a bit of research on Ruby GUI design, and it appears to be the one area where Ruby tends to be behind the curve. I've explored the options of MonkeyBars, wxRuby, fxRuby, Shoes, etc. and was just wanted to get some input from the Ruby community. While they're definitely usable, the development on each seems to have fallen off. There is not a great deal of useful documentation or user bases that I could find on any (minus the fxRuby book). I'm just looking to make a simple GUI, so I don't really want to spend hundreds of hours learning the intricacies of the more complex tools or attempt to use something that is no longer even being developed (Shoes is the type of application I'm looking for, but it's extremely buggy and not being actively developed.) Out of all of the options, which would you guys recommend as being the quickest to pick up and that still has some sort of development base? Thanks!

    Read the article

  • Resizing layouts for orientation change?

    - by Cole
    Normal: Landscape: See how the ListView overlaps other things on the screen when in landscape mode? How can I keep this from happening? XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/main" > <RelativeLayout android:id="@+id/myWishLists" android:layout_width="fill_parent" android:layout_height="50dp"> <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:prompt="@string/optionsSpinner" android:entries="@array/options" /> </RelativeLayout> <TextView android:id="@+id/myListsText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/myWishLists" android:layout_centerHorizontal="true" android:text="My Wish Lists" android:textStyle="bold" android:textAppearance="?android:attr/textAppearanceLarge" /> <RelativeLayout android:id="@+id/listsList" android:layout_width="fill_parent" android:layout_height="445dp" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true"> <ListView android:id="@+id/lists" android:layout_width="fill_parent" android:layout_height="fill_parent" android:entries="@array/entries" > </ListView> </RelativeLayout> </RelativeLayout>

    Read the article

  • How to reuse layouts in WPF

    - by Ingó Vals
    I'm trying to create a application that will be tabbed where each tab will have a button area and a view area. Now each tab will essentially have the same layout just different things in the layout and I wanted to be able to reuse the same layout so that I won't have to change at many places ( it's just not good programming ). Can I accomplish this using resources or perhaps Styles. Please supply a light code example if possible.

    Read the article

  • Advantages of different tab layouts

    - by Kelend
    When developing for android what are the benefits of using tabs to hold views or hold separate activities. I've read that both ways are better, but can't seem to find any good resources suggesting why or when to use each method.

    Read the article

  • Help me understand dynamic layouts in Sinatra

    - by thermans
    Help me understand this; I'm learning Sinatra (and Rails for that matter, er, and Ruby). Say I'm doing a search app. The search form is laid out in one div, and the results will be laid out in another. The search form is rendered into the div by a previous view (maybe from a login form). I want to process the form params, perform the search, and render the results into the results div. If I have a single "yield" in the layout and render the divs from different views, the results div erases the search div when it renders. If I define the divs in the default layout, then just render the content, obviously the layout will be messed up: there would have to be two "yields" and I don't think Sinatra supports passing blocks in to yields. I tried foca's sinatra-content-for plugin, and that seems closer to what I need. But I can't figure out where to place the "yield_content" statements. If I have this haml in my layout: #search -# search form = yield_content :search #results -# search results = yield_content :results ... this in my search view: - content_for :search do %form{:method => "post"... etc. ... and this in the results view: - content_for :results do %table{:class => 'results'... etc. This sort of works but when I render the results view, the search div is emptied out. I would like to have it remain. Am I doing something wrong? How should I set this up?

    Read the article

  • Need help with Layouts in Swing

    - by Malki
    Hi, I'm using Java Swing and I have the following problem: I have a class TnaiPanel that extends JPanel. In this class I am creating 3 components and then lay them out in a horizontal line using a BoxLayout. Also, I have a class TnaimDinamimPanel that also extends JPanel. This class contains multiple occurances of TnaiPanel, layed out vertically using a BoxLayout. Also, I have a class MainFrame that extends JFrame. This frame contains a menu-bar and one main panel. The main panel can change (when choosing a certain menu-item, I create a new panel and set it to show as the main panel of the frame). Now, for some reason I get "BoxLayout can't be shared" when I add the newly created TnaimDinamimPanel to the components of the frame. I don't mind using different layout objects. The result I want to get is a sort of "table" of components, where each TnaiPanel will have fixed component sizes and spacing, essentially serving the role os a "row" in the "table". Thanks, Malki.

    Read the article

  • Best way to deal with multiple layouts in symfony

    - by Pierre
    Hey folks. I'm looking for the best way to do something simple in symfony. Basically, I have a module in which all the pages will contain the same header and footer. That module also shares the same general layout as the other modules. I'm just wondering, should I create one file and have my content pages called up as partials or should all files have their own content and somehow call the two other templates. I made a quick example of my setup: http://grab.by/3Riy Hopefully, it'll help understand what I'm trying to do. Thanks!

    Read the article

  • Dataflow in Controllers & Layouts in Zend Framework

    - by favo
    I use a basic setup which uses a layout.phtml for the HTML Layout and view scripts for the content part. I want to control some variables in the layout in my controllers, i.e. the title of my site. How can I access my layout to output variables from within the controller? Thanks for your feedback!

    Read the article

  • Android -- SDK/IDE Layout Bug (w/Custom Layouts)??

    - by borg17of20
    Hello all, Can someone tell me if this is a bug in the SDK/IDE: Any custom or extended layout I add to my layout XML causes the IDE to ignore the fact that there are any child views of that layout (they just disappear from the outline view/window), thus making them uneditable via the properties view/window. (I need to extend a layout to make onSetAlpha() public) FYI: I'm developing for Android 1.5 and up, using all the latest plug-ins/updates in Eclipse Here is a simple example of a layout XML and the extended Layout that causes this error. [Extended Layout] package com.test; public class CustomLinearLayout extends LinearLayout { public CustomLinearLayout(Context context, AttributeSet attrs) { super(context, attrs); } public CustomLinearLayout(Context context) { super(context); } } [Simple layout XML] <?xml version="1.0" encoding="utf-8"?> <com.test.CustomLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView> </com.test.CustomLinearLayout> ImageView01 is not visible or editable in the properties or outline views/windows. Thanks.

    Read the article

  • Having issues with div layouts

    - by Chowderhound
    new here and I'm crossing fingers for help. I'm working on http://www.catgriz.com On the frontpage I have a slideshow that stacks all of the information on top of itself when you initially visit the page. But after a simple browser refresh, it displays correctly. I was hoping someone could look at it and point me in the right direction of what I've done wrong. I'm using Joomla with a Yootheme. Thank you so much in advance!

    Read the article

  • Refactoring routes - serving different layouts

    - by dmclark
    As a Rails NOOB, I started with a routes.rb of: ActionController::Routing::Routes.draw do |map| map.resources :events map.connect 'affiliates/list', :controller => "affiliates", :action => "list" map.connect 'affiliates/regenerate_thumb/:id', :controller => "affiliates", :action => "regenerate_thumb" map.connect 'affiliates/state/:id.:format', :controller => "affiliates", :action => "find_by_state" map.connect 'affiliates/getfeed', :controller => "affiliates", :action => "feed" map.resources :affiliates, :has_many => :events map.connect ":controller/:action" map.connect '', :controller => "affiliates" map.connect ":controller/:action/:id" map.connect ":controller/:action/:id/:format" end and i'm trying to tighten it up. and I've gotten as far as: ActionController::Routing::Routes.draw do |map| map.resources :events, :only => "index" map.resources :affiliates do |affiliates| affiliates.resources :has_many => :events affiliates.resources :collection => { :list => :get, :regenerate_thumb => "regenerate_thumb" } end # map.connect 'affiliates/regenerate_thumb/:id', :controller => "affiliates", :action => "regenerate_thumb" map.connect 'affiliates/state/:id.:format', :controller => "affiliates", :action => "find_by_state" map.connect 'affiliates/getfeed', :controller => "affiliates", :action => "feed" map.root :affiliates end what is confusing to me is routes vs parameters.. For example, I realized that the only difference between list and index is HOW it is rendered, rather than WHAT is rendered. Having a different action (as I do now) feels wrong but I can't figure out he right way. Thanks

    Read the article

  • Emacs, Linux and international keyboard layouts

    - by sabof
    Is there an easy way to use emacs key-bindings when you are using a not-English (Russian) keyboard layout? Whenever an international layout is on, all keystrokes are interpreted literally, M-? instead of M-a. As a result I can't use commands. It would also be nice if Linux could interpret non-prefixed and shift-prefixed keys according according to an international layout, while keeping the rest English.

    Read the article

  • Facelet components layouts and javascript

    - by Java Drinker
    Hi all, I have a question regarding the placement of javascript within facelet components. This is more regarding best practice/style than a programming issue, but I feel like all the solutions I have thought of have been hacks at best. Ok here is my scenario: I have a facelet template like so (my faces, and apache Trinidad)... <ui:composition> <f:view locale="#{myLocale}"> <ui:insert name="messageBundles" /><!--Here we add load bundle tags--> <tr:document mode="strict" styleClass="coolStyleDoc"> <f:facet name="metaContainer"> <!--This trinidad defined facet is added to HTML head--> <tr:group> <!-- blah bal my own styles and js common to all --> <ui:insert name="metaData" /> </tr:group> </f:facet> <tr:form usesUpload="#{empty usesUpload ? 'false' : usesUpload}"> <div id="formTemplateHeader"> <ui:insert name="contentHeader" /> </div> <div id="formTemplateContentContainer"> <div id="formTemplateContent"> <ui:insert name="contentBody" /> </div> </div> <div id="formTemplateFooter"> <ui:insert name="contentFooter"> </ui:insert> </div> </tr:form> <!-- etc...---> Now, a facelet that wants to use this template would look like the following: <ui:composition template="/path/to/my/template.jspx"> <ui:define name="bundles"> <custom:loadBundle basename="messagesStuff" var="bundle" /> </ui:define> <ui:define name="metaData"> <script> <!-- cool javascript stuff goes here--> </script> </ui:define> <ui:define name="contentHeader"> <!-- MY HEADING!--> </ui:define> <ui:define name="contentBody"> <!-- MY Body!--> </ui:define> <ui:define name="contentFooter"> <!-- Copyright/footer stuff!--> </ui:define> </ui:composition> All this works quite well, but the problem I have is when I want to use a facelet component inside this page. If the facelet component has its own javascript code (jQuery stuff etc), how can I make it so that that javascript code is included in the header section of the generated html? Any help would be appreciated. Please let me know if this is not clear or something... thanks in advance

    Read the article

  • Self organizing layouts

    - by user613326
    Quite a while ago i was more in websites building then i am now. In my time there where huge debates about what to use; tables or pure CSS alternatives. I went out of the webdesigning, but now an old question re-surfaces. What i would like to create is a web page design that depending on screensize, would self organize the page into columns, so that for example on a PDA it would show 1 column On an old computer monitor, it would show 2 colomns, and on a widescreen laptop it would show 3 columns. I forgot how this was called and how it was done in the past, it had to do with XML and storing data seperate from design (if i remember well), perhaps these days better methods exist to do that, does this, anyone ring this a bell ? Also i note a lot is possible with Jquery and and brouwser depending webkits. But i need to make sure that it would run on all (modern) brouwsers : Iexplorer, Firefox, chrome And Jquery is nice too, but i am kinda woried that some day one of these brouwser vendors decides that jscript like java isnt enabled by default (or is that very unlikely ?)11 Perhaps someone can point me to a method that is the prefered way to do this.

    Read the article

  • Android Layouts Scrolling in Landscaped Mode

    - by y ramesh rao
    I have a strange issue in which on rotating the Screen to Landscaped mode the Views present inside Remain at the same place But I cannot scroll them inside the screen. How can I make them Scroll so that every thing that move out should be displayed properly to the user. Should there be any more attribute to be set for allowing such kind of behavior.

    Read the article

  • Multiple Rails forks with separate designs and layouts

    - by mettadore
    I have a Rails project that is basically a simple web app for a membership-based organization. We've open sourced the code on Github for the web app so that others can use it, but have a licensed design/layout that the original organization is going to use. This layout cannot be open sourced. I was wondering if others have run into the situation where you have an open-source Rails app with a non-OS design. My initial thought is to put app/views in .gitignore, and to have anyone forking the code add their own views directory, perhaps including an app/views_default directory with a web-app-theme layout or something else to get people running. Is this the best option (realizing that there are other files such as JavaScript, CSS, etc that come with the layout that must also be ignored). Does anyone have some good thoughts or pointers on this?

    Read the article

  • -Java- Swing GUI - Moving around components specifically with layouts

    - by Xemiru Scarlet Sanzenin
    I'm making a little test GUI for something I'm making. However, problems occur with the positioning of the panels. public winInit() { super("Chatterbox - Login"); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(ClassNotFoundException e) { } catch (InstantiationException e) { } catch (IllegalAccessException e) { } catch (UnsupportedLookAndFeelException e) { } setSize(300,135); pn1 = new JPanel(); pn2 = new JPanel(); pn3 = new JPanel(); l1 = new JLabel("Username"); l2 = new JLabel("Password"); l3 = new JLabel("Random text here"); l4 = new JLabel("Server Address"); l5 = new JLabel("No address set."); i1 = new JTextField(10); p1 = new JPasswordField(10); b1 = new JButton("Connect"); b2 = new JButton("Register"); b3 = new JButton("Set IP"); l4.setBounds(10, 12, getDim(l4).width, getDim(l4).height); l1.setBounds(10, 35, getDim(l1).width, getDim(l1).height); l2.setBounds(10, 60, getDim(l2).width, getDim(l2).height); l3.setBounds(10, 85, getDim(l3).width, getDim(l3).height); l5.setBounds(l4.getBounds().width + 14, 12, l5.getPreferredSize().width, l5.getPreferredSize().height); l5.setForeground(Color.gray); i1.setBounds(getDim(l1).width + 15, 35, getDim(i1).width, getDim(i1).height); p1.setBounds(getDim(l1).width + 15, 60, getDim(p1).width, getDim(p1).height); b1.setBounds(getDim(l1).width + getDim(i1).width + 23, 34, getDim(b2).width, getDim(b1).height - 5); b2.setBounds(getDim(l1).width + getDim(i1).width + 23, 60, getDim(b2).width, getDim(b2).height - 5); b3.setBounds(getDim(l1).width + getDim(i1).width + 23, 10, etDim(b2).width, getDim(b3).height - 5); b1.addActionListener(clickButton); b2.addActionListener(clickButton); b3.addActionListener(clickButton); pn1.setLayout(new FlowLayout(FlowLayout.RIGHT)); pn2.setLayout(new FlowLayout(FlowLayout.RIGHT)); pn1.add(l1); pn1.add(i1); pn1.add(b1); pn2.add(l2); pn2.add(p1); pn2.add(b2); add(pn1); add(pn2); } I am attempting to use FlowLayout to position the panels in the way desired. I'd use BorderLayout while adding, but the vertical spacing is too far away when I just use directions closest to one another. The output of this code is to create a window, 300,150, place whatever's in the two panels in the exact same spaces. Yes, I realize there's useless code there with setBounds(), but that was just me screwing around with Absolute Positioning, which wasn't working out for me either.

    Read the article

  • Android layouts within layouts, with separate classes handling their input?

    - by Demonofloom
    Hey all, I have created a program in Java that uses Jpanels within Jpanels. One example of this is having a side view containing buttons that change the main view when pressed. The main view also has buttons that can be used to alter itself. I am trying to re-create this on the android. I have my layout set up from an xml, with a side panel containing buttons and the main view. There is another xml that contains what I want in the main view. Now I am struggling to get this separate xml to be displayed in the main view and can’t figure out how I would get the class to handle its own input. I don’t want to paste the code into the main.xml as I want to keep things object orientated and each view needs some custom elements such as different textviews. An example of what I am trying to convert for the android is below:- //The ViewInt class has its own layout ViewInt tempView = new ViewInt(i, mFloorNo); //The viewInt class is then added to the main window. mainWindowPanel.add(tempView); This small bit of code would create a view, add it to the main view and then any input in the main window is handled by that class, but at the same time any input not in this main window is handled by another class (probably the root class). Any help is greatly appreciated, thanks. To clarify: The program has a side panel layout, containing buttons. And a main view layout that is empty. I am trying to set a .xml layout to this main view layout, and have it so that if any buttons are pressed in that main view then a class for that layout will handle it.

    Read the article

  • Snapping elements / conditional layouts

    - by Felix
    Sorry for the extremely bad title, I have no other idea what to call this question. What I'm trying to do is this: have a RelativeLayout which has two children: one with layout_centerInParent="true" one with layout_alignParentBottom="true" However, when the device is in landscape mode, element (1) appears slightly over or under element (2). But, element (1) has enough space above it to appear above element (2). How could I make the layout so that if the screen is too small to center element (1) and make both elements not overlap, then align element (1) above (as in layout_above) element (2)?

    Read the article

  • YUI vs jQuery, for css style layouts

    - by tony
    Hi Complete novice question. I've used jQuery a bit, YUI not at all and know very little about it. I work on a website thats IE specific, we're now looking at making it cross browser. jQuery seems great at hiding the differences between browsers from a javascript point of view. However in terms of css layout is it YUI that I should really be looking at? thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >