Monday 8 August 2016

Black Hole Punctures the 4th Dimension

In this paper I will explain my understanding about the black hole and black hole leading to other dimension through the 4th dimension. For a current discussion I will be discussing only after the formation of a body that have properties to become a black hole. I would like to call this body as NewBaby for convenience in further discussion. This body i.e. the NewBaby possess high mass and pulls all the bodies nearby it into itself.

Assumption
#1 The NewBaby is resting on the Fabric of the Space.
#2 The Fabric of Space is elastic in nature and is elongated directly proportional to NewBaby mass.

Theory: 

1. The NewBaby will start to attract all the masses nearby under it's influence. In this process it's mass gets build up.

2. The built up in mass will lead to the growth of NewBaby to the "Kid". 
(Kid is a name given for NewBaby after significant mass built up for the convenience in discussion).

3. The Kid has much mass than the NewBaby so it stretches the Fabric of the Space more i.e. the more deeper funnel type well in Space Fabric then the depth of well formed by the NewBaby. 

4. The high mass of the Kid result in a deeper i.e more elongated Space Fabric by assumption #2

5. Given that, there are other masses near the well influence, this will further result more mass accumulation and the growth of Kid to the Adult.
(Adult is a name given for KID after significant mass built up for the convenience in discussion).

6. The Adult has the extreme mass which is near to Ultimate mass carrying capacity of the Space Fabric at that particular volume of Space Fabric where the Adult is located. i.e. Space Fabric is elongated near to Ultimate limit of Space Fabric elongation.

7. When the Adult's mass grows to the Ultimate mass capacity limit, the fabric gets punctured and  Adult enter the other dimension.

8. This other dimension could lead to other universe/s if they exists.


Further more:

1. The elastic Space Fabric bounce back if the puncture of the Space fabric takes place creating the strong impact in the elastic Space Fiber. It produces the disturbances that propagates through the Space Fabric affecting the other masses in the Space Fiber.
( I think these disturbances are recognized as Gravitational Waves by the Scientific community at this current time. I would personally like to congratulate LIGO for the success in detecting the Gravitational waves for the first time in Lab which is in fact the greatest achievement in mankind.)

2. I, to this point with no doubt believe the other dimension which I would like to call as 4th dimension is a Time Dimension, thus getting access to the 4th dimension which allows us to travel in time and of course to the Universe/s that are stacked up in the time dimension.

Possible Query

Ques.How the puncture in the Space Fabric leads to other dimension?
Ans. By the rule of Dimension Puncture: If a body of any dimension puncture its dimension in which it exists or enter in the hole in it's dimension it is definite to enter the other dimension if the other dimension exists through the a dimension higher than it's dimension.

Query Analogy:

Take a 3 or 4 sheet of  flexible paper, stretch it from all the all sides. Then use the pen and puncture the sheet from the top with the force and note that the tip of the pen travel to other similar dimension through through the height/depth dimension.

This exact analogy is applied to the 3D body. By the rule of Dimension Puncture : if the 3D body puncture its dimension or enters the hole in its dimension then it is definite to enter other dimension through the higher dimension which I would like to call as 4th dimension. 

Conclusion: 

I have published this paper to share my ideas and understanding about the black hole and understanding about this universe and beyond.
Furthermore this paper doesn't restrict the discussion about the black hole, It also defines the Dimension Puncture and give the insight about the way to the travel to other universe if  they are stacked in 4th dimension.
Additionally it  relates the disturbances created by impact after puncture in the Space Fabric to the Gravitational waves. 

About Me

I was born in Tulsipur -8, Dang, Nepal. I am fascinated about the things around me since the time I was conscious observer of this universe. When I was child I used to think about the effect of height and degree of impact. As I grew up I got answer to my question with the help of Science. This increased my further interest in Science mainly Physics.

"It is not the inability to see but it's the willingness to ignore that sets a invisible blind fold to the reality."

Umesh Gautam
ugautam007@gmail.com
(Aeronautical Engineer)

Thursday 23 June 2016

