Hello,
i'm noob. I'm trying to learn Android development.
I installed Android Studio 2.2.3, created a test App, and ran on my Smartphone: YotaPhone II. But text looks different as in Android Studio.
this is AS (the resolution is same like on YotaPhone II) and this is on YotaPhone II. What is 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"
}
Code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#f00"
android:gravity="center"
android:padding="25dp"
android:text="RED"
android:textColor="#000" >
</TextView>
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="#ffa500"
android:gravity="center"
android:padding="25dp"
android:text="ORANGE"
android:textColor="#000" >
</TextView>
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="#ffff00"
android:gravity="center"
android:padding="25dp"
android:text="YELLOW"
android:textColor="#000" >
</TextView>
<TextView
android:id="@+id/TextView04"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/TextView05"
android:background="#0f0"
android:gravity="center"
android:padding="25dp"
android:text="GREEN"
android:textColor="#000" >
</TextView>
<TextView
android:id="@+id/TextView05"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:background="#00f"
android:gravity="center"
android:padding="25dp"
android:text="BLUE"
android:textColor="#fff" >
</TextView>
<TextView
android:id="@+id/TextView06"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/TextView05"
android:background="#4b0082"
android:gravity="center"
android:padding="25dp"
android:text="INDIGO"
android:textColor="#fff" >
</TextView>
</RelativeLayout>
Code:
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">12dp</dimen>
<dimen name="activity_vertical_margin">12dp</dimen>
</resources>
Code:
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">16dp</dimen>
</resources>
the problem was in androidadding="25dp". it is a little bit much. with 12dp looks good.
Related
This is how to get the settings button in notification drawer on AOSP roms in ICS TW based roms.
{
"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"
}
1. Decompile SystemUI.apk
2. open res/layout/tw_status_bar_expanded.xml
3. Add
Code:
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button"/>
under com.android.statusbar.policy.DateView
so it looks like this
Code:
<com.android.systemui.statusbar.policy.DateView android:textSize="16.0dip" android:textColor="#ffbebebe" android:gravity="center_vertical" android:id="@id/date" android:paddingLeft="6.669983dip" android:paddingRight="6.669983dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_toLeftOf="@id/clear_all_button"/>
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button"/>
Save and recompile
And if you want the X button instead of the clear button.
In tw_status_bar_expanded.xml
replace
Code:
<TextView android:textSize="14.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:focusable="true" android:clickable="true" android:layout_width="76.66998dip" android:layout_height="fill_parent" android:layout_marginTop="4.0dip" android:layout_marginRight="4.0dip" android:layout_marginBottom="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all"/>
with
Code:
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all"/>
Then recompile SystemUI.apk and push back to your phone.
I can't get past step 2 (I can't edit the XML file, it opens as junk), what software are you using?
You need to decompile SystemUI.apk with apktool.
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
gmillz said:
You need to decompile SystemUI.apk with apktool.
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
Click to expand...
Click to collapse
how do you resign the apk, I've been having huge problems with that and transparency mods. recompiling is driving me nuts
Sent from my SAMSUNG-SGH-I727 using xda premium
I don't sign system apks and if your getting errors post your log.
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
Adding Network Speed to Status Bar
Files to be Modded:
-SystemUI.apk
Instructions:
1. Decompile your SystemUI.apk
2. Extract my speed.zip (download link below)
3. Copy folder from smali to SystemUI.apk/smali
4. Now you need to modify status_bar.xml from SystemUI.apk/res/layout/
5.Find
Code:
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
6.Add below this
Code:
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
<in.jmkl.dcsms.statusbargreper.DataTrafik android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
7.Recompile SystemUI.apk and add to zip
Credits:
-petrukgrinder Original Link
-google
-xda
Downloads:
Speed.zip
Screens:
{
"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 think this is dcsms mod
cekidot
http://forum.xda-developers.com/showthread.php?t=1877151
Minions_Army said:
i think this is dcsms mod
cekidot
http://forum.xda-developers.com/showthread.php?t=1877151
Click to expand...
Click to collapse
no bro check credits for original link by the way it doesnt use statusbar greeper it is smali files edits bro
will it work for stock jb
zeyaan said:
will it work for stock jb
Click to expand...
Click to collapse
dont think so bro never tried!!
yo can say this tutorial for cm7, can u try in this rom?
http://forum.xda-developers.com/showthread.php?t=2224101
because i can't find folder smali ini SystemUI.apk
can you check..
thank for help
:laugh:
zhu_zhu said:
yo can say this tutorial for cm7, can u try in this rom?
http://forum.xda-developers.com/showthread.php?t=2224101
because i can't find folder smali ini SystemUI.apk
can you check..
thank for help
Click to expand...
Click to collapse
am kinda busy in other projects and theming works bro as soon as possible i ll let u know!!
Adding custom ROM image in Settings
All information, follow these instructions !
Required tools
* Java
* SDK
* Notepad ++ ( Or another application )
* Deodexed LGSettings.apk
* Download the "Required files"
* APK Tool
* Extract the "LGSettings.apk" from your rom /system/app/
PART 1
* Decompile LGSettings.apk
* Put the "\drawable and \layout" into the extracted "Required files" folder.
-Trick
There, you'll see customimage.png Change it to any png of size 400x155 You can change this size description in /res/layout/areebisawesome.xml
* Navigate to \res\xml
* Open device_info_settings with notepad++ and add the following lines after that close and save the changes.
Original Line
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen android:title="@string/sp_sw_update_capital_NORMAL" android:key="software_update_settings_for_dcm" android:summary="@string/system_update_settings_list_item_summary">
<intent android:targetPackage="com.nttdocomo.android.fota" android:action="android.intent.action.MAIN" android:targetClass="com.nttdocomo.android.fota.screens.DmcFota" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/system_update_settings_list_item_title" android:key="system_update_settings" android:summary="@string/system_update_settings_list_item_summary">
<intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
</PreferenceScreen>
Modified
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:layout="@layout/areebisawesome" android:title="" android:key="blah" />
<PreferenceScreen android:title="@string/sp_sw_update_capital_NORMAL" android:key="software_update_settings_for_dcm" android:summary="@string/system_update_settings_list_item_summary">
<intent android:targetPackage="com.nttdocomo.android.fota" android:action="android.intent.action.MAIN" android:targetClass="com.nttdocomo.android.fota.screens.DmcFota" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/system_update_settings_list_item_title" android:key="system_update_settings" android:summary="@string/system_update_settings_list_item_summary">
<intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
</PreferenceScreen>
PART 2
* Compile LGSettings.apk file ( APK Tool )
* You can do this with a File explorer ( With root permissions or before you build your rom. )
{
"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"
}
Thanks @iamareebjamal and @abhi922 original guide and Required files
Soon Other Mods :good:
Thanks for all of the new tuts! Hopefully more people can learn to do things on their own.:good:
Thanks bro
LG_G2 32GB Karaşimşek™
work in 4.4.2?
so is this?
this is for you if you like cooked ROM you change simpre may have their internet settings hand ala following this tutorial I hope will serve
Requirements
a text editor
Match your network operator
1.- example of the file structure
Code:
<?xml version="1.0" encoding="utf-8"?>
<apns version="7">
<apn carrier=""
apn=""
user=""
password=""
mcc=""
mnc=""
type=""
authtype="1"
/>
<apn carrier=""
apn=""
user=""
password=""
mmsc=""
mmsproxy=""
mmsport=""
mcc=""
mnc=""
type=""
authtype="1"
/>
</apns>
2.- creation of data and settings from the network operator
Code:
<?xml version="1.0" encoding="utf-8"?>
<apns version="7">
<apn carrier="Internet"
apn="internet.itelcel.com"
user="webgprs"
password="webgprs2002"
mcc="334"
mnc="020"
type="default,supl"
authtype="1"
/>
<apn carrier="Mensajes Multimedia"
apn="mms.itelcel.com"
user="mmsgprs"
password="mmsgprs2003"
mmsc="http://mms.itelcel.com/servlets/mms"
mmsproxy="148.233.151.240"
mmsport="8080"
mcc="334"
mnc="020"
type="mms"
authtype="1"
/>
</apns>
- Note: Once already done this should save the file and put it next wing route
- /system/etc apns-conf.xml
- permissions rw-r--r--
- reboot
- after restarting the next route will go
- adjustments/more/cellular networks/APs-APN/adjustments/restore settings
- with this their customized settings and their profiles are listed internet and multimedia
{
"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"
}
reserved...
Why go through all that when you can download APN parameters automatically OR add them manually by using the APN options menu?
Dear Team,
I want to create multiple table rows as shown in the picture. The total no of rows is 250. how to create these 250 rows through the java program.
{
"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"
}
My HTML code is
Code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Aggre20_Ascending" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp">
<TableRow
android:id="@+id/tableRow1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<TextView
android:id="@+id/textView1"
android:layout_width="110dp"
android:layout_height="45dp"
android:background="@drawable/border"
android:padding="5dp"
android:textAlignment="center"
android:text="Actual Weight"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:textSize="15sp">
</TextView>
<TextView
android:id="@+id/editText1"
android:layout_width="110dp"
android:layout_height="45dp"
android:background="@drawable/border"
android:padding="5dp"
android:text="Meter Reading"
android:textStyle="bold"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:textSize="15dp">
</TextView>
<TextView
android:id="@+id/error1"
android:layout_width="110dp"
android:layout_height="45dp"
android:background="@drawable/border"
android:padding="5dp"
android:text="Error"
android:textAlignment="center"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black"
android:textSize="15dp">
</TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/border"
android:padding="5dp"
android:text="0"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black">
</TextView>
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/border"
android:padding="5dp"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black">
</EditText>
<TextView
android:id="@+id/error2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:background="@drawable/border"
android:text="0"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/black">
</TextView>
</TableRow>
</TableLayout>
</ScrollView>
The first text view should update automatically by an interval of 20 (0, 20, 40, 60, .....) and edit text will be edited manually and 2nd text view should calculate automatically (first text view - edit text)
Can anyone guide me on how to do this program?