Affichage des articles dont le libellé est layout. Afficher tous les articles
Affichage des articles dont le libellé est layout. Afficher tous les articles

mercredi 12 août 2015

how to backup screen layout on stock and cm/aosp based rom ?



How to backup and restore the screen layout on e988 stock and cm based rom ?

Tried go backup to backup the trebuchet launcher screen layout once on cm/aosp based rom, but failed in restoring it

thanks



Screen layout problem - text field superimposed on app heading bar



The contents of my layout file is below.

Everything is good except that the control "android:id="@+id/text_bluetooth"" is superimposed over the top of the app heading and laucher icon.

I can't figure out how to move all the controls down below the app heading while retaining their same overall arrangement.


Code:


<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#0099cc"
    tools:context=".HexapodControls"
    android:id="@+id/frame_controls"
    android:visibility="visible">

    <!-- The primary full-screen view. This can be replaced with whatever view
        is needed to present your content, e.g. VideoView, SurfaceView,
        TextureView, etc. -->

    <!-- This FrameLayout insets its children based on system windows using
        android:fitsSystemWindows. -->

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:visibility="visible"
        android:id="@+id/layout_controls">

        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:text="@string/str_select"
                android:id="@+id/text_bluetooth"
            android:visibility="visible"
            android:layout_gravity="top|left"
            android:autoText="false"
            android:typeface="normal"
            android:textSize="18dp" />

        <Spinner
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/spinner_bluetooth"
            android:visibility="visible"
            android:clickable="true"
            android:layout_gravity="top|left" />

        <LinearLayout
                    android:orientation="horizontal"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
            android:id="@+id/layout_bluetooth"
            android:keepScreenOn="true">

            <Button
                        android:layout_width="160dp"
                        android:layout_height="match_parent"
                        android:text="@string/str_connect"
                        android:id="@+id/button_connectbt"
                        android:clickable="true"
                        android:enabled="false"
                        android:focusable="false"
                        android:focusableInTouchMode="false"
                        android:gravity="center_vertical|right"
                        android:drawableLeft="@mipmap/ic_bluetooth"
                    android:layout_gravity="center_horizontal|top"
                android:onClick="@string/str_onclick_connectbt"
                android:visibility="visible"
                android:textSize="18dp" />

            <Button
                    android:layout_width="160dp"
                    android:layout_height="match_parent"
                    android:text="@string/str_disconnect"
                    android:id="@+id/button_disconnectbt"
                    android:enabled="false"
                    android:focusable="false"
                    android:focusableInTouchMode="true"
                    android:clickable="true"
                    android:gravity="center_vertical|right"
                    android:drawableLeft="@mipmap/ic_bluetooth"
                android:onClick="@string/str_onclick_disconnectbt"
                android:visibility="visible"
                android:layout_gravity="top"
                android:textSize="18dp" />
        </LinearLayout>
    </LinearLayout>

</FrameLayout>





mardi 11 août 2015

ArrayAdapter resource type layout expected



It doesn't seem to matter what I id I put in as parameter 2 to this constructor.

I keep getting this compile error: "resource type layout expected"


Code:


        m_BTArrayAdapter = new ArrayAdapter<>(this, id.layout_controls);

This web page is no help what so ever: http://developer.android.com/referen...text,%20int%29

There are no examples and no proper explanation of the parameters

So what is it exactly that you are supposed to pass into this constructor as the second parameter?



Your recovery is using new storage layout and rom is not



I'm getting an error message when trying to install custom rom resurrection remix. The error is 'Your recovery is using new storage layout and rom is not'

How can install the rom then?



dimanche 9 août 2015

Chrome Tab Layout Issue



Hello there! I recently acquired a 3rd generation Moto G. However I've run into a few issues. My tab switcher appears to be stuck in "accessibility" mode; a weird tab switcher that uses the old holo UI. Here is a picture of the problem:



I checked chrome://flags and the accessibility tab switcher setting is not even on. Toggling on/off doesn't seem to change anything.

I also have no animations for opening the drop down menu, or opening the tab switcher. Pressing any of the UI buttons simply instantly opens the menu, as if I had battery saver on (which I don't). I've tried the dev and beta versions of chrome, and they also exhibit the same problems. Clearing cache, reverting to the factory version of chrome, etc... all don't seem to fix the issue.

I am running Android 5.1.1, with chrome 44.0.2403.133.The phone is the 1gb RAM/8gb storage version. I did some other research and found someone who had the same problem a few years ago, but on a Samsung phone:
http://forum.xda-developers.com/show....php?t=2490353

Please help!