【问题标题】:Orientation change Crash Application方向改变碰撞应用
【发布时间】:2013-05-29 06:23:47
【问题描述】:

我正在使用片段,当我更改方向时应用程序崩溃。 这是日志猫:

05-29 05:56:52.158: E/AndroidRuntime(1428): java.lang.RuntimeException: Unable to start activity     ComponentInfo{com.example.bajraregistertesteclipse/com.example.bajraregistertesteclipse.MainActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class fragment
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3692)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.app.ActivityThread.access$700(ActivityThread.java:141)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1240)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.os.Looper.loop(Looper.java:137)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at android.app.ActivityThread.main(ActivityThread.java:5039)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at java.lang.reflect.Method.invokeNative(Native Method)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at java.lang.reflect.Method.invoke(Method.java:511)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-29 05:56:52.158: E/AndroidRuntime(1428):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-29 06:17:02.864: E/AndroidRuntime(1554): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.bajraregistertesteclipse/com.example.bajraregistertesteclipse.MainActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class fragment
05-29 06:17:02.864: E/AndroidRuntime(1554):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-29 05:56:52.158: E/AndroidRuntime(1428): Caused by: java.lang.IllegalStateException: Fragment com.example.bajraregistertesteclipse.SecondFragment did not create a view.

这是我的 First_Test_Fragment 类

package com.example.bajraregistertesteclipse;

import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

public class First_Test_Fragment extends Fragment {

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    View view=inflater.inflate(R.layout.first_test_fragment,container,false);
    Button btnLogin=(Button)view.findViewById(R.id.btnLogin);

    btnLogin.setOnClickListener(new OnClickListener(){

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            FirstFragment firstFragment=new FirstFragment();
            FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
            fragmentTransaction.replace(R.id.detailFragment, firstFragment);
            fragmentTransaction.addToBackStack(null);
            fragmentTransaction.commit();

        }

    });
    Button btnSignUp=(Button)view.findViewById(R.id.btnSignUp);
    btnSignUp.setOnClickListener(new OnClickListener(){

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            SignUp signup=new SignUp();
            FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
            fragmentTransaction.replace(R.id.detailFragment, signup);
            fragmentTransaction.addToBackStack(null);
            fragmentTransaction.commit();



        }

    });




    return view;
}



}



}

这是我的 FirstFragment 类

package com.example.bajraregistertesteclipse;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


public class FirstFragment extends Fragment {
LoginDataBaseAdapter loginDataBaseAdapter;
EditText loginTestUser,loginTestPassword;
String userName,password,confirmpassword;


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    // TODO Auto-generated method stub

       View view = inflater.inflate(R.layout.firstfragment, container, false);


      loginTestUser=(EditText)view.findViewById(R.id.editTextUserNameToLogin);
      loginTestPassword=    (EditText)view.findViewById(R.id.editTextPasswordToLogin);
       Button btnLogin = (Button) view.findViewById(R.id.buttonSignIn); 

        btnLogin.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
            //  Toast.makeText(getActivity(),"BttonLoginPressed",Toast.LENGTH_SHORT).show();

                // get The User name and Password
                 userName=loginTestUser.getText().toString();
                 password=loginTestPassword.getText().toString();

              // fetch the Password form database for respective user name
                    String storedPassword=loginDataBaseAdapter.getSinlgeEntry(userName);

                    // check if the Stored password matches with  Password entered by user
                    if(password.equals(storedPassword))
                    {
                        Toast.makeText(getActivity(), "Congrats: Login Successfull", Toast.LENGTH_LONG).show();

                        // Intent intent = new Intent(getActivity(), Admin_Page.class);
                       //     getActivity().startActivity(intent);

                        Intent open=new Intent("com.example.bajraregistertesteclipse.ADMIN_PAGE");

                        getActivity().startActivity(open);
                        // startActivity(open);

                    }
                    else
                    {
                        Toast.makeText(getActivity(), "User Name or Password does not match", Toast.LENGTH_LONG).show();
                    }

            }

        });

   return view;
}


@Override
public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    loginDataBaseAdapter=new LoginDataBaseAdapter(getActivity());
     loginDataBaseAdapter=loginDataBaseAdapter.open();
}

}

我的 Mainfest.xml 是:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.example.bajraregistertesteclipse"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="13"
    android:targetSdkVersion="16" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

   <activity  
       android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="com.example.bajraregistertesteclipse.MAINACTIVITY" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        </activity>
    <activity android:name=".SignUp"></activity>
     <activity android:name=".Admin_Page">

     </activity>

</application>

现在我的问题是当方向改变时应用程序崩溃,当点击按钮时应该启动新活动 Admin_Page 但应用程序崩溃。

提前谢谢你!!!

【问题讨论】:

  • 问题很可能不在清单文件中,而在您的布局文件中。
  • @Cornholio 我无法弄清楚我的问题.....
  • 您的SecondFragment 引起了问题,而您发布了 FirstFragment 代码,为什么?

标签: android orientation fragment


【解决方案1】:
<activity android:name=".SignUp"
android:configChanges="keyboardHidden|orientation|screenSize">

将此行添加到您的所有活动中以避免因方向更改而崩溃。 这将避免在方向更改时一次又一次地加载活动。


如需更多信息,请了解您对 configChanges here the link to the Android documentation 的实际操作。

列出活动将自行处理的配置更改。当运行时发生配置更改时,默认情况下会关闭并重新启动 Activity,但使用该属性声明配置会阻止 Activity 重新启动。相反,活动保持运行并调用其 onConfigurationChanged() 方法。

Note: Using this attribute should be avoided and used only as a last resort. Please read Handling Runtime Changes for more information about how to properly handle a restart due to a configuration change.

以及如何处理configuration changes你可以找到here

【讨论】:

  • 谢谢...为什么当我执行 Intent intent = new Intent(getActivity(), Admin_Page.class); 时我的应用程序崩溃; getActivity().startActivity(intent);
  • 您遇到的错误是什么?我的意思是 logcat 中的错误
  • 不客气。 @Rohan Ale 请接受您认为正确的任何答案,这样这个问题就不会悬而未决.. :)
  • 如何销毁之前的活动。即当我成功登录时,我的新活动开始,但是当我按下 moible 的后退按钮时,我将再次指向我的登录页面,我想将其销毁。你能帮帮我吗?
  • 如果是片段那么我们需要使用getActivity().finish();否则activity_class_name.finish();
【解决方案2】:
android:configChanges="keyboardHidden|orientation"

将此添加到您的活动清单文件中。

【讨论】:

  • 你知道解决这个问题的任何其他方法吗?如果你使用的是webview、css等相关的东西,你不能使用这个方法,因为,当方向改变时,你需要重新排列。
  • 这很可能会在进程死亡后崩溃,见stackoverflow.com/questions/49046773/…
【解决方案3】:

使用

import android.support.v4.app.Fragment;

而不是

import android.app.Fragment;

您可能还需要更改 Activity 以扩展 FragmentActivity 而不仅仅是 Activity。 More discussion Here.