Designing Android Interface : Themes

Android provides various built in themes that can be applied by adding the :theme attibute to Activity together with name of Activity or to Application label in the manifest file.  Adding the theme attribute to the Activity only changes the theme for an Activity where as Adding to the Application changes theme to all those activities except the activities that has :theme attribute.

You can choose to use your own theme or the them in android:style libraries. Choosing the theme is a very difficult as we have to apply the theme each time and see it by running the app.

Let us make it Simple and Effective
The normal themes are:
1. @android:style/Theme.Dialog is the theme name that make the activity appear as a dialog box.
2. @android:style/Theme,Translucent is also a theme name that makes you activity transparent. The background is visible.
3.@:style/yourTheme is the theme that you have create in the and place in style.

So what is a Style in Android:
Style defines the look and format of the view or the window. It is composed of collection of properties like
1. Height
2. Padding
3. Font Color
4. Font Size
and more
Style once defined can be linked to other views so that you should not write the properties already described in style for in each view in layout file.

Okay thats a Syle, the what is Theme ?
The answer is simple, the theme is a other name of the style if it is applied to the whole activity and all its views. Style is also the xml file with the views name like <TextView and its properties. So all the text views in Activity will have the properties of <TextView defined in the style and their additional properties like hint.
Below is the example that will show how to create style and Apply to the specific view in layout file or to the whole Activity(ie such style is called Theme)

#Defining Style: A style is a xml file that contains a view like<TextView> and its properties. It may contain only one view or collection of views and their properties.The xml file should be placed inside res/values, Example:

Right Click in the directory res/values the style xml file then chose the filename for xml, then you get,
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>
inside <resources> </resources> place the <style></style> and provide the name and parent of the style and other properties as follows.
<?xml version="1.0" encoding="utf-8"?><resources>
    <style name="myStyleEditText" parent="@style/TextAppearance.AppCompat.Title">
          <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:textColor">@android:color/holo_blue_light</item>
        <item name="android:typeface">serif</item>
        <item name="android:layout_marginLeft">10dp</item>
    </style>
</resources>
Here the name is required/must and parent is the style from which our style "myStlyeEditText" inherit the properties i.e parent="@style/TextAppearance.AppCompat.Title"or it may be also be parent="@style/TextAppearance.AppCompat.Light" or any other you like.

That's all, a style is created with a name "myStlyeEditText" . To use this style we will do something like this in the view like <TextView> in the layout file.
<EditText    android:id="@+id/editText"   
 android:hint="@string/search"    
  android:layout_marginLeft="10dp"   
 android:layout_marginRight="10dp"    
style="@style/myStyleEditText"     />
Here in the View ie <EditText> style attribute is added which is reference to the style  "myStyleEditText" which we made. We can even include <item name="android:layout_marginLeft">10dp</item> in the style and remove the android:layout_marginLeft="10dp" from<EditText> and so on for other properties like hint,layout_marginRight.

Further more this style that we made now can also be used as a parent as

<style name="myStyleEditText.Red">
    <item name="android:textColor">@android:color/holo_red_dark</item>
</style>

This style is same as "myStyleEditText" but overrides the @android:color/holo_red_dark to Red color.

#Defining Theme:
To apply the theme for whole application include in<Application together with label as
android:theme="Theme.AppCompat.Light.DarkActionBar">
Or parent="Theme.AppCompat.Light.NoActionBar"
Also you may use the your theme which is defined like
<style name="myTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowBackground">@android:color/holo_blue_light</item>
    <item name="android:colorBackground">@android:color/black</item>
</style>
And use it as android:theme="@style/myTheme"> in the manifest file. for <Application> or<Activity>

That's all, you have created your theme which is inherited from parent theme.

More at: https://developer.android.com/guide/topics/ui/themes.html#DefiningStyles

Wednesday 22 June 2016

Android Handling Configuration Change to Update the Layouts for Different Orientation

