۱۳۹۴/۰۲/۳۰, ۱۱:۰۰ ب.ظ
(۱۳۹۴/۰۲/۳۰, ۱۰:۱۷ ب.ظ)'am5152' نوشته: با توجه به رفرنس زیر؛
http://stackoverflow.com/a/15187637/4900042
اگر اکتیویتی رو بصورت LinearLayout تعیین کرده باشید میتونید از خاصیت weight استفاده کنید:ایکلیپس رو نمیدونم اما در androd studio خیلی کارتون راحت تر هست.کد پیاچپی:<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
<Button
android:id="@+id/button1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#99000099" />
<Button
android:id="@+id/button2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#99990000" />
</LinearLayout>
Layout_margin و بعد با استفاده از چند جهت مختلف با تنظیم کردن اندازه و مقادیر مورد نیاز میتونید کارتون رو انجام بدید.
برای سوال دوم هم باید فایل فونت رو در Assets کپی و با کد زیر شناسایی کنید:کد پیاچپی:Button n = (Button) findViewById(R.id.button1);
Typeface typeface = Typeface.createFromAsset(getAssets(), "font.ttf");
n.setText("show");
n.setTypeface(typeface);
اوکی شد دمت گرم استاد...