Instructions for editing system resources | Catalog of instructions (manuals) for editing system resources



Rep: (3155)
Instructions for editing Android system resources


Attached Image

We collect knowledge on editing the graphic part of Android

  1. Only published manuals, lessons, etc. by application modification. Questions and comments leave in the discussion
  2. Before making a message with a lesson.
    • It is recommended to check if it has not been placed before; in case of repetition, the information will be deleted. Please describe in detail all the subtleties of the editing method.
  3. Publication of lessons, manuals, etc.
    • Allowed only by the set pattern!
      Template
      New instruction
      [center] [color = blue] [size = 3] [b] The name of the lesson, manual, etc. [/ b] [/ size] [/ color] [/ center]
      [b] Tested on: [/ b]
      [list] [*] [color = darkred] [b] Android versions: [/ b] [/ color] Android X.Y.Z
      [*] [color = purple] [b] Shell / firmware / device: [/ b] [/ color] Samsung / LG / AOSP / LineageOS
      [/ list]
      [spoiler = Description / Instruction] [color = "# 000000"] [b] Description [/ b] [/ color]
      Briefly, but clearly disclose the essence of the modification
      [img] // s.savagemessiahzine.com.to / forum / style_images / f / 281-divider_3.png [/ img] (When inserting a message, remove the space to make // s.savagemessiahzine.com.to)
      [color = "# 000000"] [b] Instructions [/ b] [/ color]
      Here is your detailed instructions
      [/ spoiler]
      [spoiler = Screenshots / Video] Attach screenshots / video if necessary. If not, then remove the spoiler [/ spoiler]


      Addition to the already existing instructions
      [center] [size = 3] [color = teal] [b] Addition to [/ color] [url = "//savagemessiahzine.com/forum/index.php?showtopic=540887" reference to the original [/ url] [/ b] [/ size] [/ center]

      [spoiler = Description / Instruction] [color = "# 000000"] [b] Description [/ b] [/ color]
      Briefly, but clearly disclose the essence of the supplement
      [img] // s.savagemessiahzine.com.to / forum / style_images / f / 281-divider_3.png [/ img] (When inserting a message, remove the space to make // s.savagemessiahzine.com.to)
      [color = "# 000000"] [b] Instructions [/ b] [/ color]
      Here is your detailed instructions
      [/ spoiler]
      [spoiler = Screenshots / Video] Attach screenshots / video if necessary. If not, then remove the spoiler [/ spoiler]

    • It is forbidden to publish messages that include only links to instructions / additions, but not the content of instructions / additions, because this does not match the above message design patterns. The exception is the announcement of adding a supplement to the message with the manual (located in this topic). Such an announcement must be removed within a week after publication.


Catalog of manuals and manuals
Part One (General, Framework, Multimedia)

The second part (SystemUI, Communication, Other)

The third part (Settings)


Topics Curator:Art2000Write


Post has been editedArt2000 - 09.08.20, 12:46



Rep: (385)
Unlock item For developers in the settings

test android 4.2.2, 4.4.2

a little easier thanUnlock points to developers in the settings (test 4.4.2 apktool 2.0.0)
Description

open your /system/build.prop
For typical line ro.build.type =
usually there user, it is and describe it user and mount

Settings \ smali \ com \ android \ settings \ Settings.smali

Find

iget-object v10, p0, Lcom / android / settings / Settings; ->mDevelopmentPreferences: Landroid / content / SharedPreferences;

const-string v11, "show"

sget-object v12, Landroid / os / Build; ->TYPE: Ljava / lang / String;

const-string v13, "eng"

invoke-virtual {v12, v13}, Ljava / lang / String; ->equals (Ljava / lang / Object;) Z

move-result v12

invoke-interface {v10, v11, v12}, Landroid / content / SharedPreferences; ->getBoolean (Ljava / lang / String; Z) Z

move-result v8


change const-string v13, "eng" in the const-string v13, "user"

collect, replace the original way you want


Post has been editedDimar - 06.10.15, 20:44
Reason for editing: *



Rep: (188)
Do not turn on the screen in your pocket
Android 4.2.2
1) in the fileservices.jar / smali / com / android / server / power / DisplayPowerController.smaliat the beginning of the method.method private setProximitySensorEnabled (Z) Vafter
iput-boolean v4, p0, Lcom / android / server / power / DisplayPowerController; ->mProximitySensorEnabled: Z
add
iput-boolean v4, p0, Lcom / android / server / power / DisplayPowerController; ->mScreenOffBecauseOfProximity: Z
2) in the same file in the method.method private updatePowerState () Vto replace
if-eq v6, v7,: cond_8
on
if-ne v6, v8,: cond_8
3) in the same method to replace
: cond_13
invoke-direct {p0, v8}, Lcom / android / server / power / DisplayPowerController; ->setProximitySensorEnabled (Z) V
iput-boolean v8, p0, Lcom / android / server / power / DisplayPowerController; ->mWaitingForNegativeProximity: Z
goto / 16: goto_3
: cond_14
on
: cond_13
iget-object v6, p0, Lcom / android / server / power / DisplayPowerController; ->mPowerRequest: Lcom / android / server / power / DisplayPowerRequest;
iget-boolean v6, v6, Lcom / android / server / power / DisplayPowerRequest; ->useProximitySensor: Z
if-eqz v6,: cond_26_
invoke-direct {p0, v7}, Lcom / android / server / power / DisplayPowerController; ->setProximitySensorEnabled (Z) V
: goto_f_
iput-boolean v8, p0, Lcom / android / server / power / DisplayPowerController; ->mWaitingForNegativeProximity: Z
goto / 16: goto_3
: cond_26_
invoke-direct {p0, v8}, Lcom / android / server / power / DisplayPowerController; ->setProximitySensorEnabled (Z) V
goto: goto_f_
: cond_14
4) in the fileservices.jar / smali / com / android / server / power / PowerManagerService $ 4.smaliin the method.method public onProximityNegative () Vto replace
invoke-static {v0}, Lcom / android / server / power / PowerManagerService; ->access $ 1900 (Lcom / android / server / power / PowerManagerService;) V
monitor-exit v6
on
invoke-static {}, Landroid / os / SystemClock; ->uptimeMillis () J
move-result-wide v1
invoke-static {v0, v1, v2}, Lcom / android / server / power / PowerManagerService; ->access $ 1000 (Lcom / android / server / power / PowerManagerService; J) Z
iget-object v0, p0, Lcom / android / server / power / PowerManagerService $ 4 ->the this $ 0: Lcom / android / server / power / PowerManagerService;
invoke-static {v0}, Lcom / android / server / power / PowerManagerService; ->access $ 1900 (Lcom / android / server / power / PowerManagerService;) V
iget-object v0, p0, Lcom / android / server / power / PowerManagerService $ 4 ->the this $ 0: Lcom / android / server / power / PowerManagerService;
invoke-static {v0}, Lcom / android / server / power / PowerManagerService; ->access $ 000 (Lcom / android / server / power / PowerManagerService;) V
monitor-exit v6
Where
.method static synthetic access $ 1000 (Lcom / android / server / power / PowerManagerService; J) Z
.locals 1
.param p0 # Lcom / android / server / power / PowerManagerService;
.param p1 # J
invoke-direct {p0, p1, p2}, Lcom / android / server / power / PowerManagerService; ->wakeUpNoUpdateLocked (J) Z
move-result v0
return v0
.end method
5) in the fileservices.jar / smali / com / android / server / power / PowerManagerService.smalibefore
# direct methods
.method public constructor<init>() V
add
.field private mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
.field private mTelephonyManager: Landroid / telephony / TelephonyManager;
6) there after
iput-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mDisplayPowerControllerCallbacks: Lcom / android / server / power / DisplayPowerController $ Callbacks;
add
iput-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
7) there is in the method.method private updateWakeLockSummaryLocked (I) Vto replace
: sswitch_4
iget v3, p0, Lcom / android / server / power / PowerManagerService; ->mWakefulness: I
if-eqz v3,: cond_0
iget v3, p0, Lcom / android / server / power / PowerManagerService; ->mWakeLockSummary: I
or-int / lit8 v3, v3, 0x10
on
: sswitch_4
iget v3, p0, Lcom / android / server / power / PowerManagerService; ->mWakeLockSummary: I
or-int / lit8 v3, v3, 0x10
8) to rename it the same method.method private wakeUpNoUpdateLocked (J) Zat.method private wakeUpNoUpdateLockedOrg (J) Z
9) there is at the end of the method.method public systemReady (Lcom / android / server / TwilightService; Lcom / android / server / dreams / DreamManagerService;) Vbefore
monitor-exit v17
return-void
add
const / 16 v2, 0x20
invoke-virtual {v14, v2}, Landroid / os / PowerManager; ->isWakeLockLevelSupported (I) Z
move-result v0
if-eqz v0,: cond_0_
const / 16 v2, 0x20
const-string v0, "PowerManagerService"
invoke-virtual {v14, v2, v0}, Landroid / os / PowerManager; ->newWakeLock (ILjava / lang / String;) Landroid / os / PowerManager $ WakeLock;
move-result-object v0
move-object / from16 v2, p0
iput-object v0, v2, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
: cond_0_
move-object / from16 v0, p0
iget-object v0, v0, Lcom / android / server / power / PowerManagerService; ->mContext: Landroid / content / Context;
const-string v2, "phone"
invoke-virtual {v0, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / telephony / TelephonyManager;
move-object / from16 v1, p0
iput-object v0, v1, Lcom / android / server / power / PowerManagerService; ->mTelephonyManager: Landroid / telephony / TelephonyManager;
10) and the end of file add
.method static synthetic access $ 000 (Lcom / android / server / power / PowerManagerService;) V
.locals 0
.param p0 # Lcom / android / server / power / PowerManagerService;

invoke-direct {p0}, Lcom / android / server / power / PowerManagerService; ->proximityWakeLockRelease () V

return-void
.end method

.method private proximityWakeLockRelease () V
.locals 4

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

if-eqz v1,: cond_0

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

invoke-virtual {v1}, Landroid / os / PowerManager $ WakeLock; ->isHeld () Z

move-result v0

const-string v1, "PocketScreenOff"

new-instance v2, Ljava / lang / StringBuilder;

invoke-direct {v2}, Ljava / lang / StringBuilder; -><init>() V

const-string v3, "proximityWakeLockRelease: isHeld ="

invoke-virtual {v2, v3}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v2

invoke-virtual {v2, v0}, Ljava / lang / StringBuilder; ->append (Z) Ljava / lang / StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v2

invoke-static {v1, v2}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

if-eqz v0,: cond_0

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

const / 4 v2, 0x0

invoke-virtual {v1, v2}, Landroid / os / PowerManager $ WakeLock; ->release (I) V

: cond_0
return-void
.end method

.method private wakeUpNoUpdateLocked (J) Z
.locals 7
.param p1 # J

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

if-eqz v3,: cond_1

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

invoke-virtual {v3}, Landroid / os / PowerManager $ WakeLock; ->isHeld () Z

move-result v1

const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: isHeld ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v1}, Ljava / lang / StringBuilder; ->append (Z) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mTelephonyManager: Landroid / telephony / TelephonyManager;

invoke-virtual {v3}, Landroid / telephony / TelephonyManager; ->getCallState () I

move-result v0

const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: callState ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v0}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

if-nez v1,: cond_1

const / 4 v3, 0x2

if-eq v0, v3,: cond_1

if-nez v0,: cond_0

invoke-direct {p0}, Lcom / android / server / power / PowerManagerService; ->getScreenOffTimeoutLocked () I

move-result v2

: goto_0
const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: timeout ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v2}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

int-to-long v4, v2

invoke-virtual {v3, v4, v5}, Landroid / os / PowerManager $ WakeLock; ->acquire (J) V

