Skip to content

Commit 56394e4

Browse files
committed
Update Demo
1 parent 2d5b728 commit 56394e4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

PluginMain/src/com/example/pluginmain/PluginDetailActivity.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.app.Activity;
99
import android.content.Intent;
1010
import android.net.Uri;
11+
import android.os.Build;
1112
import android.os.Bundle;
1213
import android.view.View;
1314
import android.view.View.OnClickListener;
@@ -180,9 +181,12 @@ public void onClick(View v) {
180181
});
181182
pluginView.addView(btn);
182183

183-
Space space = new Space(this);
184-
space.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 25));
185-
pluginView.addView(space);
184+
if (Build.VERSION.SDK_INT >=14) {
185+
Space space = new Space(this);
186+
space.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 25));
187+
pluginView.addView(space);
188+
}
189+
186190
}
187191
}
188192
}

0 commit comments

Comments
 (0)