【Android系统】拨号app

news/2024/11/15 20:25:50/
大部分还看不懂,只记录接触到的一些

   Android N 通话界面_InCallActivity_Yigit_dev的博客-CSDN博客

   android N 拨打电话流程(MO)_Yigit_dev的博客-CSDN博客

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

平板上去掉了一些ui的功能------------
打电话的ui对应的activity是com.android.incallui.InCallActivity里面是fragment组成的界面,看call_card_fragment.xml里面的一些按钮,看callButtonFragment.java-----------
去掉了一些按钮,直接把按钮数量设为了0代码里面检测按钮数量,然后显示预设个数,多余的折叠起来,有一个回调函数updateButtonStates   (我说怎么在xml里面设置visibility没有用!!)改没改几行代码,看看试试了大半天其他的不写了,代码很多没看过
diff --git a/packages/apps/Dialer/InCallUI/res/layout-w500dp-land/call_card_fragment.xml b/packages/apps/Dialer/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
index 4d59cb7..60b4732 100644
--- a/packages/apps/Dialer/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
+++ b/packages/apps/Dialer/InCallUI/res/layout-w500dp-land/call_card_fragment.xml
@@ -98,7 +98,7 @@<!-- Call recorder infor --><RelativeLayout
-        android:layout_width="wrap_content"
+        android:layout_width="200dp"android:layout_height="wrap_content"android:layout_alignParentBottom="true"android:layout_alignParentLeft="true">
@@ -159,7 +159,7 @@<LinearLayoutandroid:id="@+id/primary_call_info_container"android:layout_alignParentStart="true"
-        android:layout_width="wrap_content"
+        android:layout_width="1024dp"android:layout_height="match_parent"android:layout_above="@id/secondary_call_info"android:orientation="vertical"
@@ -199,16 +199,16 @@<!-- Margin left and centerHorizontal don't work well together, so use a Space instead. --><Spaceandroid:id="@+id/floating_end_call_action_button_margin_left"
-        android:layout_width="@dimen/end_call_button_margin_left"
+		android:layout_width="@dimen/end_call_button_margin_left"android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true" />
+        android:layout_marginStart="480dp" /><FrameLayoutandroid:id="@+id/floating_end_call_action_button_container"android:layout_width="@dimen/end_call_floating_action_button_diameter"android:layout_height="@dimen/end_call_floating_action_button_diameter"android:background="@drawable/fab_red"
-        android:layout_toRightOf="@id/floating_end_call_action_button_margin_left"
+		android:layout_toRightOf="@id/floating_end_call_action_button_margin_left"android:layout_alignParentBottom="true"android:layout_marginBottom="@dimen/end_call_button_margin_bottom"><ImageButton android:id="@+id/floating_end_call_action_button"
diff --git a/packages/apps/Dialer/InCallUI/res/layout/call_button_fragment.xml b/packages/apps/Dialer/InCallUI/res/layout/call_button_fragment.xml
index 3bc306e..d96bb1e 100644
--- a/packages/apps/Dialer/InCallUI/res/layout/call_button_fragment.xml
+++ b/packages/apps/Dialer/InCallUI/res/layout/call_button_fragment.xml
@@ -83,6 +83,7 @@<ToggleButton android:id="@+id/dialpadButton"style="@style/InCallCompoundButton"android:background="@drawable/btn_compound_dialpad"
+			android:visibility="invisible"android:contentDescription="@string/onscreenShowDialpadText_unselected" /><!-- MIDDLE RIGHT SLOT ================================================================= -->
diff --git a/packages/apps/Dialer/InCallUI/res/layout/call_card_fragment.xml b/packages/apps/Dialer/InCallUI/res/layout/call_card_fragment.xml
index 3a1c61d..c877985 100644
--- a/packages/apps/Dialer/InCallUI/res/layout/call_card_fragment.xml
+++ b/packages/apps/Dialer/InCallUI/res/layout/call_card_fragment.xml
@@ -49,9 +49,9 @@<!-- Placeholder for the dialpad which is replaced with the dialpad fragment when shown. --><FrameLayoutandroid:id="@+id/answer_and_dialpad_container"
-        android:layout_width="match_parent"
+        android:layout_width="300dp"android:elevation="@dimen/dialpad_elevation"
-        android:layout_height="match_parent" />
+        android:layout_height="300dp" /><!-- Secondary "Call info" block, for the background ("on hold") call. --><include layout="@layout/secondary_call_info"
diff --git a/packages/apps/Dialer/InCallUI/res/values-sw410dp/config.xml b/packages/apps/Dialer/InCallUI/res/values-sw410dp/config.xml
index a57f867..7db0dc4 100644
--- a/packages/apps/Dialer/InCallUI/res/values-sw410dp/config.xml
+++ b/packages/apps/Dialer/InCallUI/res/values-sw410dp/config.xml
@@ -17,5 +17,5 @@<resources><!-- Determines the maximum number of buttons visible on the call card.  Any buttons over thiscount are put into the overflow menu. -->
-    <integer name="call_card_max_buttons">6</integer>
-</resources>
\ No newline at end of file
+    <integer name="call_card_max_buttons">0</integer>
+</resources>
diff --git a/packages/apps/Dialer/InCallUI/res/values-w500dp-land/dimens.xml b/packages/apps/Dialer/InCallUI/res/values-w500dp-land/dimens.xml
index 42b0886..26ffd51 100644
--- a/packages/apps/Dialer/InCallUI/res/values-w500dp-land/dimens.xml
+++ b/packages/apps/Dialer/InCallUI/res/values-w500dp-land/dimens.xml
@@ -33,5 +33,5 @@<dimen name="video_preview_margin">20dp</dimen>-    <dimen name="end_call_button_margin_left">50dp</dimen>
+    <dimen name="end_call_button_margin_left">0dp</dimen></resources>
diff --git a/packages/apps/Dialer/InCallUI/res/values/dimens.xml b/packages/apps/Dialer/InCallUI/res/values/dimens.xml
index 357c582..f7160f9 100644
--- a/packages/apps/Dialer/InCallUI/res/values/dimens.xml
+++ b/packages/apps/Dialer/InCallUI/res/values/dimens.xml
@@ -113,7 +113,7 @@<!-- Height of translucent shadow effect --><dimen name="translucent_shadow_height">2dp</dimen>-    <dimen name="end_call_button_margin_bottom">2dp</dimen>
+    <dimen name="end_call_button_margin_bottom">155dp</dimen><dimen name="call_card_anim_translate_y_offset">50dp</dimen>diff --git a/packages/apps/Dialer/InCallUI/src/com/android/incallui/CallButtonFragment.java b/packages/apps/Dialer/InCallUI/src/com/android/incallui/CallButtonFragment.java
index 068b9b0..8a7d69b 100755
--- a/packages/apps/Dialer/InCallUI/src/com/android/incallui/CallButtonFragment.java
+++ b/packages/apps/Dialer/InCallUI/src/com/android/incallui/CallButtonFragment.java
@@ -185,6 +185,7 @@ public class CallButtonFragmentmMuteButton.setOnClickListener(this);mShowDialpadButton = (CompoundButton) parent.findViewById(R.id.dialpadButton);mShowDialpadButton.setOnClickListener(this);
+		mShowDialpadButton.setVisibility(View.INVISIBLE);mHoldButton = (CompoundButton) parent.findViewById(R.id.holdButton);mHoldButton.setOnClickListener(this);mSwapButton = (ImageButton) parent.findViewById(R.id.swapButton);
@@ -264,6 +265,7 @@ public class CallButtonFragment} else if (id == R.id.swapButton) {getPresenter().swapClicked();} else if (id == R.id.dialpadButton) {
+			Log.e("QYC", "qyc, dialpad...1111");getPresenter().showDialpadClicked(!mShowDialpadButton.isSelected());} else if (id == R.id.addParticipant) {getPresenter().addParticipantClicked();
@@ -622,19 +624,20 @@ public class CallButtonFragmentbutton.setVisibility(View.VISIBLE);prevVisibleButton = button;prevVisibleId = i;
-                } else {
-                    if (menu == null) {
-                        menu = getPopupMenu();
-                    }
+                } else {	
+					//qyc 
+                    //if (menu == null) {
+                    //    menu = getPopupMenu();
+                    //}// Collapse the current button into the overflow menu. If is the first visible// button that exceeds the threshold, also collapse the previous visible button// so that the total number of visible buttons will never exceed the threshold.
-                    if (prevVisibleButton != null) {
-                        addToOverflowMenu(prevVisibleId, prevVisibleButton, menu);
-                        prevVisibleButton = null;
-                        prevVisibleId = -1;
-                    }
-                    addToOverflowMenu(i, button, menu);
+                    //if (prevVisibleButton != null) {
+                    //    addToOverflowMenu(prevVisibleId, prevVisibleButton, menu);
+                    //    prevVisibleButton = null;
+                   //     prevVisibleId = -1;
+                   // }
+                   // addToOverflowMenu(i, button, menu);}} else if (visibility == BUTTON_HIDDEN) {button.setVisibility(View.GONE);
@@ -949,6 +952,8 @@ public class CallButtonFragment: R.string.onscreenShowDialpadText_selected));}}
+
+		mShowDialpadButton.setVisibility(View.INVISIBLE);}@Override