const / 4 v3, 0x1

: goto_1
return v3

: cond_0
iget v2, p0, Lcom / android / server / power / PowerManagerService; ->mScreenOffTimeoutSetting: I

goto: goto_0

: cond_1
invoke-direct {p0, p1, p2}, Lcom / android / server / power / PowerManagerService; ->wakeUpNoUpdateLockedOrg (J) Z

move-result v3

goto: goto_1
.end method
Android 5.0
1) in the fileservices.jar / smali / com / android / server / display / DisplayPowerController.smaliat the beginning of the method.method private setProximitySensorEnabled (Z) Vafter
iput-boolean v0, p0, Lcom / android / server / display / DisplayPowerController; ->mProximitySensorEnabled: Z
add
iput-boolean v0, p0, Lcom / android / server / display / DisplayPowerController; ->mScreenOffBecauseOfProximity: Z
2) in the same file in the method.method private updatePowerState () Vto replace
const / 4 v12, 0x1
if-eq v11, v12,: cond_b
on
const / 4 v12, 0x0
if-ne v11, v12,: cond_b
3) in the same method to remove
iget-boolean v11, p0, Lcom / android / server / display / DisplayPowerController; ->mScreenOffBecauseOfProximity: Z
if-eqz v11,: cond_25
const / 4 v11, -0x1
iput v11, p0, Lcom / android / server / display / DisplayPowerController; ->mProximity: I
: cond_25
4) in the fileservices.jar / smali / com / android / server / power / PowerManagerService $ 7.smaliat the end of the method.method public onProximityNegative () Vbefore
monitor-exit v7
return-void
add
iget-object v0, p0, Lcom / android / server / power / PowerManagerService $ 7 ->the this $ 0: Lcom / android / server / power / PowerManagerService;
# Invokes: Lcom / android / server / power / PowerManagerService; ->proximityWakeLockRelease () V
invoke-static {v0}, Lcom / android / server / power / PowerManagerService; ->access $ 000 (Lcom / android / server / power / PowerManagerService;) V
5) in the fileservices.jar / smali / com / android / server / power / PowerManagerService.smalibefore
# direct methods
.method public constructor<init>(Landroid / content / Context;) V
add
.field private mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
.field private mTelephonyManager: Landroid / telephony / TelephonyManager;
6) there after
iput-object p1, p0, Lcom / android / server / power / PowerManagerService; ->mContext: Landroid / content / Context ;;
add
iput-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
7) there is a method to rename.method private wakeUpNoUpdateLocked (JI) Zat.method private wakeUpNoUpdateLockedOrg (JI) Z
8) there is at the end of the method.method public systemReady (Lcom / android / server / TwilightService; Lcom / android / server / dreams / DreamManagerService;) Vbefore
monitor-exit v12
: try_end_2
.catchall {: try_start_2 ..: try_end_2}: catchall_0
return-void
add
const / 16 v2, 0x20
invoke-virtual {v9, v2}, Landroid / os / PowerManager; ->isWakeLockLevelSupported (I) Z
move-result v0
if-eqz v0,: cond_0_
const / 16 v2, 0x20
const-string v0, "PowerManagerService"
invoke-virtual {v9, v2, v0}, Landroid / os / PowerManager; ->newWakeLock (ILjava / lang / String;) Landroid / os / PowerManager $ WakeLock;
move-result-object v0
iput-object v0, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;
: cond_0_
iget-object v0, p0, Lcom / android / server / power / PowerManagerService; ->mContext: Landroid / content / Context;
const-string v2, "phone"
invoke-virtual {v0, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / telephony / TelephonyManager;
iput-object v0, p0, Lcom / android / server / power / PowerManagerService; ->mTelephonyManager: Landroid / telephony / TelephonyManager;
9) and the end of file add
.method static synthetic access $ 000 (Lcom / android / server / power / PowerManagerService;) V
.locals 0
.param p0 # Lcom / android / server / power / PowerManagerService;

invoke-direct {p0}, Lcom / android / server / power / PowerManagerService; ->proximityWakeLockRelease () V

return-void
.end method

.method private proximityWakeLockRelease () V
.locals 4

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

if-eqz v1,: cond_0

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

invoke-virtual {v1}, Landroid / os / PowerManager $ WakeLock; ->isHeld () Z

move-result v0

const-string v1, "PocketScreenOff"

new-instance v2, Ljava / lang / StringBuilder;

invoke-direct {v2}, Ljava / lang / StringBuilder; -><init>() V

const-string v3, "proximityWakeLockRelease: isHeld ="

invoke-virtual {v2, v3}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v2

invoke-virtual {v2, v0}, Ljava / lang / StringBuilder; ->append (Z) Ljava / lang / StringBuilder;

move-result-object v2

invoke-virtual {v2}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v2

invoke-static {v1, v2}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

if-eqz v0,: cond_0

iget-object v1, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

const / 4 v2, 0x0

invoke-virtual {v1, v2}, Landroid / os / PowerManager $ WakeLock; ->release (I) V

: cond_0
return-void
.end method

.method private wakeUpNoUpdateLocked (JI) Z
.locals 7
.param p1 # J
.param p3 # I

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

if-eqz v3,: cond_1

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

invoke-virtual {v3}, Landroid / os / PowerManager $ WakeLock; ->isHeld () Z

move-result v1

const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: isHeld ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v1}, Ljava / lang / StringBuilder; ->append (Z) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mTelephonyManager: Landroid / telephony / TelephonyManager;

invoke-virtual {v3}, Landroid / telephony / TelephonyManager; ->getCallState () I

move-result v0

const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: callState ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v0}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

if-nez v1,: cond_1

const / 4 v3, 0x2

if-eq v0, v3,: cond_1

if-nez v0,: cond_0

invoke-direct {p0}, Lcom / android / server / power / PowerManagerService; ->getSleepTimeoutLocked () I

move-result v3

invoke-direct {p0, v3}, Lcom / android / server / power / PowerManagerService; ->getScreenOffTimeoutLocked (I) I

move-result v2

: goto_0
const-string v3, "PocketScreenOff"

new-instance v4, Ljava / lang / StringBuilder;

invoke-direct {v4}, Ljava / lang / StringBuilder; -><init>() V

const-string v5, "wakeUpNoUpdateLocked: timeout ="

invoke-virtual {v4, v5}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4, v2}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v4

invoke-virtual {v4}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v4

invoke-static {v3, v4}, Landroid / util / Log; ->v (Ljava / lang / String; Ljava / lang / String;) I

iget-object v3, p0, Lcom / android / server / power / PowerManagerService; ->mProximityWakeLock: Landroid / os / PowerManager $ WakeLock;

int-to-long v4, v2

invoke-virtual {v3, v4, v5}, Landroid / os / PowerManager $ WakeLock; ->acquire (J) V

const / 4 v3, 0x1

: goto_1
return v3

: cond_0
iget v2, p0, Lcom / android / server / power / PowerManagerService; ->mScreenOffTimeoutSetting: I

goto: goto_0

: cond_1
invoke-direct {p0, p1, p2, p3}, Lcom / android / server / power / PowerManagerService; ->wakeUpNoUpdateLockedOrg (JI) Z

move-result v3

goto: goto_1
.end method


Post has been editedRecGRpth - 07.10.15, 07:49
Reason for edit: except during conversation



Rep: (1505)
Rotate the lock screen with the switch, Lollipop

Original instruction: XDA
Test: Samsung Galaxy S 4, Samsung Galaxy S 5
edit SystemUI
We disassemble SystemUI.apk
proceed tosmali \ com \ android \ systemui \ statusbar \ phone \ StatusBarWindowManager.smali
We are looking for a method.method private shouldEnableKeyguardScreenRotation () Z
increase .locals from 3 to 5and addlines
.method private shouldEnableKeyguardScreenRotation () Z
.locals5

iget-object v3, p0, Lcom / android / systemui / statusbar / phone / StatusBarWindowManager; ->mContext: Landroid / content / Context;

const / 4 v1,0x0

invoke-virtual {v3}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v3

const-string v4, "lockscreen_rotate"

invoke-static {v3, v4, v1}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v3

if-eqz v3,: cond_td

const / 4 v1, 0x1

: cond_td



Putting SystemUI!

Edit SecSettings \ Customsettings:
SecSettings \ res \ values ​​\ strings.xml added at the end:
<string name = "lockscreen_rotation">lockscreen Rotation</ string>
<string name = "lockscreen_rotation_enabled">Lockscreen rotation enabled</ string>
<string name = "lockscreen_rotation_disabled">Lockscreen rotation disabled</ string>


For Russian localization:
SecSettings \ res \ values-ru \ strings.xml
<string name = "lockscreen_rotation">Rotate the lock screen</ string>
<string name = "lockscreen_rotation_enabled">Turn On</ string>
<string name = "lockscreen_rotation_disabled">twist off</ string>


Where we want to see, we prescribe:
<SwitchPreference android: title = "@ string / lockscreen_rotation" android: key = "lockscreen_rotate" android: summaryOn = "@ string / lockscreen_rotation_enabled" android: summaryOff = "@ string / lockscreen_rotation_disabled" />


Putting SecSettings \ Customsettings

Screen
Attached Image


Post has been editedDimar - 05.10.15, 19:56
Reason for editing: *



Rep: (1505)
Ambient Display & Ambient Display timeout Toggle, Lollipop