There are generally two used methods to provide different layout for different orientation
First is to,

  1. Override the onConfigurationChanged() method and add setContentView(R.layout.layoutname) only if you have edited the manifest file and have added android:configChanges="orientation|screenSize" or android:configChanges="orientation" together with the android:name attribute of activity.
  2. If not then you can perform action to change layout in onCreate() method replacing setContentView(R.layout.layoutname);
  3. The technique is to find the current orientation (Portrait or Landscape) and then set the Content View with the Desired layout ,Example
    if(getResources().getConfiguration().orientation==Configuration.ORIENTATION_LANDSCAPE){
        setContentView(R.layout.landscapeLayout);
    
    }
    else if(getResources().getConfiguration().orientation==Configuration.ORIENTATION_PORTRAIT) {
       setContentView(R.layout.portraitLayout);
    }
  4. Thus load the layout designed for Potrait or Lanscape by including the above code inside either onCreate() or in onConfigurationChanged() method.. IMPORTANT refer 1 and 2 to choose the method either onCreate() or onConfigurationChanged().
  5. IMPORTANT: Make sure that the layout xml file has different name for different orientations example R.layout.landscapeLayout and R.layout.portraitLayout layout names for Landscape and Portrait layout respectively

Second is to,

  1. Create a directory for Landscape and Portrait in the Layout folder inside res folder as
  2.  Create layout-land directory by right clicking on res folder and add paste the xml layout file for Landscape mode inside it, This file will be used in Landscape mode by android itself.
  3. The default path layout is for Portrait mode, and android use the file inside this for Portrait mode.
  4. IMPORTANT: Make sure that the layout xml file has same name in both directories layout-land and layout.
  5. That's all
More at:https://developer.android.com/training/basics/supporting-devices/screens.html

Android Handling Configuration Change

Configuration Changes may include one of these behaviors
  • Changes in Screen Orientation
  • Keyboard Availability Change
  • And the Change in Language
Normally the Configuration Changes results in the call of onDestroy() and onCreate() methods in a order.

To restore the state of the data of your application android call onSaveInstanceState() before onDestroy() and onRestoreInstanceState after onCreate(). It is simple, you can save the data in onSaveInstanceState() method and restore the same in onRestoreInstanceState() or onCreate() method.

 So, how do I handle my Configuration Changed?
 There are 2 methods normally used, First one is Simple method and Second is Compex. Simple is generally preferred if the data that need to be restored during configuration change is less where as Complex is preferred when required to restore large data as the use of simple methods will result lag in the USER Experience of USER INTERFACE.

Method : Simple Method
  • Above and on API 13 add following in Manifest file inside activity with activity Name 
    android:configChanges="orientation|screenSize"
  • Below API 13 add following in Manifest file inside activity with activity Name 
    
    android:configChanges="orientation"
  • And you are done. That's all.
  • If you need to perform some actions on configuration change then only Override the onConfigurationChanged() method of the Activity class inside your Class to perform additional action on Configuration Change but make sure you always call super.onConfigurationChanged();
  • Doing this, the Configuration change event will not call for onCreate() again and application data remains same.
Method : Complex Method
  • When the Configuration Changes and if the manifest file of activity doesn't include configchanges attribute unlike Simple Method above, then the android calls onSaveInstanceState in the event of Configuration Change unspecified in Manifect Activity.
  • Override the onSaveInstanceState() method and add the values to be saved. example
    protected void onSaveInstanceState(Bundle outState) {
         String myValue="SaveValue";
        outState.putStringArrayList("RECOVER", myValue);
         super.onsaveInstanceState();
    }
  • Then the android calls for onDestroy() method, on Create() and onRestoreInstanceState() in a order.
  • Override the onRestoreInstanceState() to recover the saved data in onSaveInstanceState() ,Example
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
    
      String myValue;     
    myValue= savedInstanceState.getStringArrayList("RECOVER"); super.onRestoreInstanceState(savedInstanceState); }
  • This recovers the String named myValue having the content "SaveValue". The keyName which is RECOVER should be unique as it carry the String named myValue(a variable).
More at: https://developer.android.com/guide/topics/resources/runtime-changes.html