Android :: Scrollview Dropshadow Attributes Available?

Feb 5, 2010

can i affect the look of the dropshadow that the scroll view shows when there's "more" available via scrolling? i'm not seeing anything in the scrollview docs.

Android :: scrollview dropshadow attributes available?


Android :: What Are The Attributes To Specify In The - Scrollview Xml File

Aug 29, 2009

Can u tel me what are the attributes we want to specify in the <scrollview> xml file.... bcoz i want to display scrollbar n my layout...i tried scrollview but it shows an error like force to close....

View 2 Replies View Related

Android :: ScrollView .scrollTo Not Working - Saving ScrollView Position On Rotation

Jul 16, 2010

I must be overlooking something real simple here, but i think i'm trying to do something fairly basic.. Simply retain the scrollbar position of a ScrollView on orientation change...

Here is the code for my onSaveInstanceState and onRestoreInstanceState.. sView is the container for the ScrollView layout. Within my scrollview is a linearlayout with a lot of textviews.

CODE:............

If I set a Toast with the values of sViewX and sViewY on the Restore, the values are kept and correct.

I just tried to do a sView.scrollTo(0,150); in my onCreate.. just to see if that would open the activity at 150px down, and it didn't. I think my issue has to do with the .scrollTo method.

View 1 Replies View Related

Android :: Create A ListView That's Not In A ScrollView - Or Has The ScrollView Disabled

Mar 10, 2010

I want some of the goodies in a ListView, like being able to use a ListAdapter, and item selection, etc, but I don't want the ScrollView portion of it. I want to implement that part myself, in a different way (why or how I do this isn't really the point of this question, so please don't ask "why"). Is there a way to have a ListView that's not in a ScrollView or has the scrolling disabled?

View 2 Replies View Related

Android :: How To Set Same XML Attributes To All Activities ?

Dec 7, 2009

In my application, I don't want the activity to restart when user changes his mobile's orientation or when he opens his physical keyboard.So, I have to assign the following XML attribute to all my activities in the manifest file.Is it possible to assign the same XML attribute value to all activities ? Or should I copy the attribute in all the <activity> tags of the manifest?

View 3 Replies View Related

Android :: How To Set Xml Attributes In Code

Nov 5, 2009

I met a problem in setting xml attribute at run time.

For example I define a xml layout like this:

CODE:.......................

I want to set android:drawableLeft="@drawable/icon" at runtime.But thers has no setter method for this attribute.

View 2 Replies View Related

Android :: Custom Xml Attributes For PreferenceScreen

Sep 26, 2010

I use custom xml attributes for preferences. The preferences are inflated from xml.I managed to create and read custom xml attributes for EditTextPreference, ListPreference and CheckBoxPreference by creating custom classes which inherit from the respective preference class.My problem is that I can't do this for the PreferenceScreen class, as it is a final class. So my question is: Is there any way I can read the custom attributes of a PreferenceScreen?

View 1 Replies View Related

Android :: Attributes Represented By Expresions

Nov 26, 2009

Is it possible to define an attribute value of a height attribute, for example, relative to its parent's height. For instance, I want the linear_layout's height to be 2/3 of its FrameLayout parent. I have a FrameLayout with two linear_layouts. The first linear_layout fills the entire FrameLayout and the second linear_layout overlaps the first but only 2 / 3 of its height.

View 3 Replies View Related

Android :: Get Attributes Of A Media File

Jan 22, 2010

I have downloaded a media file. (say mp3 file). I need to get the attributes of the file, like ARTIST, TITLE etc.

View 4 Replies View Related

Android :: Set TextView Attributes Programmatically?

Sep 12, 2010

I am desperately trying to set TextView attributes of cells within a table programmatically but can't get this to work! Whenever I set layout properties, the field will simply not appear (but not give any error or exception). I boilded this down to this simple example:

CODE:.......

This will show three fields, but when you uncomment the five commented line, then NOTHING will appear. Why is that so? Why does setting layout parameters cause my TextView's to not appear? I'm stuck! What am I missing?

Here's the manifest, if some kind soul quickly wants to try this out:

CODE:.....................

View 2 Replies View Related

Android :: Weight Sum - Layout Attributes Not Working

Nov 26, 2009

I have a simple horizontal linear_layout with bunch of image views in it. the trick is that the views have different widths, relative to the size of their parent (the linear layout). I set the layout's weightSum to a 100 and the layout_weight to let's say 10 of one view and 15 of the other, on so on. And it did not work. I also tired using float values setting the weightSum to 1.0 and the layout_weight of the image views to 0.2 and 0.3 and so on. But it didn't work either. I did search this group for any references to the weightSum but found nothing. Any ideas how to handle it?

View 5 Replies View Related

Android :: App For Changing Voice Attributes With Phone?

Feb 10, 2009

I want to create an application that can change one's voice during a call in real time is there a way to do that in android? can you point me to the right package?