Original instruction: XDA
Test: Samsung Galaxy S 4, Samsung Galaxy S 5
Description
Ambient Display- a feature that allows a mobile device to wake up on their own, (Black-and-white screen) when you receive a notification from: Viber, WhatsApp, VK, etc.(In normal sms on my Galaxy S 4, this function is not working! Who can find a solution, please write to the mare's milk), thankikromjon75For this you need to uncheck - The screen is turned on. to SMS - Settings - Notifications

Android 5.x.x
Editingframework-res.apk
Go along the wayframework-res / res / values ​​/ strings.xml

Line
<string name = "config_dozeComponent"></ string>

Change to:
<string name = "config_dozeComponent">com.android.systemui / com.android.systemui.doze.DozeService</ string>


Further
framework-res / res / values ​​/ bool.xml

Lines:
<bool name = "config_dozeAfterScreenOff">false</ bool>
<bool name = "config_powerDecoupleInteractiveModeFromDisplay">false</ bool>


Change to:
<bool name = "config_dozeAfterScreenOff">true</ bool>
<bool name = "config_powerDecoupleInteractiveModeFromDisplay">true</ bool>


Further
framework-res / res / values ​​/ Intergers.xml
Are looking for:
<integer name = "config_screenBrightnessDoze">1</ integer>


Change to:
<integer name = "config_screenBrightnessDoze">17</ integer>


Putting framework-res.apk!

EditingSystemUI.apk
Go along the waySystemUI / res / values ​​/ bools.xml
Lines:
<bool name = "doze_display_state_supported">false</ bool>
<bool name = "doze_pulse_on_pick_up">false</ bool>

Change to:
<bool name = "doze_display_state_supported">true</ bool>
<bool name = "doze_pulse_on_pick_up">true</ bool>



Go along the waySystemUI / smali / com / android / systemui / statusbar / phone / DozeParameters.smali

The whole method
.method public getDisplayStateSupported () Z

Change to:
.method public getDisplayStateSupported () Z
.locals 4

.prologue
.line 64
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / DozeParameters; ->mContext: Landroid / content / Context;

invoke-virtual {v1}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v1

const-string v2, "ambient_display_active"

const v3, 0x0

invoke-static {v1, v2, v3}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

return v0
.end method


We are looking for a method:
.method public getPulseOnNotifications () Z

All methods are changing to:
.method public getPulseOnNotifications () Z
.locals 4

.prologue
.line 64
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / DozeParameters; ->mContext: Landroid / content / Context;

invoke-virtual {v1}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v1

const-string v2, "ambient_display_active"

const v3, 0x0

invoke-static {v1, v2, v3}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

return v0
.end method


Are looking for:
.method public getPulseVisibleDuration () I


All methods are changing to:
.method public getPulseVisibleDuration () I
.locals 4

.prologue
.line 76
iget-object v1, p0, Lcom / android / systemui / statusbar / phone / DozeParameters; ->mContext: Landroid / content / Context;

invoke-virtual {v1}, Landroid / content / Context; ->getContentResolver () Landroid / content / ContentResolver;

move-result-object v1

const-string v2, "ambient_timeout"

const v3, 0xe74

invoke-static {v1, v2, v3}, Landroid / provider / Settings $ System; ->getInt (Landroid / content / ContentResolver; Ljava / lang / String; I) I

move-result v0

return v0
.end method


Putting SystemUI!

EditingROM Control apk
<CheckBoxPreference android: title = "Ambient Display" android: key = "ambient_display_active" android: summaryOn = "On" android: summaryOff = "Off" />
<SeekBarPreference android: max = "10000" android: title = "Ambient Display Screen Time" android: key = "ambient_timeout" android: dependency = "ambient_display_active" android: defaultValue = "10000" />


Android 6.0.1 MARSHMALLOW
Infa withXda
Open upframework-res / res / values ​​/ string
Change:
<string name = "config_dozeComponent"></ string>

on:
<string name = "config_dozeComponent">com.android.systemui / com.android.systemui.doze.DozeService</ string>

Open:
values ​​/ bools
Change:
<bool name = "config_dozeAfterScreenOff">false</ bool>
<bool name = "config_powerDecoupleInteractiveModeFromDisplay">false</ bool>

on:
<bool name = "config_dozeAfterScreenOff">true</ bool>
<bool name = "config_powerDecoupleInteractiveModeFromDisplay">true</ bool>

Open:
values ​​/ Interger
Change:
<integer name = "config_screenBrightnessDoze">1</ integer>

on:
<integer name = "config_screenBrightnessDoze">17</ integer>


Screen
Attached Image
Addition


Post has been editedAnton 982 - 27.02.17, 13:14
Reason for editing: Android 6.0.1



Rep: (385)
Supplement toIndicator incoming / outgoing velocity

speed indicator on the left side of the status bar
Test 4.2.2 MTK
Description
insert code not SystemUI \ res \ layout \ signal_cluster_view.xml and go along the way:
SystemUI / res / layout / gemini_status_bar.xml and status_bar.xml and paste codebefore
<com.android.systemui.statusbar.StatusBarIconView android: id = "@ id / moreIcon" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / stat_notify_more "/>


screen
Attached Image


Post has been editedoddmsz - 09.10.15, 17:25
Reason for editing: *



Rep: (1505)
Layouts

android: gravity; android: layout_weight; android: layout_gravity

Investigated in locating element on android. Information taken from different sources. I think many will be useful romodelam this infa.


FrameLayout, LinearLayout, RelativeLayout, ScrollView,
Any Activity (activities, the application window) is composed of Views and ViewGroups. View - a widget that is drawn on the screen, for example, a button, a text box, a list. All these widgets are inherited from the class android.view.View.
ViewGroup - marking, allowing to place one or more View. Markup android.view.ViewGroup inherited from class, which in turn derives from android.view.View. This means that the children of the markup can be not only a View, but they themselves markup

Examples ViewGroups:
- FrameLayout
- LinearLayout
- TableLayout
- RelativeLayout
- ScrollView

Let us consider them in more detail.

FrameLayout

for displaying one marking element. View or subsidiaries in ViewGroup FrameLayout aligned to the top left corner. The markup can contain several elements, but then they will overlap each other. For instance:

<FrameLayout
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<ImageView
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: src = "@ drawable / image" />

<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "@ string / Button" />
</ Framelifeout>

Attached Image


FrameLayout convenient to use for multiple elements that hide and show program, so that at each moment of time is visible only one of them. To control the visibility attribute member is used android: visibility in xml or method setVisibility (int visibility), where visibility takes one of three values:
VISIBLE - see item
INVISIBLE - invisible element, but still ranks in the markup
GONE - element is invisible and does not take place in the markup

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Linearlayout

Partitioning for displaying one or more elements in one line horizontally or vertically. To select the orientation attribute android used: orientation with two possible values ​​«horizontal» and «vertical»
<Linearlayout
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: orientation = "vertical"
>
<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "@ string / Button"
/>
<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "@ string / Button"
/>
<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "@ string / Button"
/>
</ LinearLayout>

Attached Image

Withandroid: orientation = "horizontal"

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

RelativeLayout

Partitioning for arrangement of the elements relative to each other or parent. Elements begin to be placed in that order, so it is necessary that the element has been described before, the other member will refer to it.

<RelativeLayout
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<ImageView
android: id = "@ + id / image"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: src = "@ drawable / image"
android: layout_centerHorizontal = "true" />
<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_toLeftOf = "@ id / image"
android: text = "@ string / Left" />
<Button
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_toRightOf = "@ id / image"
android: text = "@ string / Right" />
</ RelativeLayout>


Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Scrollview

ScrollView is the successor FrameLayout class. The difference is that it allows you to scroll through the items, if they take up more space than the physical size of the screen. In ScrollView may also contain only one element (View or ViewGroup), often used LinearLayout, which is embedded in multiple items. Scrollview only supports vertical scrolling.

<Scrollview
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">
<Linearlayout
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: orientation = "vertical">
<! - Many elements ->
</ LinearLayout>
</ ScrollView>


Attached Image



elements attributes

View all who have invested in ViewGroup attributes allow you to control their size or location. The main ones are:

attributesandroid: layout_widthandandroid: layout_height
The width and height of the item. The attribute can have the following values:
fill_parent - the element has the same size as the parent element
wrap_content - element is the size of its contents
the exact size of the value. Size indicated in:
dp - (Density-independent Pixels) - an abstract unit, based on screen density. On devices with 160dpi screen: 1dp = 1px. This relationship will change on the screen with different density, not necessarily in direct proportion. This ensures the consistency of the interface elements of size on different devices.


Attributegravity

When you create screen layouts are often used two properties:android: gravityandandroid: layout_gravityWhich allow you to change the location of items on the screen with a tendency towards a certain point. Gravity is translated to English as "attraction", "attraction". The difference between these two properties is thatandroid: gravityIt determines the gravity in any element,android: layout_gravity- the attraction element relative to the parent container.


This is an empty status bar
Attached Image


Let's add a clock

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: background = "# ff33b5e5"
android: textColor = "# ffffffff"
android: layout_width = "wrap_content"
android: layout_height = "fill_parent" />

We obtain this result

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

addingandroid: gravity = "center"

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: gravity = "center"
android: background = "# ff33b5e5"
android: textColor = "# ffffffff"
android: layout_width = "wrap_content"
android: layout_height = "fill_parent" />

We obtain this result

Attached Image

As we see the attribute change in your space, extend this space!

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Changeablewrap_contenton

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: background = "# ff33b5e5"
android: textColor = "# ffffffff"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent" />

fill_parent- This value can be translated as "to fill a parent." Such transfer can be interpreted in such a way that the element fills in all the parent free of other elements of the area. In fact fill_parent property simply equates the size of a child element to the appropriate size of the parent. That is, if a parent near are other elements, this element itself vypret just outside parent or vypret there are other elements in the parent.

We obtain this result

Attached Image


And adding familiar to usandroid: gravity = "center"

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: gravity = "center"
android: background = "# ff33b5e5"
android: textColor = "# ffffffff"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent" />

We obtain this result

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Quote:
Originally Posted byGoogle


top -Tyagotenie up
bottom -Tyagotenie down
left -Tyagotenie left
right -Tyagotenie right
center -Tyagotenie centered, both on the horizontal and on the vertical axis
center_horizontal -Tyagotenie the horizontal axis center
center_vertical -Tyagotenie centered vertical axis
fill Fully fills the container
fill_horizontal -To be completed container horizontally
fill_vertical -To be completed container vertically

Attributeweight
If we have a parent contains multiple items and we want them to take all the space necessary to use theLayout weight- the weight. The free space between the elements is distributed in proportion to their weight-values.

It is again our empty status bar
Attached Image


Add notification icon and signal strength icon

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: background = "# ff0099cc"
android: layout_width = "wrap_content"
android: layout_height = "fill_parent" />

<ImageView
android: id = "@ id / mobile_signal"
android: background = "# ff33b5e5"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
</ LinearLayout>

I missed some of the attributes in the code to make it easier to read, as well as the background for added signal strength

We obtain this result

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

addingandroid: layout_weight = "1"to the notification icon

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: layout_weight = "1"
android: background = "# ff0099cc"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent" />

<ImageView
android: id = "@ id / mobile_signal"
android: background = "# ff33b5e5"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
</ LinearLayout>


We get this kind of

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Change the code as follows:

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: layout_weight = "1"
android: background = "# ff0099cc"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent" />

<ImageView
android: id = "@ id / mobile_signal"
android: layout_weight = "1"
android: background = "# ff33b5e5"
android: layout_width = "0.0dip"
android: layout_height = "wrap_content" />
</ LinearLayout>


We obtain this result

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

To move the icon to the right of the signal, add the following

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: layout_weight = "1"
android: background = "# ff0099cc"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent" />

<Linearlayout
android: orientation = "horizontal"
android: layout_weight = "1"
android: layout_width = "0.0dip"
android: background = "# ff33b5e5"
android: layout_height = "fill_parent">

<View
android: visibility = "invisible"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent"
android: layout_weight = "1" />


<ImageView
android: id = "@ id / mobile_signal"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
</ LinearLayout>
</ LinearLayout>

Attached Image

INVISIBLE- the item is invisible, but still ranks in the markup

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Adding to the code of our watches

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: layout_weight = "1"
android: background = "# ff0099cc"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent" />

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: layout_gravity = "center"
android: background = "# 00ddff"
android: textColor = "# ffffffff"
android: layout_width = "wrap_content"
android: layout_height = "fill_parent" />


<Linearlayout
android: orientation = "horizontal"
android: layout_weight = "1"
android: layout_width = "0.0dip"
android: background = "# ff33b5e5"
android: layout_height = "fill_parent">

<View
android: visibility = "invisible"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent"
android: layout_weight = "1" />

<ImageView
android: id = "@ id / mobile_signal"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
</ LinearLayout>
</ LinearLayout>

Attached Image


And remove allandroid: background

<Linearlayout
android: orientation = "horizontal"
android: id = "status_bar_contents"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

<com.android.systemui.statusbar.phone.IconMerger
android: id = "@ id / notificationIcons"
android: layout_weight = "1"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent" />

<com.android.systemui.statusbar.policy.Clock
android: id = "@ id / clock"
android: layout_gravity = "center"
android: textColor = "# ffffffff"
android: layout_width = "wrap_content"
android: layout_height = "fill_parent" />

<Linearlayout
android: orientation = "horizontal"
android: layout_weight = "1"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent">

<View
android: visibility = "invisible"
android: layout_width = "0.0dip"
android: layout_height = "fill_parent"
android: layout_weight = "1" />

<ImageView
android: id = "@ id / mobile_signal"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content" />
</ LinearLayout>
</ LinearLayout>

Attached Image


Comparisonandroid: gravityandandroid: layout_gravity
In Android, identified two similar gravitational attribute -android: gravityandandroid: layout_gravity.
The difference between them is as follows:

layout_gravityused container assembly and aligns the element on the screen.
gravityIt uses presentation and engaged in alignment within the element
Thus, you can set at the buttonlayout_gravityan equal right, andgravityequal to the center and get a button located on the right edge and the text in the center.
Attached Image



Some more examples


<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
android: orientation = "vertical"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">
<Button
android: gravity = "center"
android: layout_gravity = "right"
android: layout_height = "50dp"
android: layout_width = "100dp"
android: text = "Button" />
</ LinearLayout>

Attached Image

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android"
android: orientation = "vertical"
android: padding = "3dp"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">
<LinearLayout android: orientation = "vertical"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: layout_gravity = "right"
android: layout_weight = "1.0">
<TextView android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: text = "Attribute LinearLayout android: layout_gravity =В« right В»" />
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
</ LinearLayout>
<LinearLayout android: orientation = "vertical"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: gravity = "right"
android: layout_weight = "1.0">
<TextView android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: text = "Attribute LinearLayout android: gravity =В« right В»" />
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
<Button android: layout_width = "200dp"
android: layout_height = "wrap_content"
android: text = "Text content"
/>
</ LinearLayout>
</ LinearLayout>

As you can see from the picture attribute layout_gravity in LinearLayout container did not affect the alignment of the elements, and the gravity attribute align all sub-elements to the right.
Attached Image


Attributeandroid: layout_margin
This attribute allows you to specify an external padding on all sides


layout_margin -External padding on all sides
layout_marginTop -External top margin
layout_marginBottom -External bottom margin
layout_marginLeft -External left indent
layout_marginRight -External indent right

Attributeandroid: padding
Attributepaddingvery similar to layout_margin, with the only exception that the margins had not external, but internal.
For example, if we have the key and we want more space between the text and the border of the button, then use the padding attribute.


padding -Internal padding on all sides
paddingTop -Internal top margin
paddingBottom -Internal bottom margin
paddingLeft -Internal left indent
paddingRight -Internal indent right

Attributeandroid: layout_alignParentBottom;android: layout_aboveother
In RelativeLayout child elements are arranged so that when the first member is disposed on the center of the screen, the other elements are aligned relative to the first element to be aligned with the center of the screen. With this arrangement, when declaring a markup in XML-file, the element that will be referenced to position the other presenting the objects must be declared before the other elements that refer to it by its ID.

Important attributes that are associated with the parent.

  • android: layout_alignParentBottom- alignment relative to the lower edge of the parent
  • android: layout_alignParentLeft- alignment relative to the left edge of the parent
  • android: layout_alignParentRight- alignment relative to the right edge of the parent
  • android: layout_alignParentTop- alignment relative to the top edge of the parent
  • android: layout_centerInParent- centered parents vertically and horizontally
  • android: layout_centerHorizontal- alignment of the parent center horizontally
  • android: layout_centerVertical- alignment of the parent center vertically



Some attributes can be used together to achieve the desired effect, for example, place the component in the upper right corner.



Attached Image



The component can be placed not only in relation to the parent, but also relative to other components. To do this, all components must have its identifier by which they can be distinguished from each other. In this case, you can use other attributes. Ie is the id attribute value of another element.

  • android: layout_above- is placed above said component
  • android: layout_below- placed under the said component
  • android: layout_alignLeft- is aligned to the left edge of the specified component
  • android: layout_alignRight- is aligned to the right edge of said component
  • android: layout_alignTop- is aligned to the top edge of the said component
  • android: layout_alignBottom- is aligned with the lower edge of said component
  • android: layout_toLeftOf- the right edge of the component is located on the left of the said component
  • android: layout_toRightOf- left edge component is located to the right of the said component

Attached Image


The components "did not stick" to each other, using the known attributes, adding the space between them.

  • android: layout_marginTop
  • android: layout_marginBottom
  • android: layout_marginLeft
  • android: layout_marginRight



Textview

Post has been editedmadgit - 10.10.18, 18:17
Reason for editing: TextView



Rep: (4735)
A small addition toFull date display in the curtain of Android 4.2+ notifications

Instruction
For android4.4 + kitkat.
We are doing everything as well as to the instructions, but we seek tostrings.xmlline:
<string name = "system_ui_date_pattern">@android: string / system_ui_date_pattern</ string>

and change to:
<string name = "system_ui_date_pattern">EEEE \ nd MMMM yyyy</ string>

Result
Attached Image



Small correction to the post additionsAddition to the other links on the site as a point in the settings


Instruction
In connection to this line(Marked in red)I had to change the string, as displayed phone model:
<PreferenceScreen android: title = "@ string / drt" android: key = "device_model"Android: summary =" @ string / modification_by_drt ">
<intent android: action = "android.intent.action.VIEW" android: data = "Pomidor666" />
</ PreferenceScreen>

Highlightedredchange to
modification_by_drt

Result
Attached Image


Post has been editedDimar - 09.10.15, 22:52
Reason for editing: *



Rep: (145)
Digital network level in the status bar
(orderRazziell, CC 4.4)


Description
The idea is taken fromNetwork level in asu, in the status bar.
The component supports two SIM cards on MTK chip, including regular colors simok on QC.
We work with one file that contains the status bar, SystemUI.apk.

Whom little screenshot to download for the testAttached fileapp-unitest-debug-BBBB.apk(32.68 Kb)
There are no settings, just by the fact of conclusion SIM0,1. Yuzalsya for running. There are output to the log.

Story
Version of the BBB:
+ Added flight mode tracking (data hiding)
* Minor optimization
Version A (old):
Attached fileapp-unitest-debug.apk(31.92 KB)
Attached fileunisignal_smali.7z(7.83 KB)
Screenshots
Attached Image
Attached Image
0. Setting component
Component itself looks like this:
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "9.0dip" android: textstyle = "italic" android: textColor = "# ffffffff"
android: layout_gravity = "center" android: tag = "0001"
android: layout_width = "wrap_content" android: layout_height = "wrap_content" />

Its settings are written to the tag, they are as follows:
// CHANGE NUMBERS tag on the dates in order
// in the example above should default KFOR + dBm without a description + crit color

mSimSlot - 1 digit, used the platform and number of SIM cards
0 - default android SDK (only first one sim)
1 - MTK SIM0
2 - MTK SIM1

mShowType - figure 2, a value type signal
0 - dbm
1 - ASU - is a system of ACS. Stable.
2 - ASU (from dBm) - this figure more vibrant than 1 and is calculated by taking the parameter 0 dBm.
3 -% dbm
4 -% for ASU
5 -% for ASU (from dBm) - the same as for 3 parameter.

mShowDescr - 3 digit display text or not
0 - no
1 - show

mColorType - 4 digit LED color
0 - default white (to be taken from the component not tested)
1 - on the threshold of the red
2 - default color Sims MTK
3 - including the threshold of red


Threshold red sewn into the code. It lights if dBm<-95, ASU> 9, % < 30.
If you want to disable the component, just add any digit at the end of the tag. Since the length of it and checked = 4.
Or add a checkbox in the settings to turn off (Settings spoiler). No other settings, other rights in the smal, if necessary.
1. Work with SystemUI.apk
1. Parse SystemUI.apk.
2. Download the archiveAttached fileunisignal_smali_b.7z(8.52 KB)
3. From the list in the File Transfer smali new files to the appropriate location disassembled SystemUI.

4. To insert the component itself, as an option, suitable markings with one column 2 signal (1 choose any):
Here linear markings
<Linearlayout
android: layout_gravity = "center"
android: orientation = "vertical"
android: layout_width = "21.0dip"
android: layout_height = "wrap_content">

<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center" android: layout_gravity = "top | center" android: tag = "0101" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "9.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center" android: layout_gravity = "bottom | center" android: tag = "0001" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />

</ LinearLayout>
Here Frame-type
<FrameLayout
android: layout_width = "wrap_content"
android: layout_height = "match_parent"
android: layout_marginStart = "2.0dip">

<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "1403" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "top "android: layout_marginTop =" - 1dp "/>
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "1103" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "bottom "android: layout_marginBottom =" - 1dp "/>

</ Framelifeout>

5. Next it is necessary to look for where there is a status bar where to insert this markup. On different models in different ways:
- Go to the marking "SystemUI \ res \ layout \"
- Open the filegemini_signal_cluster_view.xml(Like for 2uh simnikov)
- If it's not, openstatus_bar.xmland look for the inscriptionsignal_cluster,..
Someone, it looks like this, the transition to another layaut
<include android: id = "@ id / signal_cluster_brcm"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
layout = "@ layout /signal_cluster_view_brcm " />

6. Go back and pick up location for the component and save.
Helping to insert in status
To avoid the pains of childbirth, can nakopirovat text in the status of different figures, and then replace it.
<TextView android: textSize = "10.0dip" android: textColor = "# ffffffff" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: text = "11" />
Attached Image
Option 1.signal_cluster_view_brcm.xml
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.SignalClusterView_brcm android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "wrap_content" xmlns: android = " http://schemas.android.com/apk/res/android ">

<FrameLayout android: id = "@ id / wifi_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "1.0dip">
<ImageView android: layout_gravity = "center" android: id = "@ id / wifi_signal" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: scaleType = "center" />
<ImageView android: layout_gravity = "bottom | center" android: id = "@ id / wifi_inout" android: layout_width = "wrap_content" android: layout_height = "wrap_content" /></ Framelifeout>
<View android: id = "@ id / spacer" android: visibility = "gone" android: layout_width = "3.0dip" android: layout_height = "6.0dip" />
<LinearLayout android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<View android: visibility = "gone" android: layout_width = "15.0dip" android: layout_height = "6.0dip" />
<FrameLayout android: id = "@ id / mobile_sim" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "2.0dip">
<ImageView android: id = "@ id / mobile_sim_absent" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<FrameLayout android: id = "@ id / mobile_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "2.0dip">
<ImageView android: id = "@ id / mobile_type" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "bottom" android: id = "@ id / mobile_inout" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<ImageView android: id = "@ id / mobile_signal" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "1.0dip" />

<Linearlayout
android: layout_gravity = "center"
android: orientation = "vertical"
android: layout_width = "21.0dip"
android: layout_height = "wrap_content">

<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center"
android: layout_gravity = "top | center" android: tag = "0101" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "9.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center"
android: layout_gravity = "bottom | center" android: tag = "0001" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />
</ LinearLayout>


<View android: id = "@ id /sim_spacer "Android: visibility =" invisible "android: layout_width =" 3.0dip "android: layout_height =" 6.0dip "/>

<FrameLayout android: id = "@ id / mobile_sim2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "2.0dip"><ImageView android: id = "@ id / mobile_sim_absent2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<FrameLayout android: id = "@ id / mobile_combo2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "2.0dip">
<ImageView android: id = "@ id / mobile_type2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "bottom | right | center" android: id = "@ id / mobile_inout2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<ImageView android: id = "@ id / mobile_signal2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginRight = "1.0dip" />
</ LinearLayout>
</com.android.systemui.statusbar.SignalClusterView_brcm>
Option 2. Here instatus_bar.xml
<LinearLayout android: orientation = "horizontal" android: id = "@ id / status_bar_contents" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: paddingStart = "6.0dip" android: paddingEnd = "6.0dip">
<View android: id = "@ id / center_spacer" android: visibility = "gone" android: layout_width = "1.0dip" android: layout_height = "fill_parent" />
<LinearLayout android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / statusIcons" android: layout_width = "wrap_content" android: layout_height = "fill_parent" />
<LinearLayout android: orientation = "horizontal" android: id = "@ id / notification_icon_area" android: layout_width = "0.0dip" android: layout_height = "fill_parent" android: layout_weight = "1.0">
<com.android.systemui.statusbar.StatusBarIconView android: id = "@ id / moreIcon" android: visibility = "gone" android: layout_width = "@ dimen / status_bar_icon_size" android: layout_height = "fill_parent" android: src = "@ drawable / stat_notify_more "/>
<com.android.systemui.statusbar.phone.IconMerger android: gravity = "center_vertical" android: orientation = "horizontal" android: id = "@ id / notificationIcons" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android : layout_alignParentStart = "true" />
</ LinearLayout>
<LinearLayout android: orientation = "horizontal" android: id = "@ id / system_icon_area" android: layout_width = "wrap_content" android: layout_height = "fill_parent">
<com.android.systemui.statusbar.policy.NetworkTraffic android: gravity = "right | center" android: id = "@ id / networkTraffic" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: singleLine = "false "/>
<LinearLayout android: gravity = "center" android: orientation = "horizontal" android: id = "@ id / signal_battery_cluster" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: paddingStart = "2.0dip">
<include android: id = "@ id / signal_cluster" android: layout_width = "wrap_content" android: layout_height = "wrap_content" layout = "@ layout / signal_cluster_view" />

<LinearLayout android: layout_gravity = "center" android: orientation = "vertical" android: layout_width = "21.0dip" android: layout_height = "wrap_content">
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center" android: layout_gravity = "top | center" android: tag = "0101" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "9.0dip" android: textstyle = "italic" android: textColor = "# ffffffff" android: gravity = "center" android: layout_gravity = "bottom | center" android: tag = "0001" android: layout_width = "20.0dip" android: layout_height = "wrap_content" />
</ LinearLayout>


<com.android.systemui.BatteryPercentMeterView android: textAppearance = "@ style / TextAppearance.StatusBar.PercentBattery" android: gravity = "center_vertical" android: id = "@ id / percent_battery" android: paddingLeft = "1.0dip" android: layout_width = "wrap_content" android: layout_height = "fill_parent" android: singleLine = "true" systemui: batteryView = "statusbar" />
<com.android.systemui.BatteryMeterView android: id = "@ id / battery" android: layout_width = "10.5dip" android: layout_height = "16.0dip" android: layout_marginBottom = "0.33000004dip" android: layout_marginStart = "1.0dip" systemui : batteryView = "statusbar" />
<com.android.systemui.BatteryCircleMeterView android: textAppearance = "@ style / TextAppearance.StatusBar.Battery" android: gravity = "bottom" android: id = "@ id / circle_battery" android: paddingLeft = "1.0dip" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: singleLine = "true" systemui: batteryView = "statusbar" />
</ LinearLayout>
<com.android.systemui.statusbar.policy.Clock android: textAppearance = "@ style / TextAppearance.StatusBar.Clock" android: gravity = "start | center" android: id = "@ id / clock" android: layout_width = "wrap_content "android: layout_height =" fill_parent "android: singleLine =" true "android: paddingStart =" 6.0dip "/>
</ LinearLayout>
</ LinearLayout>
Option 3.gemini_signal_cluster_view.xml
<? xml version = "1.0" encoding = "utf-8"?>
<com.android.systemui.statusbar.SignalClusterView android: orientation = "horizontal" android: layout_width = "wrap_content" android: layout_height = "wrap_content"
xmlns: android = "http://schemas.android.com/apk/res/android">
<FrameLayout android: id = "@ id / wifi_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginEnd = "- 6.0dip">
<ImageView android: id = "@ id / wifi_signal" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: scaleType = "center" android: layout_centerVertical = "true" android: layout_alignParentEnd = "true" />
<ImageView android: layout_gravity = "bottom | center" android: id = "@ id / wifi_inout" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<View android: id = "@ id / spacer" android: visibility = "gone" android: layout_width = "8.0dip" android: layout_height = "8.0dip" />
<ImageView android: id = "@ id / sim_indicator_internet_or_alwaysask" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginEnd = "3.0dip" />
<com.mediatek.systemui.statusbar.util.CsgIconView android: id = "@ id / csg_icon" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<FrameLayout android: id = "@ id / data_conn_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / data_type" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / data_inout" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<FrameLayout android: id = "@ id / data_conn_combo_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / data_type_2" android: tag = "data_type_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / data_inout_2" android: tag = "data_inout_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<FrameLayout android: id = "@ id / data_conn_combo_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / data_type_3" android: tag = "data_type_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / data_inout_3" android: tag = "data_inout_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<FrameLayout android: id = "@ id / data_conn_combo_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / data_type_4" android: tag = "data_type_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / data_inout_4" android: tag = "data_inout_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
</ Framelifeout>
<ImageView android: layout_gravity = "center_vertical" android: id = "@ id / offline" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / stat_sys_gemini_radio_off" />

<LinearLayout android: id = "@ id / signal_cluster_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / network_type" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<FrameLayout android: id = "@ id / mobile_combo" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / mobile_signal" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_signal2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_type" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_roaming" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "end | bottom | center" android: id = "@ id / mobile_inout" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_slot_indicator" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginStart = "1.0dip" />
</ Framelifeout>

<FrameLayout
android: layout_width = "wrap_content"
android: layout_height = "match_parent"
android: layout_marginStart = "2.0dip">
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "1403" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "top "android: layout_marginTop =" - 1dp "/>
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "1103" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "bottom "android: layout_marginBottom =" - 1dp "/>
</ Framelifeout>


</ LinearLayout>
<View android: id = "@ id / spacer_2" android: tag = "spacer_2" android: visibility = "gone" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<View android: visibility = "invisible" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<ImageView android: layout_gravity = "center_vertical" android: id = "@ id / offline_2" android: tag = "offline_2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / stat_sys_gemini_radio_off" />

<LinearLayout android: id = "@ id / signal_cluster_combo_2" android: tag = "signal_cluster_combo_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / network_type_2" android: tag = "network_type_2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<FrameLayout android: id = "@ id / mobile_combo_2" android: tag = "mobile_combo_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / mobile_signal_2" android: tag = "mobile_signal_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_signal2_2" android: tag = "mobile_signal2_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_type_2" android: tag = "mobile_type_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_roaming_2" android: tag = "mobile_roaming_2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "end | bottom | center" android: id = "@ id / mobile_inout_2" android: tag = "mobile_inout_2" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_slot_indicator_2" android: tag = "mobile_slot_indicator_2" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginStart = "1.0dip" />
</ Framelifeout>

<FrameLayout
android: layout_width = "wrap_content"
android: layout_height = "match_parent"
android: layout_marginStart = "2.0dip">
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "2403" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "top "android: layout_marginTop =" - 1dp "/>
<ru.nialon.EditTextSignalUni.SignalUni android: textSize = "8.0dip" android: textColor = "# ffffffff" android: tag = "2103" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_gravity = "bottom "android: layout_marginBottom =" - 1dp "/>
</ Framelifeout>


</ LinearLayout>
<View android: id = "@ id / spacer_3" android: tag = "spacer_3" android: visibility = "gone" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<View android: visibility = "invisible" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<ImageView android: layout_gravity = "center_vertical" android: id = "@ id / offline_3" android: tag = "offline_3" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / stat_sys_gemini_radio_off" />
<LinearLayout android: id = "@ id / signal_cluster_combo_3" android: tag = "signal_cluster_combo_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / network_type_3" android: tag = "network_type_3" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<FrameLayout android: id = "@ id / mobile_combo_3" android: tag = "mobile_combo_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / mobile_signal_3" android: tag = "mobile_signal_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_signal2_3" android: tag = "mobile_signal2_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_type_3" android: tag = "mobile_type_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_roaming_3" android: tag = "mobile_roaming_3" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "end | bottom | center" android: id = "@ id / mobile_inout_3" android: tag = "mobile_inout_3" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_slot_indicator_3" android: tag = "mobile_slot_indicator_3" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginStart = "1.0dip" />
</ Framelifeout>
</ LinearLayout>
<View android: id = "@ id / spacer_4" android: tag = "spacer_4" android: visibility = "gone" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<View android: visibility = "invisible" android: layout_width = "1.0dip" android: layout_height = "1.0dip" />
<ImageView android: layout_gravity = "center_vertical" android: id = "@ id / offline_4" android: tag = "offline_4" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / stat_sys_gemini_radio_off" />
<LinearLayout android: id = "@ id / signal_cluster_combo_4" android: tag = "signal_cluster_combo_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / network_type_4" android: tag = "network_type_4" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<FrameLayout android: id = "@ id / mobile_combo_4" android: tag = "mobile_combo_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content">
<ImageView android: id = "@ id / mobile_signal_4" android: tag = "mobile_signal_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_signal2_4" android: tag = "mobile_signal2_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_type_4" android: tag = "mobile_type_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_roaming_4" android: tag = "mobile_roaming_4" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: layout_gravity = "end | bottom | center" android: id = "@ id / mobile_inout_4" android: tag = "mobile_inout_4" android: layout_width = "wrap_content" android: layout_height = "wrap_content" />
<ImageView android: id = "@ id / mobile_slot_indicator_4" android: tag = "mobile_slot_indicator_4" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginStart = "1.0dip" />
</ Framelifeout>
</ LinearLayout>
<ImageView android: id = "@ id / airplane" android: visibility = "gone" android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: src = "@ drawable / stat_sys_flight_mode" android: paddingStart = "4.0dip" />
</com.android.systemui.statusbar.SignalClusterView>


7. Putting it all back te compile folder SystemUI.
2. Operation Settings.apk (total addition vyklyuchalki)
1. Parse Settings.apk.
2. Download the archiveAttached filesettings_unibutton.7z(1 KB)
3. From the File Transfer files to the appropriate locations disassembled Settings.
4. Open "/res/xml/display_settings.xml"And add the component at any place settings:
<ru.nialon.EditTextSignalUni.Settings.CheckBoxCustom
android: title = "Show SignalUni in statusbar"
android: key = "adi_signaluni_show"
android: defaultValue = "true" />

Addition


Post has been editedNialon - 02.08.16, 21:18
Reason for editing: New version ..



Rep: (188)
Maximum volume in the pocket and increasing call
Android 4.2.2
1) at the beginning of the filePhone.apk / smali / com / android / phone / Ringer.smalito add annotation
Lcom / android / phone / Ringer $ 2 ;,
Lcom / android / phone / Ringer $ PocketModeListener ;,
Lcom / android / phone / Ringer $ IncreaserThread ;,
2) there is before
# direct methods
.method static constructor<clinit>() V
add
.field private mAudioManager: Landroid / media / AudioManager;
.field private mIncreaserSleep: I
.field private mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;
.field private mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;
.field private mPocketVolume: I
.field private mSensor: Landroid / hardware / Sensor;
.field private mSensorManager: Landroid / hardware / SensorManager;
.field private mStreamVolume: I
3) there is at the end of the method.method static constructor<clinit>() Vadd
iget-object v1, p0, Lcom / android / phone / Ringer; ->mContext: Landroid / content / Context;
const-string v2, "audio"
invoke-virtual {v1, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / media / AudioManager;
iput-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;
const v1,0x0
const-string v0, "increasering"
invoke-static {v0, v1}, Landroid / os / SystemProperties; ->getInt (Ljava / lang / String; I) I
move-result v0
iput v0, p0, Lcom / android / phone / Ringer; ->mIncreaserSleep: I
iget-object v1, p0, Lcom / android / phone / Ringer; ->mContext: Landroid / content / Context;
const-string v2, "sensor"
invoke-virtual {v1, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / hardware / SensorManager;
iput-object v0, p0, Lcom / android / phone / Ringer; ->mSensorManager: Landroid / hardware / SensorManager;
const v1,0x0
const-string v0, "pocketvolume"
invoke-static {v0, v1}, Landroid / os / SystemProperties; ->getInt (Ljava / lang / String; I) I
move-result v0
iput v0, p0, Lcom / android / phone / Ringer; ->mPocketVolume: I
const v0, 0x0
iput-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;
iput-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;
iget-object v0, p0, Lcom / android / phone / Ringer; ->mSensorManager: Landroid / hardware / SensorManager;
const / 16 v1, 0x8
invoke-virtual {v0, v1}, Landroid / hardware / SensorManager; ->getDefaultSensor (I) Landroid / hardware / Sensor;
move-result-object v0
iput-object v0, p0, Lcom / android / phone / Ringer; ->mSensor: Landroid / hardware / Sensor;
4) there is a method.method ring () Vto replace
iget-object v1, p0, Lcom / android / phone / Ringer; ->mContext: Landroid / content / Context;
const-string v2, "audio"
invoke-virtual {v1, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / media / AudioManager;
on
iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;
5) in the same method before
invoke-direct {p0}, Lcom / android / phone / Ringer; ->makeLooper () V
to insert
invoke-direct {p0}, Lcom / android / phone / Ringer; ->startAll () V
6) in the same file to replace
.method shouldVibrate () Z
.locals 3
iget-object v1, p0, Lcom / android / phone / Ringer; ->mContext: Landroid / content / Context;
const-string v2, "audio"
invoke-virtual {v1, v2}, Landroid / content / Context; ->getSystemService (Ljava / lang / String;) Ljava / lang / Object;
move-result-object v0
check-cast v0, Landroid / media / AudioManager;
on
.method shouldVibrate () Z
.locals 2
iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;
7) in the same file in the method.method stopRing () Vbefore
iget-object v1, p0, Lcom / android / phone / Ringer; ->mVibratorThread: Lcom / android / phone / Ringer $ VibratorThread;
if-eqz v1,: cond_3
const-string v1, "- stopRing: cleaning up vibrator thread ..."
add
invoke-direct {p0}, Lcom / android / phone / Ringer; ->stopAll () V
8) below in the same method after
const / 4 v1,0x0
iput-object v1, p0, Lcom / android / phone / Ringer; ->mVibratorThread: Lcom / android / phone / Ringer $ VibratorThread;
add
goto: cond_3
9) at the end of file add
.method static synthetic access $ 000 (Lcom / android / phone / Ringer;) I
.locals 1
.param p0 # Lcom / android / phone / Ringer;

