move Unpublish button

This commit is contained in:
Akinwale Ariwodola 2020-10-02 12:08:33 +01:00
parent 6a0263c5bc
commit dce1c0715e
8 changed files with 39 additions and 10 deletions

View file

@ -3122,6 +3122,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener
// TODO: Broadcast startup status changes
JSONObject startupStatus = status.getJSONObject("startup_status");
android.util.Log.d(TAG, startupStatus.toString(2));
sdkReady = startupStatus.getBoolean("file_manager") && startupStatus.getBoolean("wallet");
}
} catch (ConnectException | JSONException ex) {

View file

@ -28,6 +28,7 @@ import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
@ -2790,6 +2791,10 @@ public class FileViewFragment extends BaseFragment implements
Helper.setViewVisibility(root.findViewById(R.id.file_view_action_report), isOwnClaim ? View.GONE : View.VISIBLE);
Helper.setViewVisibility(root.findViewById(R.id.file_view_action_edit), isOwnClaim ? View.VISIBLE : View.GONE);
Helper.setViewVisibility(root.findViewById(R.id.file_view_action_unpublish), isOwnClaim ? View.VISIBLE : View.GONE);
LinearLayout fileViewActionsArea = root.findViewById(R.id.file_view_actions_area);
fileViewActionsArea.setWeightSum(isOwnClaim ? 6 : 5);
}
}
}

View file

@ -5,7 +5,7 @@
android:viewportHeight="24"
android:tint="#FFFFFF"
android:alpha="0.8">
<path
android:fillColor="#FF000000"
android:pathData="M5,3h14v2h-14zM9,7v6h-4l7,7l7,-7h-4v-6"/>
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13L7,13v-2h10v2z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View file

@ -434,6 +434,36 @@
android:layout_gravity="center_horizontal" />
</LinearLayout>
<LinearLayout
android:id="@+id/file_view_action_unpublish"
android:clickable="true"
android:background="?attr/selectableItemBackground"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<RelativeLayout
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="center_horizontal">
<ImageView
android:tint="@color/foreground"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerInParent="true"
android:src="@drawable/ic_unpublish" />
</RelativeLayout>
<TextView
android:fontFamily="@font/inter"
android:textSize="12sp"
android:text="@string/unpublish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
</LinearLayout>
<LinearLayout
android:id="@+id/file_view_action_report"
android:clickable="true"
@ -623,13 +653,6 @@
android:layout_weight="8" />
</LinearLayout>
<Button
android:id="@+id/file_view_action_unpublish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/unpublish"
app:icon="@drawable/ic_unpublish" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"