Есть ли способ изменить непрозрачность фонового изображения, которое я установил в файле XML? Кроме того, я хотел оправдать текст, который я собираюсь помещать в xml-файл, однако, как я исследовал для этой же проблемы. Студия Android еще не поддерживает выравнивание текста. Тем не менее, я попытался перейти на webview вместо textview, но у меня много ошибок, вызывающих его в моем основном java активности, поскольку я использовал оператор case для вызова макетов, а Java-файл веб-просмотра - это не фрагмент, а скорее активность. Ваш ответ будет высоко оценен. СпасибоКак изменить непрозрачность фонового изображения?
Вот файл XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:background="@drawable/minnions1"
android:id="@+id/minnions1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Safe and Responsible usage of Computer,Internet and Email"
android:textColor="@android:color/black"
android:textSize="20sp"
android:id="@+id/title1"
android:layout_marginTop="125dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center"
/>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity ="center"
android:fillViewport="true"
android:layout_alignParentStart="true"
android:layout_marginTop="100dp"
android:id="@+id/scrollView"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textColor="#000"
android:textColorLink="@android:color/black"
android:textSize="18sp"
android:text="Using facilities and equipments should always be safe and useful in Information and Communication Technology (ICT)
like computer, email, and internet. It is important for us to study the guides and safe usage of computer, internet
and email in schools.\n \n"
android:drawablePadding="5dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="20dp"
android:layout_below="@+id/content1"
android:layout_centerHorizontal="true"
/>
</ScrollView>
</LinearLayout>
Кроме того, Вот файл Java
package com.android.pet.view;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.doepiccoding.navigationdrawer.R;
public class Lesson1 extends Fragment{
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.onepointone, null);
return rootView;
}
}
Я не совсем понимаю ваша вторая часть questing..where вашей WebView, теперь видно в коде закачанного .. – sharan