iget v0, p0, Lcom / android / phone / Ringer; ->mStreamVolume: I

return v0
.end method

.method static synthetic access $ 100 (Lcom / android / phone / Ringer;) Landroid / media / AudioManager;
.locals 1
.param p0 # Lcom / android / phone / Ringer;

iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;

return object v0
.end method

.method static synthetic access $ 210 (Lcom / android / phone / Ringer;) I
.locals 1
.param p0 # Lcom / android / phone / Ringer;

iget v0, p0, Lcom / android / phone / Ringer; ->mIncreaserSleep: I

return v0
.end method

.method static synthetic access $ 310 (Lcom / android / phone / Ringer;) V
.locals 0
.param p0 # Lcom / android / phone / Ringer;

invoke-direct {p0}, Lcom / android / phone / Ringer; ->stopPocketMode () V

return-void
.end method

.method static synthetic access $ 400 (Lcom / android / phone / Ringer;) V
.locals 0
.param p0 # Lcom / android / phone / Ringer;

invoke-direct {p0}, Lcom / android / phone / Ringer; ->startIncreaserThread () V

return-void
.end method

.method static synthetic access $ 500 (Lcom / android / phone / Ringer;) I
.locals 1
.param p0 # Lcom / android / phone / Ringer;

iget v0, p0, Lcom / android / phone / Ringer; ->mPocketVolume: I