View 2 Replies View Related

Android :: Add / Read New Attributes From / To A Declare-styleable

Aug 27, 2009

I was wondering if anyone could give me hints on this one (i am re-posting an older version of a question i once had): i created a new attrs.xml that adds some functionality to the soft keyboard sample code.. code...

View 2 Replies View Related

Android :: Attributes For Multiple Resources In Attrs.xml

Apr 17, 2009

I'm introducing multiple custom widgets for my application, extending View. These widgets (LineGraph and DotMatrix) include various attributes that can be set via the layout-xml. How can I have multiple widgets using attributes with the same name. For instance, 2 attributes both having color as an attribute that can be set via the layout XML?

main.xml snippet:

CODE:......

When I want to add the info for my LineGraph in attrs.xml, Eclipse starts to whine: "ERROR Attribute "color" has already been defined" XML:

CODE:.......

Is it not possible to have a DotMatix resource with a color attribute, and a LineGraph resource with a color attribute?

View 3 Replies View Related

Android :: Adding A Couple Attributes To The Contact

Oct 12, 2009

Steps necessary to add a couple simple attributes to the stock Android Contacts application. Also, in the event the vendor has shipped their own Contacts application, will the same solution apply equally well to those handsets shipped with custom apps? I'm not looking for anyone to supply code; just a design pattern and any caveats I need to be aware of. I am writing an application that requires a couple new properties on the contact.

View 2 Replies View Related

Android :: Properties For Application Specific Attributes?

Oct 20, 2010

I want to center the application title/label in my android app but I can't find a lot of documentation on how to set that property. I have found a couple of posts saying that I can create a custom title bar and change the theme in my manifest but I just can help think there is a simpler way to just center the title.

View 2 Replies View Related

Android : Custom Attributes In Library Projects?

Jul 8, 2010

Having custom attribute (in attrs.xml) in library project leads to compilation fail of the project dependent of that library.Code...

How to avoid this except for no having custom attributes in library?

View 7 Replies View Related

Android :: Custom Widget - Attributes In The Layout Xml Files

Aug 6, 2010

I have defined custom views in the various layout .xml files. However, all the layouts are using the Linear Layout - put the content would vary.

I would like to create my own widget tag something like <com.mypackage.MyLinearLayout />, I would like to pass the layout as a param to the <com.mypackage.MyLinearLayout layout="@layout/simple.xml" />

How to define new attributes to the custom widgets ? Simply defining a getter/setter method would work or is there any other references.

View 2 Replies View Related

Android :: Setting Layout Attributes Based On OS Version?

Sep 14, 2010

Is there a way to specify a background in a layout based on OS version?:

android:background_1.5="@color/white"android:background_above_1.5="@drawable/mybackground"

I'm running into a problem where using a 9 png drawable for the background causes a stack overflow exception on a listview item (stack trace shows its related to a child TextView -> drawText()). The layout is simple:

<LinearLayout><ImageView /><TextView /></LinearLayout>

and the background works fine on 1.6 and above. It's just 1.5 that's having the issue. If I set the background to be a color, it works fine.

View 12 Replies View Related

Android :: Using Resource Values As Layout Attributes - Config.xml

Mar 28, 2010

Looking in the android sdk folders, I've found a file called values/config.xml. This seems to be somewhere that you can define values for later use in layouts and animations.

Given the config.xml:

<resources>
<string name="config_somePadding">50dip</string>
</resources>

How would I reference this to use as the layout_height in a layout xml file?

@string/config_somePadding is actually the only one I've found that doesn't throw an error in Eclipse (even though there isn't a config_somePadding in values/strings.xml), but it appears to just put an empty string.

In the sdk, they use an integer for animation duration. They reference it like this: android:duration="@android:integer/config_longAnimTime". Is there a way to use values that aren't integers in the layout_height attribute?

View 1 Replies View Related

Android :: Set Attributes - Margin - Gravity To View Programmatically?

Apr 27, 2010

I need to create a GUI (layout+views) in my .java activity class (I know it's far more flexible and easier to use .xml layout file, but I don't want to use it for now).

I can't find any setGravity() (but a "Gravity" object I can't figure how to use) or any set setMargin() method for the "View" object. What is the easiest way to do it?

View 1 Replies View Related

Android :: Accesing Attributes Of Java Class Using Webview

Sep 20, 2010

I am able to bind an object to Javascript through addJavaInterface() of WebView. I am able to access methods from JavaScript, Is there a way to access the java class attributes through JavaScript?

View 2 Replies View Related

Android :: SeekBar Minimum And Continuous Float Value Attributes

Jun 9, 2010

I'm looking for a way to implement a minimum value in my SeekBar and also have the option to increment decimal numbers. For example, currently my SeekBar's minimum is set to 0, but I need it to start at the value 0.2. Also, I would like to have the functionality to be able to have the user select a number from 0.2 to 10.0 at a .1 precision so they can choose the numbers 5.6 or 7.1.

