Помогите убить круглый аватар...

Интерфейс, диалоги, темы, стили, меню
Ответить
Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 11:52

Заранее дико извиняюсь, если что-то называю и делаю не так, я нее программист, а интересующийся мододел :)
Постараюсь все объяснить правильно
Итак:
Имеется звонилка в телефоне, которая на входящие/исходящие звонки отображает круглое фото (см. внизу во вложении)
Размер этого фото изменить можно в values-xxxhdpi в dimens.xml - call_card_photo_size Но оно остается круглым
А очень надо сделать его квадратным
Сама разметка экрана входящих/исходящих в layout/primary_call_info.xml

Код: Выделить всё

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@id/call_info_container" android:layout_width="fill_parent" android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:id="@id/call_info_1" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <FrameLayout android:id="@id/photoContainer" android:layout_width="@dimen/call_card_photo_size" android:layout_height="@dimen/call_card_photo_size" android:layout_marginBottom="@dimen/call_card_photo_layout_marginBottom" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true">
            <ImageView android:layout_gravity="center" android:id="@id/photo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" android:contentDescription="@string/contactPhoto" />
            <FrameLayout android:id="@id/manageConference" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <TextView android:gravity="center_horizontal" android:layout_gravity="center|top" android:id="@id/manageConferenceGuideText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="14.0dip" android:text="@string/sp_onscreen_manage_members_NORMAL" style="@style/voicecall_incall_manage_members_l" />
                <Button android:layout_gravity="center" android:id="@id/manageConferenceButton" android:layout_width="57.0dip" android:layout_height="57.0dip" android:contentDescription="@string/onscreenManageConferenceText" />
            </FrameLayout>
        </FrameLayout>
        <LinearLayout android:orientation="vertical" android:id="@id/call_banner_1" android:background="@color/green_action_bar_color" android:paddingTop="@dimen/call_banner_top_padding" android:paddingBottom="@dimen/call_banner_bottom_padding" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding">
            <LinearLayout android:orientation="horizontal" android:id="@id/topSpace" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <ImageView android:layout_gravity="center_vertical" android:id="@id/hdvoice" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                <TextView android:ellipsize="end" android:id="@id/hdvoiceAttempting" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sp_attempting_normal" android:singleLine="true" android:layout_marginStart="4.0dip" style="@style/voicecall_incall_hdvoice_attempting" />
                <TextView android:ellipsize="end" android:id="@id/MSIMname" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" style="@style/voicecall_incall_netework_name" />
                <TextView android:ellipsize="end" android:id="@id/networkID" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" style="@style/voicecall_incall_netework_name" />
                <ImageView android:id="@id/clearvoice" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                <ImageView android:id="@id/noise" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            </LinearLayout>
            <RelativeLayout android:id="@id/callerInfoOuterLayout" android:paddingTop="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <RelativeLayout android:id="@id/callerInfoBasic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true">
                    <TextView android:id="@id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignParentStart="true" style="@style/voicecall_incall_caller_id" />
                    <TextView android:ellipsize="end" android:id="@id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.0dip" android:maxWidth="@dimen/call_card_phonetype_max_width" android:singleLine="true" android:layout_below="@id/name" android:layout_marginEnd="12.0dip" android:layout_alignParentStart="true" style="@style/voicecall_incall_phone_type" />
                    <TextView android:id="@id/phoneNumber" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.0dip" android:singleLine="true" android:layout_below="@id/name" android:layout_alignBottom="@id/label" android:layout_toEndOf="@id/label" style="@style/voicecall_incall_phone_number" />
                </RelativeLayout>
                <TextView android:id="@id/cityID" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:singleLine="true" android:layout_below="@id/callerInfoBasic" android:layout_alignParentStart="true" style="@style/voicecall_incall_city_id" />
                <TextView android:id="@id/cnapName" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_below="@id/callerInfoBasic" android:layout_alignParentStart="true" style="@style/voicecall_text_call" />
                <TextView android:gravity="center_vertical" android:id="@id/elapsedTime" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignBottom="@id/callerInfoBasic" android:paddingStart="8.0dip" android:layout_alignParentEnd="true" style="@style/voicecall_incall_time" />
                <ImageView android:id="@id/connectionIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/callerInfoBasic" android:layout_alignBottom="@id/cityID" android:layout_alignParentEnd="true" />
                <TextView android:ellipsize="end" android:id="@id/callTypeLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" android:layout_above="@id/elapsedTime" android:layout_alignParentEnd="true" style="@style/voicecall_incall_phone_status" />
            </RelativeLayout>
        </LinearLayout>
        <RelativeLayout android:id="@id/callStateLabelView" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="30.0dip" android:layout_below="@id/call_banner_1" android:layoutDirection="ltr" android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding">
            <ImageView android:id="@id/bluetoothIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@dimen/ic_incall_bluetooth" android:layout_centerVertical="true" android:layout_marginStart="0.5dip" android:layout_alignParentStart="true" />
            <TextView android:gravity="center_vertical" android:id="@id/callStateLabel" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textDirection="locale" android:layout_alignParentEnd="true" style="@style/voicecall_incall_status" />
        </RelativeLayout>
        <ImageButton android:id="@id/menuIcon" android:background="@drawable/ic_action_user" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:contentDescription="@string/action_menu_overflow_description" android:layout_marginStart="8.0dip" android:layout_alignParentEnd="true" />
        <LinearLayout android:orientation="vertical" android:id="@id/StatusBarGroup" android:background="@color/call_card_event_social_assis_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/callStateLabelView" android:paddingStart="@dimen/call_event_state_side_padding" android:paddingEnd="@dimen/call_event_state_side_padding">
            <RelativeLayout android:id="@id/statusBarGroupContentContainer" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <LinearLayout android:orientation="vertical" android:id="@id/CallAssistance" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:ellipsize="marquee" android:gravity="center_vertical" android:id="@id/socialStatus" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="28.0dip" android:singleLine="true" android:hapticFeedbackEnabled="false" style="@style/voicecall_incall_event_info" />
                <TextView android:ellipsize="marquee" android:gravity="center_vertical" android:id="@id/EventText" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="28.0dip" android:singleLine="true" android:hapticFeedbackEnabled="false" android:drawableStart="@drawable/ic_list_birthday" style="@style/voicecall_incall_event_info" />
            </RelativeLayout>
            <Space android:id="@id/statusBarGroupBottomOffset" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
        </LinearLayout>
        <TextView android:gravity="center" android:id="@id/crashedLcdUiGuide" android:background="@drawable/toast_frame" android:paddingTop="14.0dip" android:paddingBottom="14.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/cracked_lcd_mode_guide_text" android:layout_below="@id/StatusBarGroup" android:paddingStart="16.0dip" android:paddingEnd="16.0dip" android:layout_marginStart="15.0dip" android:layout_marginEnd="15.0dip" style="@style/general_toast_popup" />
        <LinearLayout android:id="@id/CDGCallInfo" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/callStateLabelView" style="@style/cdg_CDGCallInfo">
            <TextView android:id="@id/extendedInfo" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/cdg_extendedInfo" />
            <TextView android:id="@id/redirectNumber" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@style/cdg_redirectNumber" />
        </LinearLayout>
        <LinearLayout android:layout_gravity="end|center" android:orientation="vertical" android:id="@id/supplementary_info_container" android:background="@color/incall_secondary_info_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/callStateLabelView">
            <LinearLayout android:gravity="end" android:orientation="horizontal" android:id="@id/providerInfo" android:background="@android:color/transparent" android:paddingTop="@dimen/provider_info_top_bottom_padding" android:paddingBottom="@dimen/provider_info_top_bottom_padding" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding">
                <TextView android:textAppearance="?android:textAppearanceSmall" android:textColor="@color/incall_call_banner_text_color" android:ellipsize="marquee" android:id="@id/providerLabel" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="6.0" android:textAllCaps="true" />
                <TextView android:textAppearance="?android:textAppearanceSmall" android:textColor="@color/incall_call_banner_text_color" android:ellipsize="middle" android:gravity="end" android:id="@id/providerAddress" android:layout_width="0.0px" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="4.0" android:textAllCaps="true" android:paddingStart="8.0dip" />
            </LinearLayout>
        </LinearLayout>
        <RelativeLayout android:id="@id/inCallMenuBtn" android:background="@android:color/transparent" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/supplementary_info_container" android:layout_alignWithParentIfMissing="true" android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding">
            <LinearLayout android:gravity="end" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <ImageButton android:id="@id/visualVoiceBtn" android:visibility="gone" android:layout_marginStart="15.0dip" style="@style/InCallMenuButton" />
                <ImageButton android:id="@id/imageShareButton" android:visibility="gone" android:layout_marginStart="15.0dip" style="@style/InCallMenuButton" />
                <ImageButton android:id="@id/videoShareButton" android:visibility="gone" android:layout_marginStart="15.0dip" style="@style/InCallMenuButton" />
                <ImageButton android:id="@id/joynChatButton" android:visibility="gone" android:layout_marginStart="15.0dip" style="@style/InCallMenuButton" />
            </LinearLayout>
        </RelativeLayout>
        <ViewStub android:id="@id/stub_VisualVoiceResultLinear" android:visibility="gone" android:layout="@layout/visual_voice_result" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/callStateLabelView" />
        <TextView android:id="@id/cnapNameCallMessage" android:background="@color/call_card_cnap_name_bg" android:paddingTop="11.0dip" android:paddingBottom="8.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="42.0dip" android:text="@string/unknown" android:layout_below="@id/callStateLabelView" android:paddingStart="14.0dip" android:paddingEnd="14.0dip" android:layout_marginEnd="7.0dip" android:layout_alignParentEnd="true" style="@style/voicecall_rathering_list" />
        <LinearLayout android:orientation="horizontal" android:id="@id/BottomButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true">
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/incallscreen_hold_btn" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/incall_funcbtn_height" android:layout_weight="1.0" android:paddingStart="5.0dip" android:paddingEnd="5.0dip">
                <ImageView android:layout_gravity="center" android:id="@id/incallscreen_hold_image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/btn_in_call_action_hold" android:layout_marginEnd="3.5dip" />
                <TextView android:layout_gravity="center" android:id="@id/incallscreen_hold_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/sp_menu_hold_NORMAL" android:hapticFeedbackEnabled="false" android:paddingStart="3.5dip" style="@style/voicecall_incall_function_btn" />
            </LinearLayout>
            <View android:layout_gravity="center_vertical" android:id="@id/divider" android:background="@drawable/divider_function" android:layout_width="1.0dip" android:layout_height="29.0dip" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/vutalkbutton" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/incall_funcbtn_height" android:layout_weight="1.0" android:paddingStart="5.0dip" android:paddingEnd="5.0dip">
                <ImageView android:layout_gravity="center" android:id="@id/vutalk_image" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                <TextView android:layout_gravity="center" android:id="@id/viewtalk_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/incall_func_vutalk" android:hapticFeedbackEnabled="false" android:paddingStart="3.5dip" style="@style/voicecall_incall_function_btn" />
            </LinearLayout>
        </LinearLayout>
        <TextView android:ellipsize="end" android:id="@id/RecordTime" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/record_time_botton_gap" android:text="@string/sp_rec_default_SHORT" android:singleLine="true" android:drawablePadding="4.0dip" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:drawableStart="@drawable/ic_rec" style="@style/voicecall_recordtime" />
        <TextView android:ellipsize="end" android:id="@id/UseFmcCallText" android:background="@android:drawable/toast_frame" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8.669983dip" android:text="@string/sp_incoming_noti_infmccall_NORMAL" android:singleLine="true" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:hapticFeedbackEnabled="false" android:paddingStart="40.0dip" android:paddingEnd="40.0dip" style="@style/voicecall_incall_usefmc_info" />
        <RelativeLayout android:id="@id/incallscreen_speaker_volume" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="18.0dip" android:layout_above="@id/BottomButton" android:layout_marginStart="7.0dip">
            <ImageButton android:id="@id/incallscreen_volume_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/onscreenSpeakerText" />
        </RelativeLayout>
    </RelativeLayout>
    <RelativeLayout android:id="@id/phonememo_container" android:background="#ffffffff" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@id/callStateLabelView">
        <ImageView android:layout_gravity="center_horizontal" android:id="@id/phonememoStatePhoto" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="33.0dip" android:layout_marginBottom="18.0dip" />
        <ImageView android:layout_gravity="center_horizontal" android:id="@id/phonememoStateAniPhoto" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/phonememoStatePhoto" />
        <TextView android:textSize="16.0sp" android:textColor="#ff000000" android:gravity="center_horizontal" android:id="@id/phone_memo_incallscreen_state" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="14.0dip" android:text="@string/answering_memo_reply_record_state" android:layout_below="@id/phonememoStateAniPhoto" />
    </RelativeLayout>
    <RelativeLayout android:gravity="end" android:id="@id/phone_memo_panel_padding" android:background="@color/TRANSPARENT" android:paddingTop="@dimen/call_banner_top_bottom_padding" android:paddingBottom="@dimen/call_banner_top_bottom_padding" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="@dimen/call_banner_height" android:layout_alignParentTop="true" android:paddingStart="@dimen/call_banner_side_padding" android:paddingEnd="@dimen/call_banner_side_padding">
        <Button android:id="@id/phone_memo_recordButton" android:layout_width="50.0dip" android:layout_height="50.0dip" />
    </RelativeLayout>
</RelativeLayout>
Попробовал в строке <ImageView android:layout_gravity="center" android:id="@id/photo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" android:contentDescription="@string/contactPhoto" /> дописать бекграунд - фотка контакта получилась тот же круг, но уже на небольшом квадратном фоне (чуть больше самого круга) Пришел к выводу, что фрейм на исходное изображение не накладывается, а обрезка под круг выполняется в самом коде. А тут я крайне слаб
Т.е. может есть вариант посмотреть что делается с исходной фоткой в коде, вследствие чего она выводится как круг, чтобы изменить ее на квадратный вид?
Большое подозрение упало на файл LGInCallUI\smali\com\android\incallui\view\RoundedAvatarDrawable.smali

Декомпилированный апк выложил тут https://drive.google.com/file/d/0B-jnr1 ... sp=sharing

Прошу помощи, может есть решение, чтобы решить данный вопрос малой кровью..?
Заранее огромное человеческое спасибо
Вложения
avatar.png
avatar.png (42.89 КБ) 6974 просмотра

Аватара пользователя
Foenix
Сообщения: 4201
Зарегистрирован: 20 окт 2012, 12:01

Re: Помогите убить круглый аватар...

Сообщение Foenix » 06 мар 2015, 11:56

если по аналогии с одной гугловской прогой - там может быть маскирующий xml файл, содержащий какой-нибудь shape круглый.
R.id.team

