Is it okay to use the same layout for two different activities?
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="#+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="92dp" android:text="Start Download" /> </LinearLayout> Both activities have to perform the same things.The only difference is the type of data they handles. Just for curiosity I am asking this question.
Yes, there's no problem with that technically. Just remember that if you change anything for one activity it will change for both, so its best suited for very simple layouts. But frequently I'll use the same placeholder for 4 or 5 activities that aren't written yet, or I'll use the same layout for placeholder listview elements.
Android studio :com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry
Drawer Views not showing
Google Auth sign in profile given name and family name empty when authenticating for the first time
non localizable string xml
Which one is faster Color Filtering or use different drawables in android?
How to draw a thick dash line using xml?
How to show loaded reward video in adMobPro?
Firebase 3.0 createUserWithEmailAndPassword() error handling
ruby on rails and android: How does JWT really work here
Error Inflating Navigation View
How do I retrieve data from the wearable API from within an intentService?
How to show complete image in Navigation drawer background
How to get child by its position?
User coming back null even in if statement
Android) How to get UserInfo(openID, token) for WeChat Login?
Error:(25, 46) error: #InjectViews must be a List or array