Loading res/layout/call_detail.xml +10 −10 Original line number Diff line number Diff line Loading @@ -79,16 +79,6 @@ android:background="@android:color/holo_blue_light" android:layout_below="@+id/contact_background_sizer" /> <LinearLayout android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_detail_button_spacing" android:layout_below="@id/blue_separator" android:background="@android:color/black" > <!-- The voicemail fragment will be put here. --> </LinearLayout> <View android:id="@+id/photo_text_bar" android:layout_width="match_parent" Loading Loading @@ -132,6 +122,16 @@ android:layout_alignBottom="@id/contact_background_sizer" android:background="?android:attr/selectableItemBackground" /> <LinearLayout android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_detail_button_spacing" android:layout_below="@id/blue_separator" android:background="@android:color/black" > <!-- The voicemail fragment will be put here. --> </LinearLayout> <FrameLayout android:id="@+id/call_and_sms_container" android:layout_width="match_parent" android:layout_height="wrap_content" Loading src/com/android/contacts/CallDetailActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -507,7 +507,8 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware ListView historyList = (ListView) findViewById(R.id.history); historyList.setAdapter( new CallDetailHistoryAdapter(CallDetailActivity.this, mInflater, mCallTypeHelper, details, hasVoicemail(), canPlaceCallsTo)); mCallTypeHelper, details, hasVoicemail(), canPlaceCallsTo, findViewById(R.id.controls))); BackScrollManager.bind( new ScrollableHeader() { private View controls = findViewById(R.id.controls); Loading src/com/android/contacts/calllog/CallDetailHistoryAdapter.java +17 −1 Original line number Diff line number Diff line Loading @@ -45,16 +45,30 @@ public class CallDetailHistoryAdapter extends BaseAdapter { private final boolean mShowVoicemail; /** Whether the call and SMS controls are shown. */ private final boolean mShowCallAndSms; /** The controls that are shown on top of the history list. */ private final View mControls; /** The listener to changes of focus of the header. */ private View.OnFocusChangeListener mHeaderFocusChangeListener = new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { // When the header is focused, focus the controls above it instead. if (hasFocus) { mControls.requestFocus(); } } }; public CallDetailHistoryAdapter(Context context, LayoutInflater layoutInflater, CallTypeHelper callTypeHelper, PhoneCallDetails[] phoneCallDetails, boolean showVoicemail, boolean showCallAndSms) { boolean showVoicemail, boolean showCallAndSms, View controls) { mContext = context; mLayoutInflater = layoutInflater; mCallTypeHelper = callTypeHelper; mPhoneCallDetails = phoneCallDetails; mShowVoicemail = showVoicemail; mShowCallAndSms = showCallAndSms; mControls = controls; } @Override Loading Loading @@ -103,6 +117,8 @@ public class CallDetailHistoryAdapter extends BaseAdapter { // Call and SMS controls are only shown in the main UI if there is a known number. View callAndSmsContainer = header.findViewById(R.id.header_call_and_sms_container); callAndSmsContainer.setVisibility(mShowCallAndSms ? View.VISIBLE : View.GONE); header.setFocusable(true); header.setOnFocusChangeListener(mHeaderFocusChangeListener); return header; } Loading Loading
res/layout/call_detail.xml +10 −10 Original line number Diff line number Diff line Loading @@ -79,16 +79,6 @@ android:background="@android:color/holo_blue_light" android:layout_below="@+id/contact_background_sizer" /> <LinearLayout android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_detail_button_spacing" android:layout_below="@id/blue_separator" android:background="@android:color/black" > <!-- The voicemail fragment will be put here. --> </LinearLayout> <View android:id="@+id/photo_text_bar" android:layout_width="match_parent" Loading Loading @@ -132,6 +122,16 @@ android:layout_alignBottom="@id/contact_background_sizer" android:background="?android:attr/selectableItemBackground" /> <LinearLayout android:id="@+id/voicemail_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/call_detail_button_spacing" android:layout_below="@id/blue_separator" android:background="@android:color/black" > <!-- The voicemail fragment will be put here. --> </LinearLayout> <FrameLayout android:id="@+id/call_and_sms_container" android:layout_width="match_parent" android:layout_height="wrap_content" Loading
src/com/android/contacts/CallDetailActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -507,7 +507,8 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware ListView historyList = (ListView) findViewById(R.id.history); historyList.setAdapter( new CallDetailHistoryAdapter(CallDetailActivity.this, mInflater, mCallTypeHelper, details, hasVoicemail(), canPlaceCallsTo)); mCallTypeHelper, details, hasVoicemail(), canPlaceCallsTo, findViewById(R.id.controls))); BackScrollManager.bind( new ScrollableHeader() { private View controls = findViewById(R.id.controls); Loading
src/com/android/contacts/calllog/CallDetailHistoryAdapter.java +17 −1 Original line number Diff line number Diff line Loading @@ -45,16 +45,30 @@ public class CallDetailHistoryAdapter extends BaseAdapter { private final boolean mShowVoicemail; /** Whether the call and SMS controls are shown. */ private final boolean mShowCallAndSms; /** The controls that are shown on top of the history list. */ private final View mControls; /** The listener to changes of focus of the header. */ private View.OnFocusChangeListener mHeaderFocusChangeListener = new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { // When the header is focused, focus the controls above it instead. if (hasFocus) { mControls.requestFocus(); } } }; public CallDetailHistoryAdapter(Context context, LayoutInflater layoutInflater, CallTypeHelper callTypeHelper, PhoneCallDetails[] phoneCallDetails, boolean showVoicemail, boolean showCallAndSms) { boolean showVoicemail, boolean showCallAndSms, View controls) { mContext = context; mLayoutInflater = layoutInflater; mCallTypeHelper = callTypeHelper; mPhoneCallDetails = phoneCallDetails; mShowVoicemail = showVoicemail; mShowCallAndSms = showCallAndSms; mControls = controls; } @Override Loading Loading @@ -103,6 +117,8 @@ public class CallDetailHistoryAdapter extends BaseAdapter { // Call and SMS controls are only shown in the main UI if there is a known number. View callAndSmsContainer = header.findViewById(R.id.header_call_and_sms_container); callAndSmsContainer.setVisibility(mShowCallAndSms ? View.VISIBLE : View.GONE); header.setFocusable(true); header.setOnFocusChangeListener(mHeaderFocusChangeListener); return header; } Loading