NullPointerException - что делать???
viewtopic.php?f=33&t=3899&p=28952#p28952
Где моя ошибка?
viewtopic.php?f=60&t=3198

Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Re: Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 11:59

А не можете посмотреть в выложенном апк? Я уже все облазил и даже не знаю что еще думать :)

Аватара пользователя
Foenix
Сообщения: 4201
Зарегистрирован: 20 окт 2012, 12:01

Re: Помогите убить круглый аватар...

Сообщение Foenix » 06 мар 2015, 12:08

я опять же точно не знаю, нету времени все проверять.
навскидку по поиску shape и по названию файл picture_cover_circle_bg.xml подходит же.
так что не все ты облазил
R.id.team

NullPointerException - что делать???
viewtopic.php?f=33&t=3899&p=28952#p28952
Где моя ошибка?
viewtopic.php?f=60&t=3198

Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Re: Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 12:16

<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffdbdbdb" />
</shape>

Замена цвета на прозрачный чтонить даст или надо менять что-то здесь <shape android:shape="oval" ?

Аватара пользователя
Foenix
Сообщения: 4201
Зарегистрирован: 20 окт 2012, 12:01

Re: Помогите убить круглый аватар...

Сообщение Foenix » 06 мар 2015, 12:18

попробуй на квадрат заменить же
R.id.team

NullPointerException - что делать???
viewtopic.php?f=33&t=3899&p=28952#p28952
Где моя ошибка?
viewtopic.php?f=60&t=3198

Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Re: Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 12:35

Нет, к сожалению это ничего не дает...
Написал rectangle и пробовал цвет поставить прозрачный - ничего, все тот же круг...

Аватара пользователя
doter.ua
Сообщения: 1106
Зарегистрирован: 23 ноя 2013, 16:08
Откуда: Ukraine

Re: Помогите убить круглый аватар...

Сообщение doter.ua » 06 мар 2015, 12:50

де пикчи: маска + сама картинка + шаманство в канве.
http://stackoverflow.com/a/17487744
Семь раз отмерь - поставь студию.
Эклипс не студия, ошибка вылетит - не исправишь.
Скажи мне кто твой друг, и оба поставили студию.
Студия - свет, а эклипс - тьма.

Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Re: Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 14:35

Мне не надо рисовать маску, мне надо сделать аватар квадратным.
Поскольку я очень слаб / почти не разбираюсь в коде, я и попросил помочь мне сделать это...

Аватара пользователя
Foenix
Сообщения: 4201
Зарегистрирован: 20 окт 2012, 12:01

Re: Помогите убить круглый аватар...

Сообщение Foenix » 06 мар 2015, 14:59

