Data Binding for alternative layouts


Ohio
26/4/2016 6:52 am
HOME ยป Web Development

I have faced with an issue with data binding for different layouts. I have layout file for different orientation. For portrait mode:

<layout
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>
</layout>

and for landspace mode:

<layout
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_weight="1"
        android:layout_height="match_parent" />

    <FrameLayout
        android:id="@+id/extra_container"
        android:layout_width="match_parent"
        android:layout_weight="1"
        android:layout_height="match_parent" />

</LinearLayout>
</layout>

And when I use it for binding via

ViewBinding binding = DataBindingUtil.setContentView(this,
R.layout.view);

I have no access for extraContainer from current binding.

Possible solution to add the view with same id and check the view class in runtime. Any other solutions ?


Related to : Data Binding for alternative layouts
Data Binding for alternative layouts
26/4/2016 6:52 am Web Development

I have faced with an issue with data binding for different layouts. I have layout file for different orientation. For portrait mode:

<layout
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>
</layout>

and for landspace mode:

<layout
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_weight="1"
        android:layout_height="match_parent" />

    <FrameLayout
        android:id="@+id/extra_container"
        android:layout_width="match_parent"
        android:layout_weight="1"
        android:layout_height="match_parent" />

</LinearLayout>
</layout>

And when I use it for binding via

ViewBinding binding = DataBindingUtil.setContentView(this,
R.layout.view);

I have no access for extraContainer from current binding.

Possible solution to add the view with same id and check the view class in runtime. Any other solutions ?


Alternative to data binding
Web Development

As an alternative to binding an array collection to a data grid's data provider, could I assign the array collection as the data provider to the data grid on it's creation and everytime the array collection is updated execute invalidateProperties(); invalidateList(); to re-render the data grid?


Does my described approach make sense?


Alternative Keyboard Layouts
Web Development

The QWERTY layout has been around since the first typewriters became popular. However, typing efficiency and repetitive-movement injuries were not considered when the layout was designed. Today, more people than ever spend their days typing, and efficiency and reduced finger and wrist strain have become priorities. Although alternative keyboard layouts are not new, they are becoming more popular as computer users attempt to improve their typing experience. HistoryThe familiar QWERTY keyboard layout was created for the typewriter in the 1870s. Before the QWERTY keyboard, typewriter keys were arranged in alphabetical order in two rows. The inventor C.L. Sholes created a new keyboard layout
Ideas for alternative context menu layouts
Web Development

I'm trying to, find / come up with, a cool alternative to the old trusty rectangle-list-o-buttons context menu. I have seen some suggesting laying the item out circles in a circle, and they call it a pie-menu. And as you click a circle, it expands to have items around it etc. See this article.


My goal is to be able to pack a huge amount of GUI onto the context menu, without it seeming like a monster popping up every time you right click.


Has anyone ever seen/used a non-standard context menu they really liked? I'm thinking there might be some great examples from games.




HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .