whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest Search | Active Topics | Log In | Register

BarChart and Textview on the same activity Options · View
bambuk
#1 Posted : Friday, July 23, 2010 12:28:34 PM
Rank: Newbie

Groups: Registered

Joined: 7/23/2010
Posts: 6
Location: Bordeaul
Hi,

I've created a Bar chart and i would like to add a Texview on its bottom, but Textview don't want to appear on screen.

Textview appears only is it's on the Top of Bar chart.

Is it due to AiCharts implementation ?
Is it possible to have a Textview on the bottom of a chart ?

You'll find attached the two Layout :
- the one who works (suffix "OK") but i don't want to (Textview is on the top of the chart).
- the one who don't works (suffix "NOT_OK"), but i would like it to work (Textview is on the bottom of the chart).
File Attachment(s):
ecranstatistiquesgeneralesparheure.zip (2kb) downloaded 4 time(s).
vijayakumar
#2 Posted : Friday, July 23, 2010 2:35:05 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
Hi

Give android:layout_weight="1" in xml file in chartview
bambuk
#3 Posted : Saturday, July 24, 2010 12:15:27 PM
Rank: Newbie

Groups: Registered

Joined: 7/23/2010
Posts: 6
Location: Bordeaul
I tried but i doesn't work either.
Did you try it ?
vijayakumar
#4 Posted : Monday, July 26, 2010 8:31:00 AM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
Hi,

I tried in my program its working.you post your code i will tell you .

















bambuk
#5 Posted : Monday, July 26, 2010 6:25:05 PM
Rank: Newbie

Groups: Registered

Joined: 7/23/2010
Posts: 6
Location: Bordeaul
Here is the code :

- ecranstatsgenerales.xml

<?xml version="1.0" encoding="utf-8" ?>

<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxHeight="100dip"
>

<!-- Titre de l'écran en haut sur fond jaune -->
<TextView
android:layout_width="wrap_content" android:gravity="center_vertical|center_horizontal"
android:layout_height="wrap_content"
android:text="Statistiques générales"
/>

<!-- Graphique -->
<com.artfulbits.aiCharts.ChartView
android:id="@+id/chartView"
chart="@xml/graphstatistiquesgenerales"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<!-- FOOTER -->
<!-- Texte : date de mise à jour des statistiques -->
<TextView
android:id="@+id/date_maj_stats"
style="@style/BasPageSmall"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
</FrameLayout>

- graphstatistiquesgenerales.xml

<?xml version="1.0" encoding="utf-8"?>
<chart>
<area>
<area.xaxis title="Nb interviews"/>
<area.yaxis title="Date" valuetype="Date"/>
</area>
<series type="Bar" color="#FFE0400A" showlabel="true" halign="Near"/>
</chart>
Baydalka Volodymyr
#6 Posted : Monday, July 26, 2010 6:44:32 PM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
Hi,

Try to change android:layout_height to fill_parent (along with android:layout_weight="1") OR explicitly set the size you require

Best regards,
Volodymyr Baydalka
Andriod development and support team
vijayakumar
#7 Posted : Tuesday, July 27, 2010 4:21:25 PM
Rank: Advanced Member

Groups: Registered

Joined: 4/27/2010
Posts: 31
Location: chennai
Hi

Its working for me



Code:


<?xml version="1.0" encoding="utf-8" ?>

<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxHeight="100dip"
>

<!-- Titre de l'écran en haut sur fond jaune -->
<TextView
android:layout_width="wrap_content" android:gravity="center_vertical|center_horizontal"
android:layout_height="wrap_content"
android:text="Statistiques générales"
/>

<!-- Graphique -->
<com.artfulbits.aiCharts.ChartView
  palette="grayscale"
  android:id="@+id/piechart"
  chart="@xml/piechart"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
   android:background="@drawable/background"
    android:layout_weight="1"/> 



<!-- FOOTER -->
<!-- Texte : date de mise à jour des statistiques -->
<TextView
android:id="@+id/date_maj_stats"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="sample"
/>
</LinearLayout>
</FrameLayout>







Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2016 ArtfulBits. All rights reserved.