если маска нарисована круглая, то заменив форму на квадратную - картинка станет квадратной. Неужели не ясно, что просто так убрать ее не получится, не разбирая кода?
Маска, это такая "дыра" через которую видно картинку. Если дыру сделать квадратной, то картинка станет квадратной
R.id.team

NullPointerException - что делать???
viewtopic.php?f=33&t=3899&p=28952#p28952
Где моя ошибка?
viewtopic.php?f=60&t=3198

Аватара пользователя
doter.ua
Сообщения: 1106
Зарегистрирован: 23 ноя 2013, 16:08
Откуда: Ukraine

Re: Помогите убить круглый аватар...

Сообщение doter.ua » 06 мар 2015, 15:20

П.С. И на этот экран у тебя столько xml кода ушло???? нижние 6 квадратов можно и адаптером сделать.
Семь раз отмерь - поставь студию.
Эклипс не студия, ошибка вылетит - не исправишь.
Скажи мне кто твой друг, и оба поставили студию.
Студия - свет, а эклипс - тьма.

Аватара пользователя
Foenix
Сообщения: 4201
Зарегистрирован: 20 окт 2012, 12:01

Re: Помогите убить круглый аватар...

Сообщение Foenix » 06 мар 2015, 15:24

doter.ua, facepalm
ты думаешь, автор декомпилирует свой код?
R.id.team

NullPointerException - что делать???
viewtopic.php?f=33&t=3899&p=28952#p28952
Где моя ошибка?
viewtopic.php?f=60&t=3198

Krazee
Сообщения: 8
Зарегистрирован: 12 окт 2014, 20:28

Re: Помогите убить круглый аватар...

Сообщение Krazee » 06 мар 2015, 16:59

Если дыру сделать квадратной, то картинка станет квадратной
было бы классно, если бы ктонить подсказал как
Но я писал в первом посте: мне кажется, что здесь как-то иначе реализован этот круг
Я задавал для ImageView свой бекграунд в этой строке вот так
<ImageView android:layout_gravity="center" android:id="@id/photo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/green_action_bar_color" android:scaleType="centerCrop" android:contentDescription="@string/contactPhoto" />
и экран вызова становился такой примерно
см. вложение
Поэтому я и пришел к выводу, что в данном случае не фрейм накладывается, а может как-то исходник (ведь на контакты в телефоне кропается квадратная картинка) обрезается под круг и выдается на экран звонилки...
Хотя может я этот бекграунд на маску наложил..?
Вложения
avatar2.png
avatar2.png (59.32 КБ) 6952 просмотра

Ответить