return v0
.end method

.method private restoreStreamVolume () V
.locals 3

const / 4 v2, 0x2

iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;

iget v1, p0, Lcom / android / phone / Ringer; ->mStreamVolume: I

invoke-virtual {v0, v2, v1, v2}, Landroid / media / AudioManager; ->setStreamVolume (III) V

const-string v0, "PocketIncrease"

new-instance v1, Ljava / lang / StringBuilder;

invoke-direct {v1}, Ljava / lang / StringBuilder; -><init>() V

const-string v2, "restoreStreamVolume mStreamVolume ="

invoke-virtual {v1, v2}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v1

iget v2, p0, Lcom / android / phone / Ringer; ->mStreamVolume: I

invoke-virtual {v1, v2}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v1

invoke-virtual {v1}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v1

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

return-void
.end method

.method private saveStreamVolume () V
.locals 3

iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;

const / 4 v1,0x2

invoke-virtual {v0, v1}, Landroid / media / AudioManager; ->getStreamVolume (I) I

move-result v0

iput v0, p0, Lcom / android / phone / Ringer; ->mStreamVolume: I

const-string v0, "PocketIncrease"

new-instance v1, Ljava / lang / StringBuilder;

invoke-direct {v1}, Ljava / lang / StringBuilder; -><init>() V

