main-activity

Canvas containing bitmap size proper adjustment in landscape and portrait mode

有些话、适合烂在心里 提交于 2019-12-02 21:51:40
问题 Consider the following image as an example: Landscape mode In Landscape mode , there are 2 sides viz- left side containing fragment 1 and right side containing fragment 2 . The left side (fragment 1) view is fine meaning - buttons are proper, text is coming with right alignment without any overlap/mix with other text. The right side (fragment 2) view is a chart and its format is not coming correct on the 7' screen. Chart font covers the sides of the grid (on both sides of the grid), chart

Canvas containing bitmap size proper adjustment in landscape and portrait mode

╄→尐↘猪︶ㄣ 提交于 2019-12-02 12:31:29
Consider the following image as an example: Landscape mode In Landscape mode , there are 2 sides viz- left side containing fragment 1 and right side containing fragment 2 . The left side (fragment 1) view is fine meaning - buttons are proper, text is coming with right alignment without any overlap/mix with other text. The right side (fragment 2) view is a chart and its format is not coming correct on the 7' screen. Chart font covers the sides of the grid (on both sides of the grid), chart buttons are narrowed to a single letter. Portrait mode In portrait mode , there is only 1 side viz - right

android - Sending a broadcast to MainActivity and then showing a TextView

南笙酒味 提交于 2019-11-29 12:57:50
I want to unhide a TextView once a method is called in another View file. The TextView is in MainActivity. For this, I am planning to send a broadcast from the View file to MainActivity, but it didn't work. How would I achieve this? Step 0 : Define an action : public static final String ACTION_SHOW_TEXT= "showText"; Step 1 : Create your Broadcast receiver in your MainActivity : BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (myText != null) { myText.setVisibility(View.VISIBLE); } } }; Step 2 : Add the register and

How to set my Activity as main activity in android? [duplicate]

和自甴很熟 提交于 2019-11-28 17:11:38
This question already has an answer here: Change application's starting activity 10 answers I want to create own activity as main activity rather than using default MainActivity . How can I define that in android manifest? Nargis In your manifest file , use the below code to declare an activity as a launcher activity: <activity android:name=".yourActivityName" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> From Android Developer docs: ACTION_MAIN activity: Start up as the initial