coolbud012's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Members
Active Posts:
43 (0.04 per day)
Joined:
01-July 11
Profile Views:
2,849
Last Active:
User is offline Dec 23 2013 09:50 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   coolbud012 has not set their status

Posts I've Made

  1. In Topic: Buttons won't match_parent

    Posted 23 Dec 2013

    View PostAp0C552, on 22 December 2013 - 01:53 PM, said:

    I am adding some buttons to an activity at runtime. The activity is a popup dialog.

    The buttons are stuck on wrap_content not matter what I do. I have set the parent view to match_parent, and the buttons to match parent, but they are still on wrap content.

    Is it possible that because the activity is is set to be a popup dialog, that all children within in it, will always be wrap_content? I can easily enough just specify button width in dp, but I am just wondering why this is not working.

    Any help would be greatly appreciated...thanks.


     root=(LinearLayout)findViewById(R.id.clipmenulayout);
    	     params=new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    	    
    	     if(!hasData)
    	     {
    	    	 button1=new Button(this);
    	    	 button1.setText(getResources().getString(R.string.copy));
    	    	 button1.setId(1);
    	    	 button1.setLayoutParams(params);
    	    	 
    		     button2=new Button(this);
    		     button2.setText(getResources().getString(R.string.clear));
    		     button2.setId(2);
    		     button2.setLayoutParams(params);
    		     root.addView(button1);
    		     root.addView(button2);
    	     }
    	     
    	     if(MainActivity.copied)
    	     {
    	    	button3=new Button(this); 
    	    	button3.setText(getResources().getString(R.string.paste));
    	    	button3.setLayoutParams(params);
    	    	button3.setId(3);
    	    	root.addView(button3);
    	     }
    	    
    


    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/clipmenulayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"  />
        
    </LinearLayout>
    
    



    Change the android:orientation="vertical" above to android:orientation="horizontal"


    Let me know if this does not work.
  2. In Topic: Using HTML files as TextViews in ListActivities

    Posted 10 Jun 2013

    It worked , I used :

    Spanned inHtmlCC = Html.fromHtml(getTipsText(files[position]));
    	    TvTips.setText(inHtmlCC);
    
  3. In Topic: Using HTML files as TextViews in ListActivities

    Posted 10 Jun 2013

    I am trying

    TvTips = (TextView) findViewById(R.id.TextView);
    	Spanned inHtmlCC = Html.fromHtml(getTipsText());
        
        TvTips.setText(inHtmlCC);
    


    Where I am facing problem is parsing the html files in the list activity...
  4. In Topic: Using HTML files as TextViews in ListActivities

    Posted 8 Jun 2013

    What I need to do is Pass the data of Html file into the TextView.
  5. In Topic: Using HTML files as TextViews in ListActivities

    Posted 8 Jun 2013

    Thanks for your reply but webviews wont solve my issue

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Comments

coolbud012 has no profile comments yet. Why not say hello?