const-string v2, "saveStreamVolume mStreamVolume ="

invoke-virtual {v1, v2}, Ljava / lang / StringBuilder; ->append (Ljava / lang / String;) Ljava / lang / StringBuilder;

move-result-object v1

iget v2, p0, Lcom / android / phone / Ringer; ->mStreamVolume: I

invoke-virtual {v1, v2}, Ljava / lang / StringBuilder; ->append (I) Ljava / lang / StringBuilder;

move-result-object v1

invoke-virtual {v1}, Ljava / lang / StringBuilder; ->toString () Ljava / lang / String;

move-result-object v1

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

return-void
.end method

.method private startAll () V
.locals 2

const-string v0, "PocketIncrease"

const-string v1, "startAll"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

invoke-direct {p0}, Lcom / android / phone / Ringer; ->startPocketMode () V

invoke-direct {p0}, Lcom / android / phone / Ringer; ->startIncreaserThread () V

return-void
.end method

.method private startIncreaserThread () V
.locals 2

iget v0, p0, Lcom / android / phone / Ringer; ->mIncreaserSleep: I

if-lez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

if-nez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

if-nez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;

const / 4 v1,0x2

invoke-virtual {v0, v1}, Landroid / media / AudioManager; ->getStreamVolume (I) I

move-result v0

const / 4 v1, 0x1

if-le v0, v1,: cond_0

const-string v0, "PocketIncrease"

const-string v1, "startIncreaserThread"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

invoke-direct {p0}, Lcom / android / phone / Ringer; ->saveStreamVolume () V

new-instance v0, Lcom / android / phone / Ringer $ IncreaserThread;

const / 4 v1,0x0

invoke-direct {v0, p0, v1}, Lcom / android / phone / Ringer $ IncreaserThread; -><init>(Lcom / android / phone / Ringer; Lcom / android / phone / Ringer $ 2;) V

iput-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

iget-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

invoke-virtual {v0}, Lcom / android / phone / Ringer $ IncreaserThread; ->start () V

: cond_0
return-void
.end method

.method private startPocketMode () V
.locals 4

iget v0, p0, Lcom / android / phone / Ringer; ->mPocketVolume: I

if-lez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

if-nez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

if-nez v0,: cond_0

iget-object v0, p0, Lcom / android / phone / Ringer; ->mAudioManager: Landroid / media / AudioManager;

const / 4 v1,0x2

invoke-virtual {v0, v1}, Landroid / media / AudioManager; ->getStreamVolume (I) I

move-result v0

if-lez v0,: cond_0

const-string v0, "PocketIncrease"

const-string v1, "startPocketMode"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

invoke-direct {p0}, Lcom / android / phone / Ringer; ->saveStreamVolume () V

new-instance v0, Lcom / android / phone / Ringer $ PocketModeListener;

const / 4 v1,0x0

invoke-direct {v0, p0, v1}, Lcom / android / phone / Ringer $ PocketModeListener; -><init>(Lcom / android / phone / Ringer; Lcom / android / phone / Ringer $ 2;) V

iput-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

iget-object v0, p0, Lcom / android / phone / Ringer; ->mSensorManager: Landroid / hardware / SensorManager;

iget-object v1, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

iget-object v2, p0, Lcom / android / phone / Ringer; ->mSensor: Landroid / hardware / Sensor;

const / 4 v3, 0x3

invoke-virtual {v0, v1, v2, v3}, Landroid / hardware / SensorManager; ->registerListener (Landroid / hardware / SensorEventListener; Landroid / hardware / Sensor; I) Z

: cond_0
return-void
.end method

.method private stopAll () V
.locals 2

const-string v0, "PocketIncrease"

const-string v1, "stopAll"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

invoke-direct {p0}, Lcom / android / phone / Ringer; ->stopPocketMode () V

invoke-direct {p0}, Lcom / android / phone / Ringer; ->stopIncreaserThread () V

return-void
.end method

.method private stopIncreaserThread () V
.locals 2

iget-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

if-eqz v0,: cond_0

const-string v0, "PocketIncrease"

const-string v1, "stopIncreaserThread"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

iget-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

invoke-virtual {v0}, Lcom / android / phone / Ringer $ IncreaserThread; ->stopt () V

const / 4 v0, 0x0

iput-object v0, p0, Lcom / android / phone / Ringer; ->mIncreaserThread: Lcom / android / phone / Ringer $ IncreaserThread;

invoke-direct {p0}, Lcom / android / phone / Ringer; ->restoreStreamVolume () V

: cond_0
return-void
.end method

.method private stopPocketMode () V
.locals 3

iget-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

if-eqz v0,: cond_0

const-string v0, "PocketIncrease"

const-string v1, "stopPocketMode"

invoke-static {v0, v1}, Landroid / util / Log; ->d (Ljava / lang / String; Ljava / lang / String;) I

iget-object v0, p0, Lcom / android / phone / Ringer; ->mSensorManager: Landroid / hardware / SensorManager;

iget-object v1, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

iget-object v2, p0, Lcom / android / phone / Ringer; ->mSensor: Landroid / hardware / Sensor;

invoke-virtual {v0, v1, v2}, Landroid / hardware / SensorManager; ->unregisterListener (Landroid / hardware / SensorEventListener; Landroid / hardware / Sensor;) V

const / 4 v0, 0x0

iput-object v0, p0, Lcom / android / phone / Ringer; ->mPocketModeListener: Lcom / android / phone / Ringer $ PocketModeListener;

invoke-direct {p0}, Lcom / android / phone / Ringer; ->restoreStreamVolume () V

: cond_0
return-void
.end method
10) put next to that file attachmentsAttached fileRinger.zip(2.27 KB)
11) is used to configure build.prop:
the volume of the pocket becomes pocketvolume (or becomes at 0)
call buildup occurs every increasering milliseconds (or does not occur at 0)


Post has been editedDimar - 09.10.15, 23:02
Reason for editing: *



Rep: (320)
Combining instruction "Adding" firmware Author "in the" About phone "" and Link to the site as an item in the settings
Description
1. InSettings \ smali \ com \ android \ settings \ DeviceInfoSettings.smali
we find
const-string v11, "custom_build_version"

const-string v12, "ro.custom.build.version"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

Add below
.line 174
const-string v11, "author_firmware"

const-string v12, "ro.custom.author.firmware"

invoke-direct {p0, v11, v12}, Lcom / android / settings / DeviceInfoSettings; ->setValueSummary (Ljava / lang / String; Ljava / lang / String;) V

2. InSettings \ res \ values ​​\ strings.xmlbefore</ resources>prescribe
<string name = "drt">author firmware</ string>

And for the Russian language in the values-ru
<string name = "drt">Firmware author</ string>

3. InSettings \ res \ xml \ device_info_settings.xml
add
<PreferenceScreen android: title = "@ string / drt" android: key = "author_firmware" android: summary = "Valentin95400">
<intent android: action = "android.intent.action.VIEW" android: data = "http://vk.com/valentin95400" />
</ PreferenceScreen>

Here
android: summary = "Valentin95400"
and
android: data = "http://vk.com/valentin95400"
change its
4.Bbuild.propwrite
ro.custom.author.firmware = Valentin95400

And Valentin95400 change to the same changes you sign in summarioy

