Skip to content

Commit

Permalink
feat: Add Horizontal scroll in event editor block list area
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxGalaxy committed Dec 29, 2023
1 parent 26fc66b commit 0702854
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.dragon.ide.objects.Block;
Expand All @@ -24,7 +25,7 @@ public BlockListAdapter(ArrayList<Block> _arr, Activity activity) {

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LinearLayout _v = new LinearLayout(activity);
HorizontalScrollView _v = new HorizontalScrollView(activity);
RecyclerView.LayoutParams _lp =
new RecyclerView.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
Expand All @@ -34,7 +35,7 @@ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

@Override
public void onBindViewHolder(ViewHolder _holder, int _position) {
LinearLayout v = (LinearLayout) _holder.itemView;
HorizontalScrollView v = (HorizontalScrollView) _holder.itemView;
v.setPadding(8, 8, 8, 8);
if (!(list.get(_position) instanceof DoubleComplexBlock)) {

Expand Down

0 comments on commit 0702854

Please sign in to comment.