【讨论】:

    【解决方案4】:

    将此添加到Manifest中的所有活动中

    android:configChanges="keyboard|orientation|locale|fontScale|screenLayout|screenSize|uiMode|navigation|touchscreen|keyboardHidden|layoutDirection|smallestScreenSize"
    

    【讨论】:

    • 这种形式回答没用。解释您的意思以及它如何影响应用程序以及它如何解决所描述的问题。
    • 这就是解决方案。您必须将此添加到清单中的活动中。
    • 这很可能会在进程死亡后崩溃,见stackoverflow.com/questions/49046773/…
    【解决方案5】:

    我发现了另一种情况,如果您对纵向和横向使用不同的 XML。那么不同的根元素或视图可能会导致崩溃,例如 --

    我的肖像 XML 是 --

        <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/login_page_back_gradient"
        android:orientation="vertical"
        tools:context="com.thepsi.beintent.LoginPage"
        android:id="@+id/parent_login_page">
    
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true">
    
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="@dimen/linear_right_20dp"
                android:layout_marginRight="@dimen/linear_right_20dp">
    
    
                <ImageView
                    android:id="@+id/img_logo"
                    android:layout_width="100dp"
                    android:layout_height="100dp"
                    android:layout_centerHorizontal="true"
                    android:layout_gravity="center"
                    android:scaleType="fitXY"
                    android:src="@drawable/beintent_logo" />
    
                <EditText
                    android:id="@+id/editTextLoginEmail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/img_logo"
                    android:layout_marginTop="@dimen/margin_between_views_login_page"
                    android:background="@drawable/box_edittext"
                    android:hint="@string/email_login"
                    android:inputType="textEmailAddress"
                    android:padding="10dp"
                    android:textStyle="bold" />
    
                <EditText
                    android:id="@+id/editTextLoginPassword"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/editTextLoginEmail"
                    android:layout_gravity="center"
                    android:layout_marginTop="12dp"
                    android:background="@drawable/box_edittext"
                    android:hint="@string/password_login"
                    android:inputType="textPassword"
                    android:padding="10dp"
                    android:textStyle="bold" />
    
    
                <CheckBox
                    android:id="@+id/checkBoxLoginPage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/editTextLoginPassword"
                    android:layout_gravity="center"
                    android:layout_marginTop="10dp"
                    android:textColor="@android:color/white"
                    android:textStyle="bold"
                    app:buttonTint="@android:color/white" />
    
                <TextView
                    android:id="@+id/txt_check_box_lbl"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/checkBoxLoginPage"
                    android:layout_alignTop="@+id/checkBoxLoginPage"
                    android:layout_gravity="center_vertical"
                    android:gravity="center"
                    android:layout_marginLeft="10dp"
                    android:layout_toRightOf="@+id/checkBoxLoginPage"
                    android:text="@string/remember_me_login"
                    android:textColor="@android:color/white"
                    android:textSize="@dimen/forgot_rember_text_size"
                    android:textStyle="bold" />
    
                <TextView
                    android:id="@+id/txt_question_mark"
                    android:layout_width="24dp"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/checkBoxLoginPage"
                    android:layout_marginLeft="5dp"
                    android:layout_marginTop="10dp"
                    android:background="@drawable/circle_background_red"
                    android:gravity="center"
                    android:text="@string/questionMark"
                    android:textAlignment="center"
                    android:textColor="@android:color/white"
                    android:textSize="18sp"
                    android:textStyle="bold" />
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/txt_question_mark"
                    android:layout_alignLeft="@+id/txt_check_box_lbl"
                    android:layout_alignTop="@+id/txt_question_mark"
                    android:layout_gravity="center_vertical"
                    android:layout_toRightOf="@id/txt_question_mark"
                    android:text="@string/forgot_password_login_page"
                    android:textColor="@android:color/white"
                    android:textSize="@dimen/forgot_rember_text_size"
                    android:textStyle="bold" />
    
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/txt_question_mark"
                    android:layout_marginTop="@dimen/margin_between_views_login_page"
                    android:gravity="center"
                    android:orientation="horizontal">
    
                    <Button
                        android:id="@+id/btn_login"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/button_height_loginpage"
                        android:layout_gravity="center"
                        android:layout_marginEnd="5dp"
                        android:layout_marginRight="5dp"
                        android:layout_weight="1"
                        android:background="@drawable/common_btn_selecter"
                        android:ems="10"
                        android:onClick="LoginButtonClicked"
                        android:text="@string/log_in_login_page"
                        android:textColor="#fff"
                        android:textSize="@dimen/login_page_button_text_size"
                        android:textStyle="bold" />
    
                    <Button
                        android:id="@+id/btn_sign_up"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/button_height_loginpage"
                        android:layout_gravity="center"
                        android:layout_marginLeft="5dp"
                        android:layout_marginStart="5dp"
                        android:layout_weight="1"
                        android:background="@drawable/common_btn_selecter"
                        android:ems="10"
                        android:onClick="SignUpButtonClicked"
                        android:text="@string/sign_up_login_page"
                        android:textColor="#fff"
                        android:textSize="@dimen/login_page_button_text_size"
                        android:textStyle="bold" />
                </LinearLayout>
    
    
            </RelativeLayout>
        </ScrollView>
    
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:gravity="center_horizontal"
            android:orientation="horizontal"
            android:paddingBottom="10dp">
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:gravity="end"
                android:onClick="OnContactUsClicked"
                android:text="@string/contact_us"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/margin_for_seperator"
                android:layout_marginLeft="@dimen/margin_for_seperator"
                android:layout_marginRight="@dimen/margin_for_seperator"
                android:layout_marginStart="@dimen/margin_for_seperator"
                android:gravity="end"
                android:text="@string/seperator"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:gravity="start"
                android:onClick="OnTermAndConditionsClicked"
                android:text="@string/terms_and_conditions"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
        </LinearLayout>
    
    </RelativeLayout>
    

    我的风景 xml 是 --

     <?xml version="1.0" encoding="utf-8"?>
    
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/login_page_back_gradient"
        android:orientation="vertical"
        android:fillViewport="true"
        tools:context="com.thepsi.beintent.LoginPage"
        android:id="@+id/parent_login_page">
    
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/login_page_back_gradient"
            android:orientation="vertical"
            android:id="@+id/parent_container"
            tools:context="com.thepsi.beintent.LoginPage">
    
            <RelativeLayout
                android:id="@+id/upper_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_marginLeft="@dimen/linear_right_20dp"
                android:layout_marginRight="@dimen/linear_right_20dp"
                android:layout_centerVertical="true"
                android:layout_marginBottom="40dp"
                android:layout_gravity="center">
    
    
                <ImageView
                    android:id="@+id/img_logo"
                    android:layout_width="100dp"
                    android:layout_height="100dp"
                    android:layout_centerHorizontal="true"
                    android:layout_gravity="center"
                    android:scaleType="fitXY"
                    android:src="@drawable/beintent_logo" />
    
                <EditText
                    android:id="@+id/editTextLoginEmail"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/img_logo"
                    android:layout_marginTop="@dimen/margin_between_views_login_page"
                    android:background="@drawable/box_edittext"
                    android:hint="@string/email_login"
                    android:inputType="textEmailAddress"
                    android:padding="10dp"
                    android:textStyle="bold" />
    
                <EditText
                    android:id="@+id/editTextLoginPassword"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/editTextLoginEmail"
                    android:layout_gravity="center"
                    android:layout_marginTop="12dp"
                    android:background="@drawable/box_edittext"
                    android:hint="@string/password_login"
                    android:inputType="textPassword"
                    android:padding="10dp"
                    android:textStyle="bold" />
    
    
                <CheckBox
                    android:id="@+id/checkBoxLoginPage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/editTextLoginPassword"
                    android:layout_gravity="center"
                    android:layout_marginTop="10dp"
                    android:textColor="@android:color/white"
                    android:textStyle="bold"
                    app:buttonTint="@android:color/white" />
    
                <TextView
                    android:id="@+id/txt_check_box_lbl"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/checkBoxLoginPage"
                    android:layout_alignTop="@+id/checkBoxLoginPage"
                    android:layout_gravity="center_vertical"
                    android:gravity="center"
                    android:layout_marginLeft="10dp"
                    android:layout_toRightOf="@+id/checkBoxLoginPage"
                    android:text="@string/remember_me_login"
                    android:textColor="@android:color/white"
                    android:textSize="@dimen/forgot_rember_text_size"
                    android:textStyle="bold" />
    
                <TextView
                    android:id="@+id/txt_question_mark"
                    android:layout_width="24dp"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/checkBoxLoginPage"
                    android:layout_marginLeft="5dp"
                    android:layout_marginTop="10dp"
                    android:background="@drawable/circle_background_red"
                    android:gravity="center"
                    android:text="@string/questionMark"
                    android:textAlignment="center"
                    android:textColor="@android:color/white"
                    android:textSize="18sp"
                    android:textStyle="bold" />
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/txt_question_mark"
                    android:layout_alignLeft="@+id/txt_check_box_lbl"
                    android:layout_alignTop="@+id/txt_question_mark"
                    android:layout_gravity="center_vertical"
                    android:layout_toRightOf="@id/txt_question_mark"
                    android:text="@string/forgot_password_login_page"
                    android:textColor="@android:color/white"
                    android:textSize="@dimen/forgot_rember_text_size"
                    android:textStyle="bold" />
    
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/txt_question_mark"
                    android:layout_marginTop="@dimen/margin_between_views_login_page"
                    android:gravity="center"
                    android:orientation="horizontal">
    
                    <Button
                        android:id="@+id/btn_login"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/button_height_loginpage"
                        android:layout_gravity="center"
                        android:layout_marginEnd="5dp"
                        android:layout_marginRight="5dp"
                        android:layout_weight="1"
                        android:background="@drawable/common_btn_selecter"
                        android:ems="10"
                        android:onClick="LoginButtonClicked"
                        android:text="@string/log_in_login_page"
                        android:textColor="#fff"
                        android:textSize="@dimen/login_page_button_text_size"
                        android:textStyle="bold" />
    
                    <Button
                        android:id="@+id/btn_sign_up"
                        android:layout_width="0dp"
                        android:layout_height="@dimen/button_height_loginpage"
                        android:layout_gravity="center"
                        android:layout_marginLeft="5dp"
                        android:layout_marginStart="5dp"
                        android:layout_weight="1"
                        android:background="@drawable/common_btn_selecter"
                        android:ems="10"
                        android:onClick="SignUpButtonClicked"
                        android:text="@string/sign_up_login_page"
                        android:textColor="#fff"
                        android:textSize="@dimen/login_page_button_text_size"
                        android:textStyle="bold" />
                </LinearLayout>
    
    
            </RelativeLayout>
    
    
        <LinearLayout
            android:id="@+id/linear_layout_contact_us"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_horizontal|bottom"
            android:orientation="horizontal"
            android:layout_below="@+id/upper_container"
            android:paddingBottom="10dp">
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:gravity="end"
                android:onClick="OnContactUsClicked"
                android:text="@string/contact_us"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/margin_for_seperator"
                android:layout_marginLeft="@dimen/margin_for_seperator"
                android:layout_marginRight="@dimen/margin_for_seperator"
                android:layout_marginStart="@dimen/margin_for_seperator"
                android:gravity="end"
                android:text="@string/seperator"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clickable="true"
                android:gravity="start"
                android:onClick="OnTermAndConditionsClicked"
                android:text="@string/terms_and_conditions"
                android:textColor="@android:color/white"
                android:textSize="16sp" />
    
        </LinearLayout>
    </RelativeLayout>
    
    </ScrollView>
    

    可能对某人有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-12
      • 2022-12-08
      相关资源
      最近更新 更多