Hello,
I have a strange problem that on some devices, like galaxy s8 and LG G6 , the default alignment is reversed.
(But on most galaxy s8 and LG G6 devices its is ok)
The default alignment for a TextView is Left but on some devices it is Right. I solved it by adding "android:layout_alignParentLeft="true"
The same is true for buttons and EditText.
But there are some more strange things with the alignment, see the screenshots below:
"alignment wrong"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"alignment ok"
What can cause this alignment problem, it's not the device self i think, but maybe its related to the country or language settings?
part of XML code:
Code:
<RelativeLayout
android:id="@+id/widget1"
android:background="@color/background"
android:layout_below="@+id/widget0"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="Z1"
android:layout_alignParentLeft="true"
android:id="@+id/_bandstop_filter_g0"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="15dp"
android:layout_marginEnd="3dp" />
<EditText
android:layout_marginBottom="3dp"
android:textColor="@color/gui_text1"
android:focusable="false"
android:background="@drawable/shape_edittext_lock"
android:paddingLeft="8dp"
android:layout_height="30dp"
android:textSize="15sp"
android:inputType="numberSigned|numberDecimal"
android:id="@+id/bandstop_filter_g0"
android:layout_width="82dp"
android:layout_toRightOf="@+id/_bandstop_filter_g0"
android:layout_marginTop="5dp" />
<TextView
android:id="@+id/bandstop_filter_g0_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="3dp"
android:layout_toRightOf="@+id/bandstop_filter_g0"
android:text="Ω"
android:textSize="15sp"
/>
<TextView
android:id="@+id/_bandstop_filter_2g0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="28dp"
android:layout_marginEnd="3dp"
android:layout_toRightOf="@+id/bandstop_filter_g0_"
android:text="Z2"
android:textSize="15sp"
/>
<EditText
android:layout_marginBottom="3dp"
android:textColor="@color/gui_text1"
android:focusable="false"
android:background="@drawable/shape_edittext_lock"
android:paddingLeft="8dp"
android:layout_height="30dp"
android:textSize="15sp"
android:inputType="numberSigned|numberDecimal"
android:id="@+id/bandstop_filter_2g0"
android:layout_width="82dp"
android:layout_toRightOf="@+id/_bandstop_filter_2g0"
android:layout_alignBaseline="@+id/bandstop_filter_g0" />
<TextView
android:id="@+id/bandstop_filter_2g0_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bandstop_filter_g0"
android:layout_marginStart="3dp"
android:layout_toRightOf="@+id/bandstop_filter_2g0"
android:text="Ω"
android:textColor="@color/gui_text1"
android:textSize="15sp"
/>
Related
disassemble screencapture.apk with apktool
edit /screencapture/AndroidManifest.xml
line 11 change android:theme
Code:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
edit /res/layout/preview.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:id="@id/top" android:background="#ff000000" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:id="@id/screenshot" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="6.0dip" android:layout_marginBottom="6.0dip" android:layout_above="@id/button_row" android:layout_alignParentTop="true" />
<Button android:state_enabled="false" android:id="@id/share_button" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:layout_marginTop="2.0dip" android:layout_marginRight="2.0dip" android:text="@string/screenshot_button_share" android:layout_weight="50.0" android:visibility="invisible" />
<Button android:state_enabled="false" android:id="@id/use_as_button" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="3.0dip" android:layout_marginTop="2.0dip" android:layout_marginRight="3.0dip" android:text="@string/screenshot_button_use_as" android:layout_weight="50.0" android:visibility="invisible" />
</RelativeLayout>
<LinearLayout android:id="@id/shutter" android:background="#ffffffff" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:id="@id/fullscreen" android:background="#ffffffff" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</LinearLayout>
</RelativeLayout>
edit /smali/com/sonyericsson/screencapture/DisplayScreenshot.smali
find ".line 371" and insert the following code to make it exit after shutter animation
Code:
invoke-virtual {p0}, Lcom/sonyericsson/screencapture/DisplayScreenshot;->finish()V
build with apktool and sign with auto-sign tool
remove or hide stock screencapture.apk in /system/app
then install the modified apk, enjoy!
A question:
Is there a way to install modified apk as a update? like stock maps
in that way no need to remove stock apk and only upgrade apk works.
Sorry, I did not test it fully. It does not work after restart.
screenshots before/after ?
Before
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And after ?
armando101 said:
And after ?
Click to expand...
Click to collapse
________________________________________________
Yifei said:
Sorry, I did not test it fully. It does not work after restart.
Click to expand...
Click to collapse
Hello, my friends.
I don't like ask, but now my work is null in latest weeks, I have to look for any questions on the red and I don't obtain the solution... Finally I ask in this forum...
I have android 4.1.2 in my S3. I'll like insert in my lockscreen the weather forecast with 5 days and the text 'weather state'. ( likewise in the apk AccuweatherWidget_Main ).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I modified xml of the lockscreen widget (very easy), it was a view, this 'view' has any 'ids' defined in 'ids.xml' and 'public.xml', ( these 'ids' was source of the smali file 'ClockWidget$Weather.smali' in the android.policy.jar ).
http://forum.xda-developers.com/showthread.php?t=2077292
The view in the xml I modified:
HTML:
<view android:orientation="vertical" android:id="@id/clock_weather" android:paddingTop="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" class="com.android.internal.policy.impl.sec.ClockWidget$Weather">
<TextView android:textSize="16.0dip" android:textColor="#ffebebeb" android:ellipsize="none" android:gravity="center" android:id="@id/clock_weather_no_service" android:padding="15.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="@color/black" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
<LinearLayout android:gravity="center" android:orientation="vertical" android:id="@id/clock_weather_data_box" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:id="@id/clock_weather_icon" android:layout_width="155.0dip" android:layout_height="128.0dip" />
<LinearLayout android:gravity="top" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true">
<TextView android:textSize="20.0dip" android:typeface="sans" android:textStyle="bold" android:textColor="#fff6f7c9" android:gravity="bottom" android:id="@id/clock_weather_temp" android:layout_width="wrap_content" android:layout_height="24.0dip" android:layout_marginTop="3.0dip" android:shadowColor="#55000000" android:shadowDx="3.0" android:shadowDy="3.0" android:shadowRadius="1.0" />
<ImageView android:id="@id/clock_weather_temp_unit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/keyguard_lockscreen_ic_celsius" />
</LinearLayout>
<TextView android:textSize="18.0dip" android:textColor="#fff9f9f9" android:ellipsize="marquee" android:gravity="bottom" android:id="@id/clock_weather_city" android:layout_width="wrap_content" android:layout_height="22.0dip" android:singleLine="true" android:shadowColor="#55000000" android:shadowDx="3.0" android:shadowDy="3.0" android:shadowRadius="1.0" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:marqueeRepeatLimit="marquee_forever" />
</LinearLayout>
</view>
The view call to class: class="com.android.internal.policy.impl.sec.ClockWidget$Weather", and in this smali it shows the variables Weathericon, WeatherCity, ... with your ids defined...
I studied a little smali, dalvik bytecode, but I don't risk to modify.
My question is:
In a xml, of a apk, can I insert any ids of the another apk? If it's posible, ¿How? ( I'll modify in this case manifest.xml, ids.xml, public.xml? )
Thanks for avanced, and for read me.
I'm sorry, for my english.
A embrace.
dkt
I've posted this over on StackOverflow but am still at an impass.
I have the following code. (Pastebin for those who prefer it)
Code:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="52dp"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/holder"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/contactPicture"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="24dp"
android:layout_gravity="left"
android:gravity="center"
android:scaleType="centerCrop"
android:maxHeight="48dp"
android:maxWidth="48dp"
android:minHeight="48dp"
android:minWidth="48dp"
tools:ignore="Suspicious0dp"/>
<TextView
android:id="@+id/body"
android:textAlignment="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="14sp"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:textColor="@color/textColorReceived"/>
<ImageView
android:id="@+id/myPicture"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="0dp"
android:layout_marginTop="24dp"
android:layout_gravity="right"
android:gravity="center"
android:scaleType="centerCrop"
android:maxHeight="48dp"
android:maxWidth="48dp"
android:minHeight="48dp"
android:minWidth="48dp"/>
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_gravity="center_vertical"
android:paddingRight="5dp"
android:textSize="12sp"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:fontFamily="sans-serif-light"
android:textColor="@color/dateColorReceived"
android:layout_marginTop="-3dp"
android:paddingBottom="3dp"/>
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/media"
android:padding="10dp"
android:visibility="gone"
android:scaleType="centerInside"/>
<View android:id="@+id/gifView"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:padding="10dp"
android:visibility="gone"/>
<TextView
android:id="@+id/date"
android:layout_gravity="bottom"
android:gravity="center_horizontal"
android:textSize="12sp"
android:visibility="visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-light"
android:textColor="@color/dateColorReceived"/>
</LinearLayout>
</RelativeLayout>
Here is what it looks like
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
However, some messages look wrong. They just get really warped; as it seems, this only happens on longer messages; also, I lose the
Code:
@+id/date
Can't seem to figure out why. Plus,
Code:
@+id/myPicture
doesn't always stay to the right.
I've been working on this for a little over a week. Today alone I've spent 5 hours on it. Driving me crazy. :|
I really would appreciate any and all help.
Looks like you should be using a ListView with an adapter. The adapter would probably supply your listview with 2 different view types; one for your messages, and one for your contacts messages.
Hello all,
I am trying to port a ROM to my device, Samsung Galaxy Young 2 (SM-G130HN), modded stock 4.4.2 ROM from Sansung Galaxy V Dual. The 130HN is not dual SIM, but another Young 2 are (G130M, etc)
The problem is that the dual SIM configuration into Settings does not appear in any way.
I have activated dual SIM in Build.prop Through:
ril.sim2.present=1
persist.radio.multisim.config=dsds
Click to expand...
Click to collapse
I have flashed a kernel with dual SIM support from GS-130M, and the ROM start without any problem and the 2 SIM signals appear in the status bar:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
But... I am not able to configure them through Settings. This the settings_header part where the dual SIM configuration is declared in stock ROM (not modiffied):
xmlns:android="http://schemas.android.com/apk/res/android">
<header android:id="@id/wireless_section" android:title="@string/header_category_wireless_networks" />
<header android:icon="@drawable/ic_settings_wireless" android:id="@id/wifi_settings" android:title="@string/wifi_settings_title" android:fragment="com.android.settings.wifi.WifiSettings" />
<header android:icon="@drawable/ic_settings_bluetooth2" android:id="@id/bluetooth_settings" android:title="@string/bluetooth_settings_title" android:fragment="com.android.settings.bluetooth.BluetoothSettings" />
<header android:icon="@drawable/ic_settings_airplanemode" android:id="@id/airplane_mode" android:title="@string/airplane_mode" />
<header android:icon="@drawable/ic_settings_data_usage" android:id="@id/data_usage_settings" android:title="@string/data_usage_summary_title" android:fragment="com.android.settings.DataUsageSummary" />
<header android:icon="@drawable/ic_settings_mobile_data" android:id="@id/mobile_data_settings" android:title="@string/mobile_data_title" />
<header android:icon="@drawable/ic_settings_nfc" android:id="@id/nfc_setting" android:title="@string/nfc_quick_toggle_title" android:fragment="com.android.settings.nfc.NfcSettings" />
<header android:icon="@drawable/ic_settings_sbeam" android:id="@id/sbeam_setting" android:title="@string/s_beam_settings_title" android:fragment="com.android.settings.nfc.SBeam" />
<header android:icon="@drawable/ic_settings_sim_card_manager" android:id="@id/simcard_management" android:title="@string/sim_card_management_ds">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.NetworkManagement" />
</header>
Click to expand...
Click to collapse
But the dual SIM configuration does not appear:
In CyanogenMOD the 2 SIM can be configured in Settings, and I think that the trick is in the kernel included in Cyanogenmod ROMs
All the smalis are correct (without modification from the stock ROM). I do not know if I have lost some app by the way or is neccesary something more to activate the settings for dual SIM in the ROM.
please, I need some help. Thanks in advance
Yes Lineage Os 14.1 Sort of works on our lonely LG V10 device.<br />
<br />
What i know so far is<br />
<br />
NOT WORKING<br />
<br />
Audio <br />
<br />
Camera - Needs Camera Blob Bring Up.<br />
Some of the Lg G4 blobs work and some dont. So thats why we need our proper camera blob bring up.<br />
<br />
We need our help. We need to colaborate like old times android comunity is separating slowly over the years.<br />
<br />
If we are alone and some knows 1 or 2 things about android we need to regroup and work as a team. Or we never going to have something working.<br />
<br />
<br />
On the picks says on device that is a LGH811 (LG G4) but is not.<br />
<br />
It says that cus the deve used lg g4 repo.<br />
<br />
He owns the lg v10 a d lg g4 but he studies and he is trying his best. <br />
<br />
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
<br />
<br />
Sent from my LG-H901 using Tapatalk
Sent from my LG-H901 using Tapatalk
Why nobody's helping?
Because the device is three years old and he's trying to get an os running on it that no one cares about?