How to create Table Layout of same size column - android-layout

I am new to android. I want to create a layout,
Having Linear layout --> consist of two text view--> than table view.
*Table view --> two columns* having equal size.
1**st column having *huge data. so it should be word wrap and scroll vertically.
2*nd column contains a **image.
How can i do it. As i tried but i am not able to create 2 columns of equal size, 1st having vertical scroll bar...
Thank You.

Use the property as :
android:streachColumn="*";
And
android:weight="*";
Property. This will help you.

Related

Aligning vertically a series of tables with text

Hi I need the text to be in a specific format in a spreadsheet to be able to upload it on a translation tool.
I have already used the text split function to separate the text in a cell with bullet points, moving each bullet point to a separate cell.
enter image description here
Then I used the transpose function to separate each set of data. For context, you are looking at fashion products.
The name of the product is on the first row, followed by a list of features (e.g. "Bracciale" means bracelet and it is followed by the list of materials)
enter image description here
Now for the last step, I need these sets to be vertical, not horizontal. Like this:
enter image description here
I would like to set up an automatic system so that every time we receive a list with hundreds of these products we do not need to copy-paste them one below the other.
With pivot tables maybe? Keep in mind that if it is too complex it might be hard to train the translators to do it each time. Please let me know your suggestions. Thank you!
I am not a programmer. I tried pivot tables but the data was in the wrong order and I am not sure how to get the data out from the pivot table with values only without the sub-menus.
My suggestion would be to use the 'Unpivot Columns' feature in the Power Query Editor - it would be really simple.
Steps:
Select the whole range
Go to Data // Get & Transform Data // From Table/Range
Uncheck 'My Table has headers' (unless it does - but doesn't look like it?)
Press OK. This will open Power Query Editor and will have actually given you column names Col1/2/3 etc, but ignore that.
Go to Add Column // Index column
Select all columns EXCEPT the new index column by Shift+clicking on those headers
Go to Transform // Unpivot Columns
Assuming the order is important, click in the Attribute column and Sort Ascending
Click in the Index column and Sort Ascending
Remove the Attribute and Index columns if you want (right click header)
Go to File // Close & Load
You will get a new table - dynamically linked to the first (ie. can be updated/refreshed) - in the unpivoted format.
Let me know if you need more details / screenshot?
Based of this trick, maybe the following is helpfull:
Formula in A5:
=DROP(REDUCE(0,A1:A3,LAMBDA(a,b,VSTACK(a,TEXTSPLIT(b,,HSTACK(CHAR(10),"^"),1)))),1)
TEXTSPLIT() will use a combination of newline chars and the circumflex to split the input directly into a vertical array;
Iteration in REDUCE() will allow for stacked results;
DROP() the initial value from results.

Col Span layout rule isn't working as expected

I have a customization to the AP Bills and Adjustments screen (AP301000), where I'm trying to get the Description field to span the first two columns in the header (there are three columns). Unfortunately, it moves fields from the second column over to the first, and offset from the left a little bit. Here is my customization:
Here is the header before adding the column span layout rule:
And here is the header after publication of the customization:
I've tried many different approaches, but I can't get it to simply span the two columns, while leaving everything else alone.
In my version it is already spanning two columns:
The layout is broken because the description field overlaps some of the new fields you added in the second column. There needs to be some space available in the second column for description to expand otherwise it will move the fields that overlap in the second column below description like in your screenshot.
To avoid overlap you could add some dummy label controls above description layout rule so it pushes description down below the last field added in second column:
Add enough dummy labels to make sure description position is below the last field of second column.

Can't get flexbox container to expand horizontally to match content

The flex layout below is working except the content container (blue) is sized by the columnar items before they wrap.
I want the blue container to expand to the right to fit the content (ie the horizontal measure after the items wrap)
Any hints would be appreciated.
Some more research shows that this is a well-known, long standing, bug, but only for the column orientation, not for the row orientation.
So the solution is to switch to "upside down" day. Turn the column into a row with the css writing-mode:'vertical-lr', then specify flex-direction:'row to match, and it works!
... but all direct children need to have their writing mode reset: writing-mode:horizontal-tb

restrict table dimensions to the table placeholder dimensions in python-pptx

i am trying to add a table to a presentation using python-pptx with a specific dimensions
i created a slide layout from power-point which contains the table placeholder in the area i want and loaded it using python-pptx.
slide_layout
but regardless of the placeholder dimensions, the table itself after creation is exceeding the placeholder are.
mainly it is dependent on the number of rows as per the documentation "The table's height is determined by the number of rows."
shape_id, name, height = self.shape_id, self.name, Emu(rows * 370840)
i tried to update the placeholder.py file manually and change the row height but the same output appears.
shape_id, name, height = self.shape_id, self.name, Emu(rows * 18429)
the table is insisting on exceeding the placeholder area as per the below image
output
below is my code, any clues ?
from pptx import Presentation
# the presentation including the table placeholder
prs = Presentation('Presentation2.pptx')
slide1 = prs.slides.add_slide(prs.slide_layouts[11])
table_placeholder = slide1.shapes[0]
shape = table_placeholder.insert_table(rows=22,cols=2)
prs.save('test.pptx')
Tables in PowerPoint expand vertically to accommodate new rows; that's just the way they work. You will need to do any resizing yourself, which you may find is a challenging problem. This isn't the same kind of problem when a user is creating a table in the application because they will just make adjustments for fit until it looks best for their purposes.
You'll need to adjust font-size and row-height and perhaps other attributes like column-width etc. based on your application and whatever heuristics you can resolve, perhaps related to the row count and length of text in certain cells and so on.
A table placeholder really just gives a starting position and width.

Excel - Lookup multiple values in unknown columns and create bar chart out of it

I am trying to get the following thing to work in Excel. I have a list of values out of which I want to create a bar chart. Easy thing normally, but in this special case I do not know how to get it to work with references that change.
I have the data structured as follows:
Name Site Value
---------------------
A X 1
---------------------
B Y 2
---------------------
G Z 3
---------------------
D Z 0
---------------------
F X 1
---------------------
Q Y 2
---------------------
From the information available in this array I want to create three different bar charts, one per site. The problem is that I don't know the absolute cell references, as the data is inserted by colleagues. In addition, the number of datapoints to display is not known either. In case there a three different entries for one site, I want to display a bar chart with these three values, the names of the entries should be used as the label for the bars in the chart. In case there are four different entries, I want to display a bar chart with four bars, etc... This whole table should be dynamic, so in case that a new entry is added to the range with the corresponding site, it should be automatically included in the bar chart.
I already tried to find a workaround for this and read about dynamic charts and lookup functions in excel, but nothing did the trick so far.
If you have any idea, please let me know.
Thanks in advance :)
What I would suggest is:
Create 3 Pivot Tables. The data source for each of them would be: A:C (the whole columns). This way, when an entry is added, you just update the tables and they get in.
Column "Site" should be added as a filter, then on one Pivot Table you would filter only for site X, another for site Y and the other for site Z.
Now, "Name" go on Rows and Value go on Values.
Now, for each Pivot Table you add a bar chart.
I think this solves your issue.
Here'a a screen showing it. My excel is in PT-BR but I think you can get the general idea.
Edit: you can also put the same scale on all 3 charts, so you can easily compare the values.
Thanks to both of you guys and sorry for the late reply. In the end I got it working with pivot tables, though I had to fiddle a bit with the pivot table wizard, as I wanted to display values from multiple sheets. Thanks again and best regards :)

Resources