http://www.ppmy.cn/news/360700.html

相关文章

935. 骑士拨号器

国际象棋中的骑士可以按下图所示进行移动&#xff1a; . 这一次&#xff0c;我们将 “骑士” 放在电话拨号盘的任意数字键&#xff08;如上图所示&#xff09;上&#xff0c;接下来&#xff0c;骑士将会跳 N-1 步。每一步必须是从一个数字键跳到另一个数字键。 每当…

Netkeeper联网时报pppoe拨号模块损坏

1、存在问题 netkeeper拨号时&#xff0c;报网卡驱动没有&#xff0c;在台式机上折腾了半天&#xff0c;去hp官网找驱动&#xff0c;下载驱动精灵网卡版的等等&#xff0c;依然行不通。最后一怒之下&#xff0c;重新装了系统&#xff0c;安装了windows10专业版&#xff0c;更新…

Symbian平台上按键精灵

最近刚刚完成了一个S60的按键精灵&#xff0c;目前只是在Nokia的3230上测试过&#xff0c;效果还可以。可以录制键盘过程作为一个脚本文件&#xff0c;然后可以设置回放 自动执行。对于手机网游的用户应该有些帮助。 详细的情况可以看 名称&#xff1a;手机按键精灵版本&…

Android电话拨号器实例详解