Here are the style attributes for my SeekBar:

CODE:..............

View 1 Replies View Related

Android :: Relative Layout XML Attributes Have No Obvious Programmatic Equivalent

Jun 16, 2009

If a RelativeLayout must be generated at run time, what are the equivalent API calls for the attributes set in the XML Layout editor? Take for example this very simple RelativeLayout that places the second ImageView to the right of the first ImageView:

<?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="horizontal" android:background="@drawable/ bg_sunrise"
android:layout_gravity="center" android:gravity="center">
<ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon"></ ImageView>
<ImageView android:id="@+id/ImageView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/ ImageView01" android:src="@drawable/icon"></ImageView> </RelativeLayout>

Of the many, variations I tried, I had the most hope for this one, but it didn't work either:

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
RelativeLayout layout = new RelativeLayout(this);
layout.setLayoutParams( new ViewGroup.LayoutParams (
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ) );
ImageView imageView1 = new ImageView(this);
imageView1.setImageResource(R.drawable.icon);
imageView1.setAdjustViewBounds(true);
// set the ImageView bounds to match the Drawable's dimensions
RelativeLayout.LayoutParams params1 = new RelativeLayout.LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params1.addRule(RelativeLayout.ALIGN_PARENT_TOP); layout.addView(imageView1, params1);
ImageView imageView2 = new ImageView(this); imageView2.setImageResource(R.drawable.icon);
imageView2.setAdjustViewBounds(true); // set the ImageView bounds to match the Drawable's dimensions
RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams
(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params2.addRule(RelativeLayout.RIGHT_OF, imageView1.getId());
layout.addView(imageView2, params2); this.setContentView(layout); }

Can anyone offer the Java equivalent to the above XML? Can anyone explain why there is no attribute, getter/setter, or method for accessing the properties that can be set in XML? What is the most elegant solution for dynamically creating Layouts, Views, and other Resources on the Android platform when there is no Java programmatic equivalent?

View 11 Replies View Related

Android :: Setting Attributes Of An EditText Added Dynamically In Phone

Nov 17, 2010

I am developping an android app which downloads an xml and displays a layout with a number of edittexts, checkboxes, spinners, etc. added dynamically like this:

LinearLayout ll = new LinearLayout(this);
EditText nameField = new EditText(this);
ll.addView(nameField);
ScrollView sv = new ScrollView(this);
sv.addView(ll);
setContentView(sv);

I'm having trouble with setting some properties to an EditText added this way. For examle android:maxLength attribute can easily be set in an xml layout but I found no method to do the same in the java code. How can I do it when hawing to add dynamically?

View 2 Replies View Related

Android :: How To Automatically Resize An EditText Widget With Some Attributes In TableLayout

Apr 28, 2010

I have a layout issue. What I do is this:

CODE:..............

Class "NoteElement" extends TableRow. The 1st row just consists of a blank ImageView as a placeholder and an EditText to enter text. NoteElement's constructor looks like this:

CODE:..............

Method addTextField() specifies the attributes for the EditText widget:

CODE:..............

So far, so good. But my problem occurs as soon as the available space for the chars is depleted. The EditText does not resize itself but switches to a single line EditText.

I am desperatly looking for a way in which the EditText resizes itself in its height dynamically, being dependant on the inserted text length.

View 2 Replies View Related

Android : Define Default Attributes Of A Widget As Applicable App In Context?

Apr 30, 2009

Is there a way define widget default values in the context of an application.

View 2 Replies View Related

Getting Build Errors On Theme Attributes

Aug 20, 2013

I want to change the values of a couple attributes in Theme.

I've looked at the file /platforms/android-15/data/res/themes.xml and found these attributes in the definition of Theme --

<item name="androidanelMenuIsCompact">false</item>
<item name="androidanelMenuListWidth">296dip</item>

[Code]...

when I build, the item lines get the errors --

No resource found that matches the given name: attr 'androidanelMenuIsCompact'.
No resource found that matches the given name: attr 'androidanelMenuListWidth'.

We know these are valid attributes, since they are in the theme definition, and they are also in the file attrs.xml, in the same directory as themes.xml.

View 1 Replies View Related

Android :: Scrollview And Listview

Mar 9, 2010

How to add listview inside scrollview ?

CODE:................

I added listview inside scroolview. But its not showing in proper way. The listview is showing only in smaller size.

I tried in most of the ways ? But i can't able to get...

View 5 Replies View Related

Android :: ScrollView Listview Again Again

Mar 25, 2010

I'm new to Android development and having a hard time making the UI, so hopefully someone here can help me with a hint...

What I need in my layout is this:

CODE:...............

as you can see the layout will need scrolling, but adding a scrollview as a root to the RelativeLayout tag, didnt do anything...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved