Commit c44ce77e authored by dvdandroid's avatar dvdandroid Committed by topjohnwu

Updated UI for tablets

parent ab318ef9
......@@ -23,7 +23,9 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".AboutActivity"/>
<activity
android:name=".AboutActivity"
android:theme="@style/AppTheme.Transparent"/>
</application>
</manifest>
\ No newline at end of file
......@@ -13,6 +13,7 @@ import android.text.Html;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;
import com.topjohnwu.magisk.utils.RowItem;
......@@ -135,6 +136,22 @@ public class AboutActivity extends AppCompatActivity {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(XDA_THREAD)));
}
});
setFloating();
}
public void setFloating() {
boolean isTablet = getResources().getBoolean(R.bool.isTablet);
if (isTablet) {
WindowManager.LayoutParams params = getWindow().getAttributes();
params.height = getResources().getDimensionPixelSize(R.dimen.floating_height);
params.width = getResources().getDimensionPixelSize(R.dimen.floating_width);
params.alpha = 1.0f;
params.dimAmount = 0.6f;
params.flags |= 2;
getWindow().setAttributes(params);
setFinishOnTouchOutside(true);
}
}
@Override
......
......@@ -4,6 +4,6 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#fff"
android:fillColor="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="isTablet">true</bool>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="isTablet">false</bool>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="floating_height">650dp</dimen>
<dimen name="floating_width">500dp</dimen>
</resources>
\ No newline at end of file
......@@ -21,4 +21,7 @@
<item name="actionMenuTextColor">@color/icons</item>
</style>
<style name="AppTheme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
</style>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment