added transparent status bar, bug fix
This commit is contained in:
parent
54842a0618
commit
c111321fad
|
@ -53,9 +53,9 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||||
|
|
||||||
private ImageLoader imageAsync;
|
private ImageLoader imageAsync;
|
||||||
private ProgressBar video_progress;
|
private ProgressBar video_progress;
|
||||||
|
private ProgressBar image_progress;
|
||||||
private MediaController videoController;
|
private MediaController videoController;
|
||||||
private ImageAdapter adapter;
|
private ImageAdapter adapter;
|
||||||
private ProgressBar progress;
|
|
||||||
private VideoView videoView;
|
private VideoView videoView;
|
||||||
private ZoomView zoomImage;
|
private ZoomView zoomImage;
|
||||||
private MediaType type;
|
private MediaType type;
|
||||||
|
@ -81,7 +81,7 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||||
RecyclerView imageList = findViewById(R.id.image_list);
|
RecyclerView imageList = findViewById(R.id.image_list);
|
||||||
View imageWindow = findViewById(R.id.image_window);
|
View imageWindow = findViewById(R.id.image_window);
|
||||||
View videoWindow = findViewById(R.id.video_window);
|
View videoWindow = findViewById(R.id.video_window);
|
||||||
progress = findViewById(R.id.image_load);
|
image_progress = findViewById(R.id.image_load);
|
||||||
video_progress = findViewById(R.id.video_load);
|
video_progress = findViewById(R.id.video_load);
|
||||||
zoomImage = findViewById(R.id.image_full);
|
zoomImage = findViewById(R.id.image_full);
|
||||||
videoView = findViewById(R.id.video_view);
|
videoView = findViewById(R.id.video_view);
|
||||||
|
@ -234,7 +234,7 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||||
|
|
||||||
|
|
||||||
public void disableProgressbar() {
|
public void disableProgressbar() {
|
||||||
progress.setVisibility(View.INVISIBLE);
|
image_progress.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,10 @@ public class ImageAdapter extends Adapter<ImageAdapter.ImageHolder> {
|
||||||
notifyItemRemoved(circlePos);
|
notifyItemRemoved(circlePos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return images.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemViewType(int position) {
|
public int getItemViewType(int position) {
|
||||||
if (loading && position == images.size())
|
if (loading && position == images.size())
|
||||||
|
|
|
@ -77,9 +77,9 @@ public class ImageLoader extends AsyncTask<String, Bitmap, Boolean> {
|
||||||
protected void onProgressUpdate(Bitmap[] btm) {
|
protected void onProgressUpdate(Bitmap[] btm) {
|
||||||
Bitmap image = btm[0];
|
Bitmap image = btm[0];
|
||||||
if (ui.get() != null) {
|
if (ui.get() != null) {
|
||||||
if (imageAdapter.getItemCount() == 1) {
|
if (imageAdapter.isEmpty()) {
|
||||||
ui.get().disableProgressbar();
|
|
||||||
ui.get().setImage(image);
|
ui.get().setImage(image);
|
||||||
|
ui.get().disableProgressbar();
|
||||||
}
|
}
|
||||||
imageAdapter.addLast(btm[0]);
|
imageAdapter.addLast(btm[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/dm_layout"
|
android:id="@+id/dm_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
android:id="@+id/page_edit"
|
android:id="@+id/page_edit"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
@ -48,10 +49,10 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/button"
|
android:background="@drawable/button"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:paddingLeft="@dimen/editprofile_upload_button_padding"
|
|
||||||
android:paddingStart="@dimen/editprofile_upload_button_padding"
|
android:paddingStart="@dimen/editprofile_upload_button_padding"
|
||||||
android:paddingRight="@dimen/button_padding"
|
android:paddingLeft="@dimen/editprofile_upload_button_padding"
|
||||||
android:paddingEnd="@dimen/button_padding"
|
android:paddingEnd="@dimen/button_padding"
|
||||||
|
android:paddingRight="@dimen/button_padding"
|
||||||
app:drawableLeftCompat="@drawable/upload"
|
app:drawableLeftCompat="@drawable/upload"
|
||||||
app:drawableStartCompat="@drawable/upload" />
|
app:drawableStartCompat="@drawable/upload" />
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/list_view"
|
android:id="@+id/list_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/listdetail_root"
|
android:id="@+id/listdetail_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
android:id="@+id/login_root"
|
android:id="@+id/login_root"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/main_layout"
|
android:id="@+id/main_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
android:id="@+id/video_window"
|
android:id="@+id/video_window"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<VideoView
|
<VideoView
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/user_view"
|
android:id="@+id/user_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/search_layout"
|
android:id="@+id/search_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/settings_layout"
|
android:id="@+id/settings_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
@ -18,9 +19,9 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/padding_side"
|
android:paddingLeft="@dimen/padding_side"
|
||||||
android:paddingRight="@dimen/padding_side">
|
android:paddingRight="@dimen/padding_side">
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/tweet_layout"
|
android:id="@+id/tweet_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -89,15 +90,15 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/answer_reference_detail"
|
android:id="@+id/answer_reference_detail"
|
||||||
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/button_height"
|
android:layout_height="@dimen/button_height"
|
||||||
|
android:background="@drawable/button"
|
||||||
android:paddingLeft="@dimen/button_padding"
|
android:paddingLeft="@dimen/button_padding"
|
||||||
android:paddingRight="@dimen/button_padding"
|
android:paddingRight="@dimen/button_padding"
|
||||||
android:background="@drawable/button"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/tweet_textsize_api"
|
android:textSize="@dimen/tweet_textsize_api"
|
||||||
android:visibility="gone"
|
android:visibility="gone" />
|
||||||
style="@style/Widget.AppCompat.Button.Borderless" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tweet_detailed"
|
android:id="@+id/tweet_detailed"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
android:id="@+id/user_view"
|
android:id="@+id/user_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
|
||||||
|
<item name="android:colorBackground">@android:color/black</item>
|
||||||
|
<item name="android:windowTranslucentStatus">true</item>
|
||||||
|
<item name="android:windowAnimationStyle">@style/TransactionPending</item>
|
||||||
|
<item name="android:textViewStyle">@style/RobotoTextView</item>
|
||||||
|
<item name="android:buttonStyle">@style/RobotoButton</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="colorAccent">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
Loading…
Reference in New Issue