I have complicated XML file. Here is a piece:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:hint="@string/tel"
style="@style/AppTheme.TextInputLayout"
android:layout_marginBottom="@dimen/space_high">
<android.support.design.widget.TextInputEditText
android:id="@+id/point.j_tel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/AppTheme.TextInputEditText"/>
</android.support.design.widget.TextInputLayout>
<ImageButton
android:layout_gravity="center"
android:id="@+id/point.telEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tab_icon_edit"/>
</LinearLayout>
I'm trying to make phone numbers inside android:id="@+id/point.j_tel" clickable. I tried android:autoLink="all"
, android:autolink="phone"
, android:linksClickable="true"
. But this only led phone numbers become underscored and semi tranceparent but not clickable . I also tried this inside my Java code:
cameraManager = new CameraManager(this);
etNotice = findViewById(R.id.point_c_notice);
getValidations().add(new TextEmptyValidation(this, etNotice));
etNotice.addTextChangedListener(getLastValidation());
tiAddress = findViewById(R.id.point_c_address);
tiTel = findViewById(R.id.point_j_tel);
tiTel.setAutoLinkMask(Linkify.PHONE_NUMBERS);
tiTel.setMovementMethod(new ScrollingMovementMethod());
I tried a lot of things during two days, but nothing helps and I almost gave up. Maybe somebody has any ideas?
Why do you need to click on EditText to make the call? It should be TextView or add calling button beside the EditText