Hi, i'm very very very messed up. Ok let's explain. I want create listview using this layout 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">
<ImageView
android:layout_width="65dp"
android:layout_height="65dp"
android:id="@+id/imgpez"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="CODICE SAG"
android:textColor="#000000"
android:layout_marginLeft="30dp"
android:id="@+id/txtcodsag"
android:layout_marginTop="40dp"
android:layout_toRightOf="@+id/imgpez"
android:layout_toEndOf="@+id/imgpez" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="CODICE OE"
android:id="@+id/txtcodoe"
android:textColor="#000000"
android:layout_marginLeft="30dp"
android:layout_marginTop="40dp"
android:layout_toRightOf="@+id/imgpez"
android:layout_toEndOf="@+id/imgpez" />
<ImageView
android:layout_width="65dp"
android:layout_height="65dp"
android:id="@+id/imgdesc"
android:layout_marginTop="20dp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="@+id/txtcodoe"
android:layout_toEndOf="@+id/txtcodoe"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="N"
android:id="@+id/txtN"
android:layout_marginTop="40dp"
android:textColor="#000000"
android:layout_marginLeft="30dp"
android:layout_toRightOf="@+id/imgdesc"
android:layout_toEndOf="@+id/imgdesc" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="CS-CT"
android:id="@+id/txtCSCT"
android:layout_marginTop="40dp"
android:textColor="#000000"
android:layout_marginLeft="30dp"
android:layout_toRightOf="@+id/txtN"
android:layout_toEndOf="@+id/txtN" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="A"
android:id="@+id/txtA"
android:textColor="#000000"
android:layout_marginTop="40dp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="@+id/txtCSCT"
android:layout_toEndOf="@+id/txtCSCT" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="B"
android:id="@+id/txtB"
android:textColor="#000000"
android:layout_marginTop="40dp"
android:layout_marginLeft="30dp"
android:layout_toRightOf="@+id/txtA"
android:layout_toEndOf="@+id/txtA" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Dettagli"
android:textColor="#000000"
android:id="@+id/apridettagli"
android:layout_alignBottom="@+id/imgdesc"
android:layout_toRightOf="@+id/txtB"
android:layout_toEndOf="@+id/txtB" />
</RelativeLayout>
This is layout:
{
"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"
}
How can i build a listview from database with item clickable? Each item contains a specific id to select from database and show into a dialogbox.
Table fields:
id(for item clickable to open in a dialogbox for showing details) descrizione (description) text imgdescrizione (imgdescription) and imgpezzo (imgpiece) are name of image to pick from drawable folder. from codsag to cod_marca are text.
How can i load specific image into a listview? In the layout image ou can see my few drawable items.
I'm first time of developing android...and i would learn from you!!
Good morning and thanks...
Cris
Thanks for any reply. Thanks thanks thanks thanks.....
This forum is a graveyard field!
Learn it from w3school ?
Sent from my W90 using xda Forums PRO
Related
{
"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"
}
Usual disclaimer: i'm not responsible, you assume all risks blah blah etc etc...
Don't forget to backup first
In order to accomplish this you have to decompile system/framework/lge-res.apk. I used ahmadfarisfs gingerbread themed res as a base, due credit to him.
Note if you're already using a themed res different to the above flashing the version provided will overwrite it - obviously, unless you manually edit your version of lge-res.apk.
No Carrier + ahmadfarisfs Ginger Themed flashable zip
Manually editing
1: Download AutoTool cmd version and set it up in a folder.
2: Copy /system/framework/framework-res.apk & lge-res.apk from your phone to the input_apk folder of autotool.
3: Launch autotool and perform opt 1 & 2 - ignore errors.
4: Open lge_status_bar_expanded.xml in notepad from within the _INPUT_APK\lge-res\res\layout\ autotool directory.
5: XML Edits
Completed xml for comparison
Code:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.server.status.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/quick_setting" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="48.0dip">
<ImageView android:id="@id/wifi_button_toggle" android:layout_width="60.0dip" android:layout_height="wrap_content" android:layout_marginLeft="1.0dip" />
<ImageView android:id="@id/bt_button_toggle" android:layout_width="60.0dip" android:layout_height="wrap_content" android:layout_marginLeft="1.0dip" />
<ImageView android:id="@id/gps_button_toggle" android:layout_width="60.0dip" android:layout_height="wrap_content" android:layout_marginLeft="1.0dip" />
<ImageView android:id="@id/network_button_toggle" android:layout_width="60.0dip" android:layout_height="wrap_content" android:layout_marginLeft="1.0dip" />
<ImageView android:id="@id/sound_button_toggle" android:layout_width="60.0dip" android:layout_height="wrap_content" />
</LinearLayout>
[COLOR="RoyalBlue"]<LinearLayout android:visibility="gone" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0">
<TextView android:textAppearance="?android:textAppearanceLarge" android:textColor="?android:textColorSecondaryInverse" android:layout_gravity="center_vertical" android:id="@id/plmnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<TextView android:textAppearance="?android:textAppearanceLarge" android:textColor="?android:textColorSecondaryInverse" android:layout_gravity="center_vertical" android:id="@id/spnLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>[/COLOR]
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<com.android.server.status.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@android:style/TextAppearance.StatusBarTitle" android:id="@id/noNotificationsTitle" android:background="@android:drawable/title_bar_portrait" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@android:string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@android:style/TextAppearance.StatusBarTitle" android:id="@id/ongoingTitle" android:background="@android:drawable/title_bar_portrait" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@android:string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
[COLOR="SeaGreen"]<LinearLayout android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:layout_gravity="center_vertical" android:layout_weight="1" android:textAppearance="@android:style/TextAppearance.StatusBarTitle" android:id="@id/latestTitle" android:paddingLeft="5.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@android:string/status_bar_latest_events_title" />
<TextView android:layout_gravity="center_vertical" android:textSize="14.0sp" android:textColor="#ff000000" android:id="@id/clear_all_button" android:background="@android:drawable/btn_default_small" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@android:string/status_bar_clear_all_button" style="\?android:attr/buttonStyle" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.server.status.NotificationLinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@android:drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.server.status.ExpandedView>
To hide the carrier bar, add the android:visibility="gone" attribute to the <LinearLayout> that encaspsulates plmnLabel & spnLabel.
Create a new <LinearLayout> exactly as in the comparison that encapsulates latestTitle. Cut & Paste the clear_all_button code from below the plmnLabel & spnLabel nesting it within this new block. Ensure the attributes of latestTitle & clear_all_button match the comparison - without layout_width="0.0dip" and layout_weight="1" on latestTitle it won't align well.
6: As per the autotool instructions but substituting the example path with the path of our xml file.
xavierjohn22 said:
......
EXAMPLE 2: XML BINARY WHEN YOU DO DIRECT EDITS
Say you are editing a file straight from framework-res\res\drawable\progress_horizontal.xml
FOR NOW YOU HAVE TO DO THIS:
1) After doing [3], recompiling the apk
2) Copy the file _INPUT_APK\framework-res\build\apk\res\drawable\progress_horizontal.xml
to
_CUSTOM_RES\framework-res\res\drawable\progress_horizontal.xml
(this is the binary of your edited file, by doing this, you are telling the tool to overwrite it when building the apk)
3) Once this is done, make sure that "Overwrite res using _CUSTOM_RES" is ON, it is ON by default
4) then do build usable, It should overwrite those binaries in the APK
......
Click to expand...
Click to collapse
7: The completed lge-res.apk resides in autotool's out_apk folder, make this into a flashable zip, flash and pray everything went well - you don't need to flash framework-res.apk as well.
Troubleshooting: If autotool complains it can't find *.bat files try moving it to a folder that doesn't require permissions, ie: your user folder, I also had difficulty with long path names, so don't bury it too deep.
I'm an android noob so if my instructions are too vague in some areas i'll try to assist the best i can.
caution : do not expect exactly same thing please...
Preview :
{
"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"
}
this mod is originally posted in Nexus S theme forum.
[MOD] Change ICS Lockscreen to Galaxy Note style
and this is guide for above mod..
-----------------------------------------------------------------------------
1) frameworks_base/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
- line 444
from :
Code:
mOuterRing.setAlpha(0.0f);
to :
Code:
mOuterRing.setAlpha([COLOR="Blue"]1.0f[/COLOR]);
- line 728~
from :
Code:
if (activeTarget != -1) {
switchToState(STATE_SNAP, x,y);
float newX = singleTarget ? limitX : mTargetDrawables.get(activeTarget).getX();
float newY = singleTarget ? limitY : mTargetDrawables.get(activeTarget).getY();
moveHandleTo(newX, newY, false);
TargetDrawable currentTarget = mTargetDrawables.get(activeTarget);
if (currentTarget.hasState(TargetDrawable.STATE_FOCUSED)) {
currentTarget.setState(TargetDrawable.STATE_FOCUSED);
mHandleDrawable.setAlpha(0.0f);
}
} else {
switchToState(STATE_TRACKING, x, y);
moveHandleTo(x, y, false);
mHandleDrawable.setAlpha(1.0f);
}
}
to :
Code:
if (activeTarget != -1) {
switchToState(STATE_SNAP, x,y);
float newX = singleTarget ? limitX : mTargetDrawables.get(activeTarget).getX();
float newY = singleTarget ? limitY : mTargetDrawables.get(activeTarget).getY();
moveHandleTo(newX, newY, false);
TargetDrawable currentTarget = mTargetDrawables.get(activeTarget);
[COLOR="blue"]mOuterRing.setState(TargetDrawable.STATE_ACTIVE);[/COLOR]
if (currentTarget.hasState(TargetDrawable.STATE_FOCUSED)) {
currentTarget.setState(TargetDrawable.STATE_FOCUSED);
mHandleDrawable.setAlpha(0.0f);
}
} else {
switchToState(STATE_TRACKING, x, y);
[COLOR="blue"]mOuterRing.setState(TargetDrawable.STATE_INACTIVE);[/COLOR]
moveHandleTo(x, y, false);
mHandleDrawable.setAlpha(1.0f);
}
}
2) in framework-res.apk
- /res/drawable/ic_lockscreen_outerring.xml
to :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="false" android:state_enabled="true" android:state_active="false" android:drawable="@drawable/jog_tab_left_normal" />
<item android:state_focused="false" android:state_enabled="true" android:state_active="true" android:drawable="@drawable/jog_tab_left_pressed" />
</selector>
(i replaced other unused resources instead of adding new files.)
- /res/layout/keyguard_screen_tab_unlock.xml
to :
Code:
<?xml version="1.0" encoding="utf-8"?>
<GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="332.0dip">
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="3" android:verticalOffset="0.0dip" android:horizontalOffset="0.0dip" />
<TextView android:visibility="gone" android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
</RelativeLayout>
<com.android.internal.widget.DigitalClock android:layout_gravity="left" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginLeft="30.0dip" android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
</com.android.internal.widget.DigitalClock>
<LinearLayout android:layout_gravity="left" android:orientation="horizontal" android:layout_marginLeft="@dimen/keyguard_lockscreen_status_line_font_right_margin">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="16.0dip" android:singleLine="true" android:drawablePadding="4.0dip" />
</LinearLayout>
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="left" android:id="@id/status1" android:layout_marginLeft="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
<Space android:layout_gravity="fill" />
<Button android:layout_gravity="left" android:id="@id/emergencyCallButton" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginLeft="16.0dip" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="4.0dip" style="?android:attr/buttonBarButtonStyle" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
<Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:visibility="gone" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
</LinearLayout>
<include android:layout_gravity="fill" android:id="@id/transport" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_column="0" android:layout_row="0" android:layout_rowSpan="4" android:layout_columnSpan="1" layout="@layout/keyguard_transport_control" />
</GridLayout>
- /res/values/arrays.xml
from :
Code:
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@null</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
</array>
<array name="lockscreen_target_descriptions_with_camera">
<item>@string/description_target_unlock</item>
<item>@null</item>
<item>@string/description_target_camera</item>
<item>@null</item>
</array>
to :
Code:
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
</array>
<array name="lockscreen_target_descriptions_with_camera">
<item>@string/description_target_unlock</item>
</array>
- and resources (for wvga=hdpi device) : http://www.mediafire.com/?fio9rmc8reic4o9
: extract this zip to /res/drawable-hdpi/ (replace original files)
-----------------------------------------------------------------------------
10 char
1) frameworks_base/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
Click to expand...
Click to collapse
where to find this file?
WildeRNS said:
where to find this file?
Click to expand...
Click to collapse
Compile from source
LKNim said:
Compile from source
Click to expand...
Click to collapse
oooo.... maybe someone already done this mod for cm9?
Awesome gonna give it a try on mdpi
herpderp © aint got money to pay to my fish
can u help me ?
i cant find frameworks_base/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
even on the source of it galaxyics.com '
i couldnt find
i really want too apply this
could i request u to make it for this
dl link of framework http://www.mediafire.com/download.php?x812a9j12fxo8cg
(CM9)
i hope u can help
just 1 little request
try and report back,also mention the device and os
spacecaker said:
Awesome gonna give it a try on mdpi
herpderp © aint got money to pay to my fish
Click to expand...
Click to collapse
figured out that my pc is damm bad at compiling from source -_-
160 GB 1 gb ram
Ooo, going to try this, hope I don't screw something up
Just flashed, it's awesome. but... to Unlock, Only one point is able to touch:-(
Sent from my Nexus S using XDA
thanks for sharing
Can i use this mod to my CUSTOM ROM?
jun980219 said:
thanks for sharing
Can i use this mod to my CUSTOM ROM?
Click to expand...
Click to collapse
sure.. no problem if you use my work with proper credit given..
Ok, I handled to edit all the files, by the first one: that .java thing; i just copied everything in a notepad++ screen and saved it as .java, but I don't know where I have to put that file.
So question 1: Where do i have to put the MultiWaveView.java file?
And I hahve opened the framework-res.apk with apktool, but apktool gives an error when I type: apktool b out
(out=direction where I have the unpacked framework-res.apk)
So question 2: how to put the arrays.xml, ic_lockscreen_outerring.xml and keyguard_screen_tab_unlock.xml in the framework-res.apk?
Thanks in advanced
Wow, too complicated for me
sidewalk_ said:
Wow, too complicated for me
Click to expand...
Click to collapse
i know, i had Same thing when I saw it for the first tome
Sent from my GT-S5660 using xda premium
plzz post guide edit framework.jar
i dont know use source
thanks
How to add PagedView to lockscreen.
As most of you all know the android 4.2+ has implemented an awesome new Lockscreen on wich u can swipe pages to show widgets and such.
Currently i have managed to create working pageview but for now without Widgets.
However you can add some custom stuff though .
i had added DigitalClok -> AnalogClock -> Device Info.
but you would be able to change it like what you want as you can add unlimited LinearLayouts for adding new views.
{
"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"
}
Basicly this mod is very easy to add.
What is inside the resources.zip ?
SwipeLock Smalis for Framework.jar
Basicly what you would need to do is:
Download Resources Attachement.
Extract it
Decompile you’re framework.jar
Go to the extract smali folder from the resources.zip and copy the smali folder to the smali folder of you’re framework.jar.
Compile framework.jar
Now we are going to add it to the frameworks location/allocate the text.
Decompile framework-res.apk
Find a lockscreen layout to you’re likes. (“zzz_keyguard_screen_clockwidget.xml” <- on this one i have NOT tested as in my test app when i used a Lockscreen overlay i couldnt swipe the pages so its likely this one not works but on the GB ones it does
so instead i used “keyguard_screen_tab_unlock.xml” ofcourse you would be able to add this in other lock layouts aswell.
Open the layout you wanted and simply add this line above the clock layout or where you want
I put this code above my clock code ( i setted minheight to 300.0dip so u would be able to swipe it at this height)
Code:
<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">
And below you're clock layout
Code:
</com.spacecaker.swipelock.ui.SwipeView>
So now we have that now we need to put the clock layout inside a LinearLayout
Like this
Code:
<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
[COLOR="Magenta"] <com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>[/COLOR]
</LinearLayout>
So it would end up looking like this:
Code:
<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">
<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>
</LinearLayout>
</com.spacecaker.swipelock.ui.SwipeView>
Now we add another LinearLayout for you're second Page i used the universal AnalogClock like this
Code:
<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
So now we again add a LinearLayout so it ends up looking like this:
Code:
<LinearLayout android:orientation="vertical" android:minHeight="300.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
[COLOR="Magenta"]<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />[/COLOR]
</LinearLayout>
The end Layout would look like something like this:
Code:
<com.spacecaker.swipelock.ui.SwipeView android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300.0dip" android:overScrollMode="never">
<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="30.0dip" android:layout_below="@id/carrier">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="72.0sp" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="22.0sp" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBaseline="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>
</LinearLayout>
<LinearLayout android:orientation="vertical" android:minHeight="400.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true">
<AnalogClock android:layout_gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
</com.spacecaker.swipelock.ui.SwipeView>
To Add More pages just add another LinearLayout with something inside
Now Compile framework-res.apk
Now zip the files together and make sure these are set properly.
framework-res.apk inside /system/framework/**
And then ofcourse you’re modified framework.jar inside /system/framework/**
Now you are done
Happy modding
On what roms can u apply this mod ?
Basicly it can be applied to ALL Roms atleast if u know what u are doing.
If you wanna see how i moddified mine take a look here https://github.com/spacecaker/git_status_xp/commit/f85c304142f577e3a933a60ef3d61cbb2c0e89ac
That shows u what changes i did ^^ its on GingerBread SlidingTab Lockscreen just added it for making it look bit easier.
A list of helper,idea givers,and such
RomanBB
Pineapleowl
Mariozawa
BroadComCM
SpaceCaker
Sources? Yes We have!
https://github.com/spacecaker/SwipeLock
Try it without Modding?
Yes you can
In the Screenshots i had used HoloLocker as an example
So you can try it on you"re phone aswell
Note: the minheight might be to much for low res phones so i am sorry if the layout is cut.
looks cool bro... gonna try it soon..
It would be easy to add more items if all worked correctly..
thanks..
i was going to recompile framework.jar and i take this error
WHAT IS THIS?
Just a Potato clock
FEATURES
(COLOR HINTS)
NEW FEATURE
REMOVED
ORIGINAL FEATURE
VERSION
Potato Clock v2.1
Word Clock - Just time in words
All caps Word Clock
Minor bug fixes
New settings style - This one is cool
Potato Clock v2
***** Clock - Potato Edition of Fuzzy Clock (Show exact minutes in words)
All caps *****
Ninja Time removed
All features from v1.1
PREVIOUS CHANGE LOGS
Potato Clock v1.3
Ninja Moves - Ninja Time(Will change the current time to "NOW")
Potato Clock v1.2
Font - Bold|Condensed|Light|Light Italic|Normal|Custom (ttf & otf supported)
Potato Clock v1.1
AM/PM style - Normal|Small|Gone|Custom
Date style - Normal|Small|Gone|Custom
Potato Clock v1 - Initial release
Clock color - Color picker
Clock position - Left|Center|Right|Hide
Font - Bold|Condensed|Light|Light Italic|Normal
AM/PM style - Normal|Small|Gone
Date style - Normal|Small|Gone
Date format - 14 styles too many to mentions|Custom JAVA format
BUGS?
404 NOT FOUND
PM me if you found any bugs
SCREENIES
{
"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"
}
INSTRUCTIONS
Download needed files here.
Download & install Potato Clock settings here.
Extract the needed files.
Decompile your SystemUI.apk
Go to SystemUI.apk/smali then paste the smali in that folder
the smali directory will be
smali/com/potato/systemui/clocks/.SMALI FILES HERE
and the assets folder
SystemUI.apk/assets/.ttf files should be here
Go to res/layout/statusbar.xml
PHP:
<com.potato.systemui.clocks.ClockLeft android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
- This is for Left Clock
PHP:
<com.potato.systemui.clocks.ClockRight android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
- This is for Right Clock
PHP:
<com.potato.systemui.clocks.ClockCenter android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
- This is for Center clock
Put the codes in their right position
(Don't copy my whole statusbar.xml this is for TW 2.3.6)
PHP:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#00000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.potato.systemui.clocks.ClockCenter android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.potato.systemui.clocks.ClockLeft android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="1.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.potato.systemui.clocks.ClockRight android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="#000" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@android:style/Theme.Holo.Wallpaper" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@android:style/Theme.Holo.Wallpaper" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:background="#ff000000" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="0.0px" android:singleLine="true" />
</com.android.systemui.statusbar.StatusBarView>
For those who have Potato Statusbar Gesture mod you can use this for center clock
PHP:
<com.potato.touchbar.TouchMe android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.potato.systemui.clocks.ClockCenter android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textStyle="normal" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
</com.potato.touchbar.TouchMe>
IF YOU ALREADY HAVE POTATO CLOCK JUST PASTE THE SMALI FILES (.smali) in
PHP:
SystemUI.apk\smali\com\potato\systemui\clocks
ISSUES
404 ISSUES NOT FOUND
CREDITS
PotatoInc
MARIOZAWA
pollube31 - 24/7 tester
@Jay_SEAN - 12/2 tester
CYANOGENMOD
iPaulPro
IF YOU LIKE OUR WORK YOU KNOW WHAT TO DO
IF YOU WANT TO USE THIS IN YOUR AWESOME WORK PLEASE SEND ME A PM
AND AT LEAST PRESS THANKS BUTTON
I SUFFER FROM SUPER HEADACHE VERSION 4 WHEN DOING THIS
great mod!!!!!!
vishal1404 said:
great mod!!!!!!
Click to expand...
Click to collapse
Great mod!
But its do not work (Statusbar Force closed) on my LG P713, 4.1.2
Tested in Galaxy Wonder with CM9 rom, thanks for shared this awesome mod
thanks master
the_vanya1 said:
Great mod!
But its do not work (Statusbar Force closed) on my LG P713, 4.1.2
Click to expand...
Click to collapse
Can you attach logcat? Thanks
Sent from my GT-I9300 using Tapatalk
mariozawa said:
Can you attach logcat? Thanks
Sent from my GT-I9300 using Tapatalk
Click to expand...
Click to collapse
My LGSystemUI - https://www.dropbox.com/s/toi7vkcjgq2c4z1/LGSystemUI.apk
the_vanya1 said:
My LGSystemUI - https://www.dropbox.com/s/toi7vkcjgq2c4z1/LGSystemUI.apk
Click to expand...
Click to collapse
Bro logcat not your SystemUI.apk.
BTW there is a new version.
404 font not found when i chose a font
butiti_09 said:
404 font not found when i chose a font
Click to expand...
Click to collapse
Try to choose font from /system/fonts
It has bugs on devices that didn't have internal sdcard
But I'm working on it.
mariozawa said:
Bro logcat not your SystemUI.apk.
BTW there is a new version.
Click to expand...
Click to collapse
I know)
can you tell me the function of custom clock ? and whre i can find the custom java code for this potato clock mod ?
but overall this is a great mod sir, good job :good:
MRPP_mod said:
can you tell me the function of custom clock ? and whre i can find the custom java code for this potato clock mod ?
but overall this is a great mod sir, good job :good:
Click to expand...
Click to collapse
It just let you use custom Java date format.
Check this.
http://www.tutorialspoint.com/java/java_date_time.htm
The code of normal clock is hh:mm
AM/PM not showing in EVO X4,dunno why,maybe because this rom have edt tweaks old ver?
s5830i
you do it for me? phone galaxy ace (s5830i) ...I do turns out wrong.I couldn't do any of them, including all the sharing modes.They were all very beautiful!Where'd you learn to do them?
thank you google translate
I am from turkey...
nice mod! :good: nice work. Im using it in my hyperion 9
galing talaga ng pinoy
sir,can i use it on jb 4.1.2?
and what version of apktool should i use? tia
Sir, may I request for a flashable zip of this mod for Jellybean? Thanks.
Deleted
[/PHP]
work with loliipop?
Hello guys, i'm here for presenting a new one (old but gold from GB devices), it was adapted from my own ROM for GT-S5360 http://forum.xda-developers.com/showthread.php?t=2231324 i'm already trying in my phone (KK 4.4.2) and it works good i'm believe it will works on any roms with UMS (USB Mass Storage) feature. so, try it and give feedback for who want like this
look this below (for GB user, its look familiar )
{
"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"
}
so let's begin,
What you need?
1. tool for compile-decompile
2. framework-res
How-to:
1. decompile framework-res.apk
2. go to res/layout/usb_storage_activity.xml
3. replace all the lines with this one
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:gravity="center" android:id="@id/main" android:padding="18.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="45.0dip">
<Button android:layout_gravity="center_horizontal" android:id="@id/mount_button" android:background="@drawable/usb_android" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<Button android:layout_gravity="center_horizontal" android:id="@id/unmount_button" android:background="@drawable/usb_android_connected" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:id="@id/icon" android:layout_width="0.0dip" android:layout_height="0.0dip" android:src="@color/transparent" android:layout_centerHorizontal="true" />
</LinearLayout>
<LinearLayout android:layout_gravity="center_vertical" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true">
<TextView android:textSize="24.0sp" android:gravity="center" android:id="@id/banner" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginBottom="10.0dip" android:text="@string/usb_storage_title" android:layout_below="@id/icon" android:layout_centerHorizontal="true" />
<TextView android:textSize="14.0sp" android:gravity="center" android:id="@id/message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_marginBottom="10.0dip" android:text="@string/usb_storage_message" android:layout_below="@id/banner" />
</LinearLayout>
<RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="120.0dip" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true">
<ProgressBar android:id="@id/progress" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:indeterminate="true" style="?android:attr/progressBarStyle" />
</RelativeLayout>
</RelativeLayout>
4. done then compile.
5. flash it
NB:
1. always make a nandroid backup before doing anything
2. some issues happened maybe in the your layout. you need to fix it your self cz this is for HDPI device
3. sorry if my english so bad
credit:
i don't know who fisrt make this, cz this has been a long time. so i just can say thanks!