Screenshots
Attached Image
Attached Image


Post has been editedDimar - 09.10.15, 23:06
Reason for editing: *



Rep: (213)
Supplement toAdd your settings item to the main settings menu


Android 5.0

Instruction
Go to Settings / res / xml / dashboard_categories.xml

and instead of the code:
<header android: icon = "@ drawable / ic_my_settings" android: id = "@ id / my_settings" android: title = "@ string / my_settings_title">
<intent android: targetPackage = "aaa.grisha84.uniprefs" android: action = "android.intent.action.MAIN" android: targetClass = "aaa.grisha84.uniprefs.Main" />
</ header>


insert this:
<dashboard-tile android: icon = "@ drawable / ic_my_settings" android: id = "@ id / my_settings" android: title = "@ string / my_settings_title">
<intent android: targetPackage = "aaa.grisha84.uniprefs" android: action = "android.intent.action.MAIN" android: targetClass = "aaa.grisha84.uniprefs.Main" />
</ dashboard-tile>


Further according to the instructionsFor instructions on editing the system resources (Post grisha84 # 30774975)


You can even add a category.
Attached Image


Go to Settings / res / xml / dashboard_categories.xml
and paste this code where you want:
<dashboard-category android: id = "@ id / my_setting_section" android: title = "@ string / my_setting">
</ Dashboard-category>

Then go to Settings \ res \ values ​​\ ids.xml and paste the code:
<item type = "id" name = "my_setting_section">false</ item>

Go to the Settings \ res \ values ​​\ strings.xml and add:
<string name = "my_setting">my setting</ string>

The values-ru
<string name = "my_setting">My settings</ string>


Post has been editedDimar - 12.11.15, 19:19
Reason for editing: Template



Rep: (468)
Blur effect

In Example curtain (panel quick settings)
Description
Taken from the firmware from Acer
The method slightly modified, because if you change the image blur of the main screen is the previous background and will only take effect after a reboot. (Can someone finalize)
And you can add it to any application as far as I understand

Screenshot
Attached Image


Instruction
Downloading the application fileAttached filesmali.zip(5.65 kb)

Add to ids.xml line
<item type = "id" name = "backgroundImageView">false</ item>

Dalle in gemini_status_bar_expanded
after
xmlns: systemui = "http://schemas.android.com/apk/res/com.android.systemui">

add
<com.acer.incallui.BlurImageView android: id = "@ id / backgroundImageView" android: layout_width = "fill_parent" android: layout_height = "fill_parent" android: scaleType = "centerCrop" />

and there is the same remove background
android: background = "@ drawable / notification_panel_bg"
that's all. Good luck!


Post has been editedDimar - 09.10.15, 23:24
Reason for editing: *



Rep: (468)
Brightness slider in the switch panel

Description
An example of how to add a slider just in the quick settings panel, something he would not hang it in the notification (in the screenshots clearer: blush:)

Screenshots
Attached Image
Attached Image


Instruction
Create a new xml, you can use myAttached fileart_settings.xml(593 bytes)
We call it what you want. And we do this:
<? xml version = "1.0" encoding = "utf-8"?>
<LinearLayout android: layout_gravity = "top" android: orientation = "vertical" android: layout_width = "fill_parent" android: layout_height = "fill_parent"
xmlns: android = "http://schemas.android.com/apk/res/android">
<com.android.systemui.statusbar.phone.QuickSettingsContainerView android: id = "@ id / quick_settings_container" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: animateLayoutChanges = "true" android: columnCount = "@ integer / quick_settings_num_columns "/>### Quick Settings Panel
<include layout = "@ layout / qp_brightness" />### Your brightness slider
</ LinearLayout>

That is, you take any instruction from the brightness of the screen and put in the file,thisorthese

Further change ingemini_status_bar_expanded
android: layout = "@ layout /flip_settings "To your new xml

What would need to add a scroll to gemini_status_bar_expanded register as follows:
<ScrollView android: fadingEdge = "none" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: overScrollMode = "ifContentScrolls">
<ViewStub android: id = "@ id / flip_settings_stub" android: layout = "@ layout / flip_settings" android: layout_width = "fill_parent" android: layout_height = "wrap_content" />
</ ScrollView>


After that, you get the brightness of the switches in one window and notice the other.


Post has been editedDimar - 13.10.15, 18:31
Reason for editing: *



Rep: (356)
and "Settings" "Recent Apps" style Float

Instruction
1.We disassemble Settings.apk
2.Skachivaem Settings unpack the archive with the replacement of
3.Sobiraem
4.We disassemble SystemUI.apk
5.Otkryvaem SystemUI \ res \ values ​​\ styles.xml change the style
<style name = "RecentsStyle" parent = "@ android: style / Theme.Holo.Wallpaper.NoTitleBar">
<item name = "android: windowAnimationStyle">@ Style / Animation.RecentsActivity</ item>
</ style>

on that
<style name = "RecentsStyle" parent = "@ * android: style / Theme.Holo.Light">
<item name = "android: windowAnimationStyle">@ Style / Animation.RecentsActivity</ item>
<item name = "android: windowBackground">@ Drawable / window_bg</ item>
<item name = "android: fitsSystemWindows">true</ item>
<item name = "android: clipToPadding">false</ item>
<item name = "android: actionBarStyle">@ Style / RecentsActionBarStyle</ item>
</ style>

And at the end we add this
<style name = "RecentsActionBarStyle" parent = "@ * android: style / Widget.Holo.ActionBar.Solid">
<item name = "android: icon">@ * android: color / transparent</ item>
<item name = "android: background"># ff009587</ item>
<item name = "android: titleTextStyle">@ style / TextAppearance.Holo.Widget.ActionBar.Title</ item>
</ style>
<style name = "TextAppearance.Holo.Widget.ActionBar.Title" parent = "@ * android: style / TextAppearance.Holo.Medium">
<item name = "android: textSize">17.0sp</ item>
<item name = "android: textStyle">bold</ item>
<item name = "android: textColor">#ffffffff</ item>
</ style>

6.Otkryvaem SystemUI \ res \ layout \ status_bar_no_recent_apps.xml and put this in a 4 line text colorandroid: textColor = "# ff009587"
7.Skachivaem SystemUI archive and unpack the replacement
8.Sobiraem

Screenshots
Attached Image
Attached Image
Attached Image

Attached fileSettings.zip(7.88 KB)

Attached fileSystemUI.zip(7.74 KB)

Addition


Post has been editedDimar - 21.10.15, 22:11
Reason for editing: *



Rep: (219)
addition to FMD Transparent Color

Description
I wanted to add to Smal universal code, which will set the background absolutely any launcher status bar. Because I use a gradient, then the desktop I need to always have a transparent background status whatever launcher bar I did not use. Because prescribe the color # 00000000 each launcher that exists - a chore.

Instruction
Go along the path \ SystemUI \ smali \ com \ fmd \ statusbarcolor \ color.smali.
We find a method
.method private SetColor () V

the first line in the method is:
.locals 5

Produces:
.locals 7

Further search finds any launcher, for example:

launcher

let's find:
invoke-virtual {v1}, Landroid / content / ComponentName; ->getPackageName () Ljava / lang / String;

move-result-object v3

const-string v4, "com.fmd.launcher2"

if-ne v3, v4,: cond_0

replace it with:
invoke-virtual {v1}, Landroid / content / ComponentName; ->getPackageName () Ljava / lang / String;

move-result-object v3

invoke-virtual {v3}, Ljava / lang / String; ->length () I

move-result v5

const / 16 v6, 0x8

if-lt v5, v6,: cond_0

invoke-virtual {v3}, Ljava / lang / String; ->length () I

move-result v6

add-int / lit8 v6, v6, -0x8

invoke-virtual {v3, v6, v5}, Ljava / lang / String; ->substring (II) Ljava / lang / String;

move-result-object v3

const-string v4, "launcher"

if-ne v3, v4,: cond_0

We find the second part of the code relating to:
com.fmd.launcher2

Let's find:
: cond_3
invoke-virtual {v1}, Landroid / content / ComponentName; ->getPackageName () Ljava / lang / String;

move-result-object v3

const-string v4, "com.fmd.launcher2"

invoke-virtual {v3, v4}, Ljava / lang / String; ->equals (Ljava / lang / Object;) Z

move-result v3

if-eqz v3,: cond_4

.line 53
const-string v3, "# 00000000"

invoke-static {v3}, Landroid / graphics / Color; ->parseColor (Ljava / lang / String;) I

move-result v3

invoke-virtual {p0, v3}, Lcom / fmd / statusbarcolor / color; ->setBackgroundColor (I) V

Produces:
: cond_3
invoke-virtual {v1}, Landroid / content / ComponentName; ->getPackageName () Ljava / lang / String;

move-result-object v3

invoke-virtual {v3}, Ljava / lang / String; ->length () I

move-result v5

const / 16 v6, 0x8

if-lt v5, v6,: cond_4 # instead of "cond_4" prescribe what is written below

invoke-virtual {v3}, Ljava / lang / String; ->length () I

move-result v6

add-int / lit8 v6, v6, -0x8

invoke-virtual {v3, v6, v5}, Ljava / lang / String; ->substring (II) Ljava / lang / String;

move-result-object v3

const-string v4, "launcher"

invoke-virtual {v3, v4}, Ljava / lang / String; ->equals (Ljava / lang / Object;) Z

move-result v3

if-eqz v3,: cond_4 #<-here

.line 53
const-string v3, "# 00000000"

invoke-static {v3}, Landroid / graphics / Color; ->parseColor (Ljava / lang / String;) I

move-result v3

invoke-virtual {p0, v3}, Lcom / fmd / statusbarcolor / color; ->setBackgroundColor (I) V

That's all, collect and put into firmware in any way possible.

Result
Transparent background status bar in any launcher)


Post has been editedDimar - 13.10.15, 18:40
Reason for editing: *



