Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[AOSP][STOCK TW][5.0][SAMSUNG][GLOWPAD][MOD]Glowpad for stock Caller ID AOSP style

$
0
0
Can we ported aosp glowpad button on our stock samsung dialer android 5.0 ? Can you give an assessment as an expert please
image:

Thank you

upd i found sample of glowpad we can using it?
https://play.google.com/store/apps/d....GlowPadSample


https://github.com/frakbot/GlowPadBackport

Quote:

In order to use the GlowPadView in your project, follow these steps:

Ensure you have the Maven Central repository configured in your build.gradle file, eg.:

repositories {
mavenCentral()
}
This has to be in your app module's build.gradle or in the project's top-level build.gradle file. Android Studio puts it into the top-level file by default.

Add the dependency to your app's module build.gradle file, eg.:

Code:

dependencies {
    // Your other dependencies...
    compile 'net.frakbot.glowpadbackport:glowpadbackport:2.1.0'
}

Reference the GlowPadView in an XML layout (or initialise it from code)

Code:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">

    <net.sebastianopoggi.ui.GlowPadBackport.GlowPadView
            android:id="@+id/incomingCallWidget"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_marginTop="-10dp"
            android:layout_marginBottom="-46dp"
            android:background="@android:color/black"
            android:visibility="visible"
            android:gravity="top"

            app:targetDrawables="@array/incoming_call_widget_2way_targets"
            app:handleDrawable="@drawable/ic_in_call_touch_handle"
            app:innerRadius="@dimen/glowpadview_inner_radius"
            app:outerRadius="@dimen/glowpadview_target_placement_radius"
            app:outerRingDrawable="@drawable/ic_lockscreen_outerring"
            app:snapMargin="@dimen/glowpadview_snap_margin"
            app:vibrationDuration="20"
            app:feedbackCount="1"
            app:glowRadius="@dimen/glowpadview_glow_radius"
            app:pointDrawable="@drawable/ic_lockscreen_glowdot"/>

</RelativeLayout>

????

Profit!
Sample app



My friend finist1 make projects for aide you can using it

https://yadi.sk/d/E7xCPq8TdocFC

https://yadi.sk/d/hzZlbfa-docJq

He plug library now programmers can use it with app glowpad on full potential and take resources from it

Also this code we found in stock caller is very simmilar like glowpadsample
LegacyInCallUI\res\layout\answer_fragment.xml
Code:

<?xml version="1.0" encoding="utf-8"?>
<com.android.incallui.GlowPadWrapper android:gravity="center" android:id="@id/glow_pad_view" android:background="@android:color/black" android:focusable="true" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" dc:targetDrawables="@array/incoming_call_widget_3way_targets" dc:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" dc:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" dc:handleDrawable="@drawable/ic_in_call_touch_handle" dc:outerRingDrawable="@android:drawable/ic_lockscreen_sim" dc:innerRadius="@dimen/glowpadview_inner_radius" dc:outerRadius="@dimen/glowpadview_target_placement_radius" dc:glowRadius="@dimen/glowpadview_glow_radius" dc:vibrationDuration="20" dc:snapMargin="@dimen/glowpadview_snap_margin" dc:feedbackCount="1" dc:allowScaling="true"
  xmlns:android="http://schemas.android.com/apk/res/android" xmlns:dc="http://schemas.android.com/apk/res-auto" />



GlowPadBackport-sample-release\res\layout\main.xml
Code:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
    <Button android:id="@id/btn_toggle_padmult" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/btn_toggle_multiplier" android:layout_alignParentTop="true" />
    <net.sebastianopoggi.ui.GlowPadBackport.GlowPadView android:gravity="top" android:id="@id/incomingCallWidget" android:background="@android:color/black" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="-10.0dip" android:layout_marginBottom="-46.0dip" android:layout_below="@id/btn_toggle_padmult" app:targetDrawables="@array/incoming_call_widget_2way_targets" app:handleDrawable="@drawable/ic_in_call_touch_handle" app:outerRingDrawable="@drawable/ic_lockscreen_outerring" app:pointDrawable="@drawable/ic_lockscreen_glowdot" app:innerRadius="@dimen/glowpadview_inner_radius" app:outerRadius="@dimen/glowpadview_target_placement_radius" app:glowRadius="@dimen/glowpadview_glow_radius" app:vibrationDuration="20" app:snapMargin="@dimen/glowpadview_snap_margin" app:feedbackCount="1" />
</RelativeLayout>


stock caller

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>