笔者正在自学Android开发&#xff0c;随着学习的进程的加深&#xff0c;我会写一些小白级别的案例&#xff0c;一是为了保存代码和笔记&#xff0c;二也是为了供同样热爱Android的小伙伴参考。这里写了一个小案例&#xff0c;叫电话拨号器。下面详细介绍如何做&#xff1a; 对…

Android-1-电话拨号器

项目包src --java源代码gen文件夹 -- 资源文件&#xff0c;修改后自动生成---R.java 中的drawable类对应目录里的drawable目录&#xff0c; layout对应目录中的layout目录&#xff0c;String对应String目录assets文件夹 存放较大的文件&#xff1a;如视频&#xff0c;音频&…

Android 自动、拨打电话、拨号

个人中心 DownLoad Android 自动拨打电话功能可以通过以下步骤实现&#xff1a; 1. 在 AndroidManifest.xml 文件中添加拨打电话的权限&#xff1a; <uses-permission android:name"android.permission.CALL_PHONE" /> n2. 在代码中使用 Intent 启动拨打电话…

电话自动拨号在电脑上自动拨打

要实现电话自动拨号功勇&#xff0c;几个必备的条件&#xff1a;1、电话自动拨号外呼系统&#xff0c;2、电话机&#xff0c;软件电话如&#xff1a;eyeBeam 硬件电话&#xff1a;IP电话机&#xff08;强烈推荐用户使用&#xff0c;数字信号&#xff0c;效果好&#xff09;&…

Android 电话拨号器

安卓系统一般自带有&#xff1a;电话&#xff0c;邮件&#xff0c;浏览器功能&#xff1b; 本文章简单&#xff0c;讲解电话自带的电话拨号功能进行&#xff0c;电话拨号。 电话拨号器的&#xff1a;逻辑很简单 - 首先获取输入的电话号码 - 然后在点击按钮的时候&#xff0…