Bu bir okul projesi içindir, ancak bunun birçok bölümünü anlamadım.AVD uygulamasında nasıl döndürme yapılır
Döndürme işleminin sistemden ayrılmasına, ancak 2 düzen açıklandıktan sonra (standart ve yatay mod) Ancak ekranı döndürdüğümde manzara modu düzeni dikkate alınmayacaktır.
http://img15.hostingpics.net/pics/647131Capturedu20160327204339.png
MainActivity AppCompatActivity
, ve tek yaptığım (Öğretmenimiz bize söylendi Çünkü) (genişletir (ı durumunda bu konu ... olduğunu, 4 düğmesine bastınız)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Log.d(TAG,"Test");
}
sonra 2 LinearLayouts, düzen/activity_main.xml tane tarif olan ve hemen hemen aynıdır/etkinlik-main.xml düzeni-topraklarda başka: Ne MainActivity açıklayan kenara manifestosunu değişmedi düzen-kara/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:baselineAligned="false"
android:divider="@drawable/empty_divider_wide"
android:showDividers="middle"
android:background="@color/fl_concrete"
>
<fragment
class="com.example.g20901528.androidproject.fragment.TopFragment"
android:id="@+id/fragment_top"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
<fragment
class="com.example.g20901528.androidproject.fragment.BottomFragment"
android:id="@+id/fragment_bottom"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
: düzenleme:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.g20901528.androidproject">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Soruma soru şudur: telefonu döndürdüğümde iki parçanın nasıl dönmesi gerekir?
Herhangi bir bilgi vermeye hazırım. Eğer gerçekten ihtiyacınız varsa,
Github Link of the project. senin düzeni xml adı farklıdır
Gerçekten de, dosya sistemimde her iki etkinlikte de event_main.xml dosyası vardı. –