Rep: (1876)
Contact photo on the full screen android 5.1.1 for line phones Huawei + inbound name / outgoing in two lines without cutting.
Instruction
1. decompile InCallUI.apk viaBatch ApkTool
Open the res / layout / primary_call_info (use for revisions Notepad ++)
How to make
We are looking for the code (red, you need to change):
<FrameLayout android: id = "@ id / contact_photo" android: layout_width = "720.0dip"android: layout_height ="720.0dip"android: layout_marginTop ="25.0dip"Android: layout_below =" @ id / callStateButton "android: layout_centerHorizontal =" true ">
<ProgressBar android: layout_gravity = "center" android: id = "@ id / progress_large_photo" android: layout_width = "fill_parent" android: layout_height = "fill_parent" style = "@ style / callCardProgressBarStyleLarge" />
<com.android.incallui.TimerPhotoAnimation android: layout_gravity = "center" android: id = "@ id / photo_view" android: visibility = "gone" android: layout_width = "fill_parent" android: layout_height = "fill_parent" />
<ImageView android: layout_gravity = "center" android: id = "@ id / photo" android: layout_width = "720.0dip"android: layout_height ="720.0dip"Android: scaleType =" centerCrop "android: contentDescription =" @ string / contactPhoto "/>
<View android: layout_gravity = "center_horizontal" android: id = "@ id / photoBg" android: layout_width = "0.0dip"android: layout_height ="0.0dip"Android: layout_marginTop =" @ dimen / photobg_top_margin "/>
<TextView android: textAppearance = "android: textAppearanceMedium?" Android: textSize = "15.0dip" android: textColor = "@ color / incall_call_white_text_color" android: gravity = "top" android: layout_gravity = "center | top" android: id = " @ id / elapsedTime "android: visibility =" invisible "android: layout_width =" wrap_content "android: layout_height =" wrap_content "android: layout_marginTop ="-12.0dip"Android: singleLine =" true "android: fontFamily =" chnfzxh "/>
</ Framelifeout>
To the caller information has been at the top, the right of the highlighted in red:
<LinearLayout android: gravity = "center" android: orientation = "horizontal" android: id = "@ id / nameAndDtmfField" android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_marginTop = "@ dimen / name_top_margin" android :layout_alignTop= "@ Id / contact_photo">
Now make the caller's name in two lines without cutting, we are looking for the same, and appends:
<TextView android: textAppearance = "? Android: textAppearanceMedium" android: id = "@ id / name" android: layout_centerInParent = "true" style = "@ style / PrimaryNameAndDtmfField"android: maxWidth = "250.0dip" android: singleLine = "false" />
Below. Change - "wrap_content" on "fill_parent". Otherwise, labels will be cut .
<TextView android: textAppearance = "? Android: textAppearanceMedium" android: textSize = "@ dimen / phone_number_text_size" android: textColor = "@ color / incall_call_banner_text_color" android: id = "@ id / phoneNumber" android: layout_width = "fill_parent"Android: layout_height =" wrap_content "android: layout_marginTop =" @ dimen / phone_number_top_margin "android: singleLine =" true "android: layout_below =" @ id / nameAndDtmfField "android: layout_centerHorizontal =" true "android: fontFamily =" chnfzxh "android : textDirection = "ltr" android: textAlignment = "center" />
<TextView android: textAppearance = "android:? TextAppearanceMedium" android: textSize = "@ dimen / number_location_text_size" android: textColor = "@ color / incall_call_banner_text_color" android: id = "@ id / numberLocation" android: layout_width = "fill_parent"Android: layout_height =" wrap_content "android: layout_marginTop =" @ dimen / number_location_top_margin "android: singleLine =" true "android: layout_below =" @ id / phoneNumber "android: layout_centerHorizontal =" true "android: fontFamily =" chnfzxh "android : textDirection = "ltr" />
<TextView android: textAppearance = "android:? TextAppearanceMedium" android: textSize = "13.0dip" android: textColor = "@ color / incall_call_banner_text_color" android: id = "@ id / label" android: visibility = "gone" android: layout_width = "fill_parent"Android: layout_height =" wrap_content "android: layout_marginTop =" 2.0dip "android: singleLine =" true "android: layout_below =" @ id / phoneNumber "android: layout_centerHorizontal =" true "android: textAllCaps =" true "android: fontFamily = "chnfzxh" />

2. Parse ContactsProvaider.apk
Open \ smali \ com \ android \ providers \ contacts \ PhotoProcessor.smali
Improve the quality of thumbnails.
We are looking for a method
.method static constructor<clinit>() V
.locals 6

new-instance v1, Landroid / graphics / Paint;

invoke-direct {v1}, Landroid / graphics / Paint; -><init>() V

sput-object v1, Lcom / android / providers / contacts / PhotoProcessor; ->WHITE_PAINT: Landroid / graphics / Paint;

sget-object v1, Lcom / android / providers / contacts / PhotoProcessor; ->WHITE_PAINT: Landroid / graphics / Paint;

const / 4 v2, -0x1

invoke-virtual {v1, v2}, Landroid / graphics / Paint; ->setColor (I) V

invoke-static {}, Lcom / android / providers / contacts / util / MemoryUtils; ->getTotalMemorySize () J

move-result-wide v2

const-wide / 32 v4, 0x28000000

cmp-long v1, v2, v4

if-ltz v1,: cond_0

const / 4 v0, 0x1

: goto_0
const-string v1, "contacts.thumbnail_size"

const / 16 v2, 0x15e

invoke-static {v1, v2}, Landroid / os / SystemProperties; ->getInt (Ljava / lang / String; I) I

move-result v1

sput v1, Lcom / android / providers / contacts / PhotoProcessor; ->sMaxThumbnailDim: I

const-string v2, "contacts.display_photo_size"

if-eqz v0,: cond_1

const / 16 v1, 0x500

: goto_1
invoke-static {v2, v1}, Landroid / os / SystemProperties; ->getInt (Ljava / lang / String; I) I

move-result v1

sput v1, Lcom / android / providers / contacts / PhotoProcessor; ->sMaxDisplayPhotoDim: I

return-void

: cond_0
const / 4 v0, 0x0

goto: goto_0

: cond_1
const / 16 v1, 0x2d0

goto: goto_1
.end method

4. Improving miniatury bit depth (the same path: \ smali \ com \ android \ providers \ contacts \ PhotoProcessor.smali)
Looking for in the search: 0x3f800000 and change the highlighted in red
bit depth images
const / high16 v3, 0x7f000000 # 1.0f

move / from16 v0, p1

int-to-float v4, v0

invoke-static {v11, v8}, Ljava / lang / Math; ->max (II) I

move-result v5

int-to-float v5, v5

div-float / 2addr v4, v5

invoke-static {v3, v4}, Ljava / lang / Math; ->min (FF) F

move-result v16

const / high16 v3, 0x7f000000 # 1.0f

5. Collect the files and replace the system after making backup + in InCallUI in res / drawable-xxhdpi-v4 add a file from the archive to an unknown contact:
Attached filepicture_unknown.rar(225.76 KB)

Result
Attached Image
Attached Image


Post has been editedDimar - 12.11.15, 19:21
Reason for editing: Template



Rep: (411)
Supplement to"Recent applications" and "Settings" in the style of Float
Description
Who after the instruction sheet in the most down fly adjustment
DownloadAttached fileSettings.zip(7.88 KB)
and unzip folders in the Settings with the replacement, and you will be happy. And yes I forgot to say noBelii81 to me not undestanding what to do.


Post has been editedDimar - 21.10.15, 22:10
Reason for editing: *



Rep: (356)
Lollipop style extended volume bar

Firmware LolliFox_v.1.10
Instruction
1.We disassemble framework-res.apk
2.In the framework-res \ res \ layout \ volume_adjust_item added at the end
<FrameLayout android: layout_gravity = "center" android: layout_width = "fill_parent" android: layout_height = "28.0dip" android: layout_marginBottom = "8.0dip" android: layout_weight = "1.0">
<com.android.internal.minirom.VolButton android: layout_gravity = "center" android: background = "@ drawable / vl" android: layout_width = "25.0dip" android: layout_height = "25.0dip" />
</ Framelifeout>

3.Skachivaem framework-res archive and unpack
4. Collect
5 Parse framework.jar
6.Skachivaem framework and unpack the archive
7. Collect
8.We disassemble Settings.apk
9. In AndroidManifest add
<activity android: excludeFromRecents = "true" android: label = "@ string / all_volume_title" android: name = "MiniromPol" android: theme = "@ style / miniromVolume">
<intent-filter>
<action android: name = "android.intent.action.MAIN" />
</ intent-filter>
</ activity>

10. In Settings \ res \ values ​​\ styles add
<style name = "miniromVolume" parent = "@ android: style / Theme.Holo.Panel">
<item name = "android: windowBackground">@android: drawable / volume_bg</ item>
<item name = "android: windowAnimationStyle">@android: style / Animation.Toast</ item>
<item name = "android: layout_width">480.0px</ item>
<item name = "android: windowCloseOnTouchOutside">true</ item>
</ style>

11.Skachivaem Settings archive and unpack
12.Sobiraem and dismantle
13.Propisyvaem Eid
Settings \ smali \ com \ android \ settings \ MiniromPol.smali
<public type = "xml" name = "minirom_pol" line 28

14.Sobiraem

Screenshots
Attached Image
Attached Image

Attached fileframework-res.zip(1.47 KB)

Attached fileframework.zip(2.41 KB)

Attached fileSettings.zip(14.34 Kb)


Post has been editedDimar - 13.10.15, 18:57
Reason for editing: *



Rep: (411)
Converting code that is inserted into settings_headers.xml another xml file and vice versa.

Instruction
Take for example the code that inserts the main settings menu of the applicationDolby Digital Plus and form the pen it for getting involved in the sub-settings of "Sound profiles."

To be embedded in it to the main settings menu there is here such code:
<header android: icon = "@ drawable / ic_settings_dolby" android: title = "@ string / dolby_digital_plus">
<intent android: targetPackage = "com.dolby.ds1appUI" android: action = "android.intent.action.MAIN" android: targetClass = "com.dolby.ds1appUI.MainActivity" />
</ header>

But the code has already been converted for getting involved in the sub-settings of "Sound Profiles":
<PreferenceScreen android: title = "@ string / dolby_digital_plus" android: summary = "@ string / dolby_digital">
<intent android: targetPackage = "com.dolby.ds1appUI" android: action = "android.intent.action.MAIN" android: targetClass = "com.dolby.ds1appUI.MainActivity" />
</ PreferenceScreen>

We are looking for the difference:
First - for settings_headers.xml at the beginning and end of the code is written,
<header and</ header>
That would convert must be replaced by
<PreferenceScreen and</ PreferenceScreen>

First - in the code for settings_headers.xml
android: icon = "@ drawable / ic_settings_dolby"
need to be replaced by
android: summary = "@ string / dolby_digital">

Take for example the code which is inserted into the sub settings "Sound Profiles" appDolby Digital Plus and transform it for getting involved in the setup.
getting involved in the sub-settings of "Sound Profiles":
For getting involved in the sub-settings of "Sound Profiles":
<PreferenceScreen android: title = "@ string / dolby_digital_plus" android: summary = "@ string / dolby_digital">
<intent android: targetPackage = "com.dolby.ds1appUI" android: action = "android.intent.action.MAIN" android: targetClass = "com.dolby.ds1appUI.MainActivity" />
</ PreferenceScreen>

But the code has already been converted to be embedded in it to the main settings menu:
<header android: icon = "@ drawable / ic_settings_dolby" android: title = "@ string / dolby_digital_plus">
<intent android: targetPackage = "com.dolby.ds1appUI" android: action = "android.intent.action.MAIN" android: targetClass = "com.dolby.ds1appUI.MainActivity" />
</ header>

We are looking for the difference:
First - for another xml file at the beginning and end of the code is written,
<PreferenceScreen and</ PreferenceScreen>
That would convert must be replaced by
<header and</ header>

First - in the code for another xml file
android: summary = "@ string / dolby_digital">
need to be replaced by
android: icon = "@ drawable / ic_settings_dolby"



Post has been editedDimar - 12.11.15, 19:22



Rep: (1520)
Addition to the instructionsDynamic status bar (4.4.2) for those wishing to change the level of dimming status bar

Instruction
The level of shading, but rather a filter is applied to the status bar SystemUI file \ smali \ com \ android \ systemui \ statusbar \ phone \ BarBackgroundUpdater $ 2.smali
here (search for ->filter is a single line):
const / high16 v31, -0x3ee00000 # -10.0f

# Invokes: Lcom / android / systemui / statusbar / phone / BarBackgroundUpdater; ->filter (IF) I
invoke-static / range {v30 .. v31}, Lcom / android / systemui / statusbar / phone / BarBackgroundUpdater; ->access $ 700 (IF) I
There v31 register is set to -10. Those. brightness decreases to 10 (most likely percent). To reduce the brightness even more, you need to assign a register v31 value, such as -20. To do this,online converter between formats HEX and floatwrite in the line "Decimal Representation" number -20 and click the mouse on some other field to make calculations. After that copy the number from the field "Hexadecimal Representation" 0xc1a00000. Now you need to pay attention to the fact that the register v31 is assigned a negative value, so write or removing the negative:
const / high16 v31, 0xc1a00000 # -20.0f

reserve or minus, but then the number determined as a HEX calculator 0-0xc1a00000 = 3e600000. Those. line would look like this:
const / high16 v31, -0x3e600000 # -20.0f



Post has been editedAlex & rK - 28.12.15, 15:11
Reason for editing: Corrected an erroneous opinion


Full version    

Help     rules

Time is now: 27/09/20, 12:50